blob: 3c202c28b18cecab2d130f95cac9895ff68b3bda [file] [log] [blame]
name: sgx-world build and audit
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
schedule: [cron: "40 1 * * *"]
jobs:
build-world:
strategy:
matrix:
runs-on:
- ubuntu-18.04
image:
- "baiduxlab/sgx-rust:1804-1.1.4"
- "baiduxlab/sgx-rust:2004-1.1.4"
- "baiduxlab/sgx-rust:centos8-1.1.4"
build-command:
- "cat ../../.github/workflows/patch.txt >> ./Cargo.toml && cp ../../.github/workflows/Xargo.toml . && RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-unknown-linux-sgx"
- "cat ../../.github/workflows/patch.txt >> ./Cargo.toml && cp ../../.github/workflows/Xargo.toml . && RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-unknown-linux-sgx --release"
- "cat ../../.github/workflows/patch.txt >> ./Cargo.toml && cargo build"
- "cat ../../.github/workflows/patch.txt >> ./Cargo.toml && cargo build --release"
runs-on: ${{ matrix.runs-on }}
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v1
with:
submodules: 'true'
- name: Set up Github Actions' $HOME
run: |
cp /root/.bashrc $HOME/.bashrc &&
ln -sf /root/.rustup ~/.rustup &&
ln -sf /root/.cargo ~/.cargo
- name: Rust toolchains
run: |
. ~/.cargo/env &&
rustc --version &&
rustup --version &&
cargo --version
shell: bash
- name: Run build
run: |
. ~/.cargo/env &&
. /opt/sgxsdk/environment &&
git clone https://github.com/dingelish/sgx-world &&
cd sgx-world/dumb-all &&
${{ matrix.build-command }} &&
cd ../.. &&
rm -rf sgx-world
shell: bash
cargo-audit:
runs-on: ubuntu-18.04
container:
image: "baiduxlab/sgx-rust:1804-1.1.4"
steps:
- uses: actions/checkout@v1
with:
submodules: 'true'
- name: Set up Github Actions' $HOME
run: |
cp /root/.bashrc $HOME/.bashrc &&
ln -sf /root/.rustup ~/.rustup &&
ln -sf /root/.cargo ~/.cargo
- name: Rust toolchains
run: |
. ~/.cargo/env &&
rustc --version &&
rustup --version &&
cargo --version
shell: bash
- name: Run audit
run: |
. ~/.cargo/env &&
. /opt/sgxsdk/environment &&
cargo install cargo-audit &&
git clone https://github.com/dingelish/sgx-world &&
cd sgx-world/dumb-all &&
cargo audit --ignore RUSTSEC-2016-0005 --ignore RUSTSEC-2020-0023 --ignore RUSTSEC-2020-0159 --ignore RUSTSEC-2021-0076 --ignore RUSTSEC-2021-0073