From 174bc6b835b996dc9288d549e86af80f1c38ef7b Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Tue, 26 Mar 2024 15:06:11 +0100 Subject: [PATCH] [#3] Add ubuntu stable to github CI --- .github/workflows/build-test.yml | 45 ++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 55867dc2..53dc3def 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Check format of all commit messages run: ./internal/scripts/ci_test_commit_msg.sh @@ -26,7 +26,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Rust uses: dtolnay/rust-toolchain@v1 @@ -59,7 +59,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Rust uses: dtolnay/rust-toolchain@v1 @@ -80,12 +80,47 @@ jobs: - name: Run cargo test run: cargo test --workspace --no-fail-fast + ubuntu-stable: + needs: preflight-check + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt, clippy + + - name: Prepare system + run: | + sudo apt-get update + sudo apt-get install -y clang curl git libacl1-dev + sudo useradd testuser1 + sudo useradd testuser2 + sudo groupadd testgroup1 + sudo groupadd testgroup2 + + - name: Run cargo fmt + run: cargo fmt --all -- --check + + - name: Run cargo clippy + run: cargo clippy -- -D warnings + + - name: Run cargo build + run: cargo build --workspace --all-targets + + - name: Run cargo test + run: cargo test --workspace --no-fail-fast + grcov: needs: preflight-check timeout-minutes: 10 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build and cache grcov uses: ./.github/actions/build-and-cache-rust-tool with: @@ -101,7 +136,7 @@ jobs: needs: grcov runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: sudo apt-get -y install libacl1-dev llvm