diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac0276e..b53535b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,20 @@ jobs: build: name: Build runs-on: ubuntu-latest + container: + image: ubuntu:25.10 steps: + - name: Install git and dependencies + run: | + apt-get update + apt-get install -y git curl ${{ env.SYSTEM_DEPS }} + - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y ${{ env.SYSTEM_DEPS }} - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Cache cargo registry and build uses: actions/cache@v4 @@ -50,21 +54,27 @@ jobs: ${{ runner.os }}-cargo- - name: Build - run: cargo build --all-targets + run: | + . "$HOME/.cargo/env" + cargo build --all-targets test: name: Test runs-on: ubuntu-latest + container: + image: ubuntu:25.10 steps: + - name: Install git and dependencies + run: | + apt-get update + apt-get install -y git curl ${{ env.SYSTEM_DEPS }} + - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y ${{ env.SYSTEM_DEPS }} - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Cache cargo registry and build uses: actions/cache@v4 @@ -78,23 +88,28 @@ jobs: ${{ runner.os }}-cargo- - name: Run tests - run: cargo test --all-targets + run: | + . "$HOME/.cargo/env" + cargo test --all-targets lint: name: Clippy runs-on: ubuntu-latest + container: + image: ubuntu:25.10 steps: + - name: Install git and dependencies + run: | + apt-get update + apt-get install -y git curl ${{ env.SYSTEM_DEPS }} + - uses: actions/checkout@v4 - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y ${{ env.SYSTEM_DEPS }} - - name: Setup Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + rustup component add clippy + echo "$HOME/.cargo/bin" >> $GITHUB_PATH - name: Cache cargo registry and build uses: actions/cache@v4 @@ -108,4 +123,6 @@ jobs: ${{ runner.os }}-cargo- - name: Run Clippy - run: cargo clippy --all-targets -- -D warnings + run: | + . "$HOME/.cargo/env" + cargo clippy --all-targets -- -D warnings