| 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:1604-1.1.3" |
| - "baiduxlab/sgx-rust:1804-1.1.3" |
| - "baiduxlab/sgx-rust:2004-1.1.3" |
| - "baiduxlab/sgx-rust:fedora31-1.1.3" |
| - "baiduxlab/sgx-rust:centos8-1.1.3" |
| build-command: |
| - "cp ../../.github/workflows/Xargo.toml . && RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-unknown-linux-sgx" |
| - "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.3" |
| 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 |