diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b1f99f3f..70e93bd8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -118,10 +118,6 @@ jobs: LANDLOCK_CRATE_TEST_ABI: 3 steps: - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.commit }} - - name: Clone Landlock test tools uses: actions/checkout@v4 with: @@ -129,7 +125,14 @@ jobs: ref: ${{ env.LANDLOCK_TEST_TOOLS_COMMIT }} path: landlock-test-tools + - name: Clone rust-landlock + uses: actions/checkout@v4 + with: + ref: ${{ matrix.commit }} + path: rust-landlock + - name: Get MSRV + working-directory: rust-landlock run: sed -n 's/^rust-version = "\([0-9.]\+\)"$/RUST_TOOLCHAIN=\1/p' Cargo.toml >> $GITHUB_ENV - name: Install Rust MSRV @@ -139,16 +142,20 @@ jobs: rustup update ${{ env.RUST_TOOLCHAIN }} - name: Build + working-directory: rust-landlock run: rustup run ${{ env.RUST_TOOLCHAIN }} cargo build --verbose - name: Build tests + working-directory: rust-landlock run: rustup run ${{ env.RUST_TOOLCHAIN }} cargo build --tests --verbose - name: Run tests against the local kernel (Landlock ABI ${{ env.LANDLOCK_CRATE_TEST_ABI }}) + working-directory: rust-landlock run: rustup run ${{ env.RUST_TOOLCHAIN }} cargo test --verbose - name: Run tests against Linux 6.1 - run: CARGO="rustup run ${{ env.RUST_TOOLCHAIN }} cargo" ./landlock-test-tools/test-rust.sh linux-6.1 2 + working-directory: rust-landlock + run: CARGO="rustup run ${{ env.RUST_TOOLCHAIN }} cargo" ../landlock-test-tools/test-rust.sh linux-6.1 2 ubuntu_20_rust_stable: runs-on: ubuntu-20.04