ci: update Nix installer, use cache #829
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: lint | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
fmt: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust toolchain | |
run: rustup show | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: cargo clippy (${{ matrix.args }}) | |
runs-on: ubuntu-20.04 | |
steps: | |
- run: sudo apt -o Acquire::Retries=3 update | |
- run: sudo apt -o Acquire::Retries=3 install -y musl-tools | |
- uses: actions/checkout@v3 | |
- name: Setup Rust toolchain | |
run: rustup show | |
- run: cargo clippy ${{ matrix.args }} -- -D warnings | |
- run: cargo clippy ${{ matrix.args }} --all-features -- -D warnings | |
strategy: | |
fail-fast: false | |
matrix: | |
args: | |
- --workspace --all-targets | |
- --target=x86_64-unknown-linux-musl --workspace --all-targets | |
- --target=x86_64-unknown-none -p enarx-shim-sgx -p enarx-shim-kvm -p sallyport -p enarx_syscall_tests | |
- --target=wasm32-wasi -p enarx_wasm_tests --all-targets | |
deny: | |
name: cargo deny | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
arguments: --workspace | |
check-spdx-headers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- uses: enarx/spdx@master | |
with: | |
licenses: Apache-2.0 BSD-3-Clause MIT |