sgx-world build and audit #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sgx-world build and audit | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
schedule: [cron: "40 1 * * *"] | |
jobs: | |
build-world: | |
strategy: | |
matrix: | |
runs-on: | |
- ubuntu-22.04 | |
image: | |
- "ghcr.io/scrtlabs/sgx-rust:2204-1.1.6" | |
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-22.04 | |
container: | |
image: "ghcr.io/scrtlabs/sgx-rust:2204-1.1.6" | |
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 |