Skip to content

Commit

Permalink
Update CI build images
Browse files Browse the repository at this point in the history
Fixes:
  * Error: The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15
  * Warning: ubuntu-latest pipelines will use ubuntu-24.04 soon
  • Loading branch information
wcampbell0x2a committed Dec 25, 2024
1 parent 465614d commit 39866db
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI Pull Request
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-musleabi, os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-musleabi, os: ubuntu-latest, use-cross: true }
- { target: x86_64-apple-darwin, os: macos-12 }
- { target: x86_64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true }
- { target: arm-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true }
- { target: armv7-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true }
- { target: x86_64-apple-darwin, os: macos-14 }

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:

jobs:
coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
CARGO_TERM_COLOR: always
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/labeler@v5
35 changes: 19 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-pc-windows-gnu, os: ubuntu-latest, use-cross: true }
- { target: x86_64-pc-windows-gnu, os: ubuntu-24.04, use-cross: true }
toolchain:
- stable
# msrv of backhand-cli
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
# build lib with cross
- run: $BUILD_CMD build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --lib
- run: $BUILD_CMD +${{ matrix.toolchain }} build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --lib

# build/test all supported targets for library and bins (skipping slow and squashfs-tools tests)
cross-test:
Expand All @@ -62,12 +62,12 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-musl, os: ubuntu-latest, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-latest, use-cross: true }
- { target: arm-unknown-linux-musleabi, os: ubuntu-latest, use-cross: true }
- { target: armv7-unknown-linux-musleabi, os: ubuntu-latest, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-latest, use-cross: true }
- { target: x86_64-apple-darwin, os: macos-12 }
- { target: x86_64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true }
- { target: arm-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true }
- { target: armv7-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true }
- { target: aarch64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true }
- { target: x86_64-apple-darwin, os: macos-14, }
toolchain:
- stable
# msrv of backhand-cli
Expand All @@ -91,13 +91,16 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
# build lib and bins with cross
- run: $BUILD_CMD build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --features xz-static
# test with cross, skipping slow test and tests that use more then qemu default memory
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info $BUILD_CMD test --workspace --release ${{ matrix.features }} --target ${{ matrix.job.target }} --features xz-static --locked -- --skip slow --skip no_qemu
# TODO: really only needed for the matrix variables without use-cross
targets: ${{ matrix.job.target }}

# build lib and bins with cross or cargo
- run: $BUILD_CMD +${{ matrix.toolchain }} build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --features xz-static
# test with cross, skipping slow test and tests that use more then qemu default memory without use-cross without use-cross
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info $BUILD_CMD +${{ matrix.toolchain }} test --workspace --release ${{ matrix.features }} --target ${{ matrix.job.target }} --features xz-static --locked -- --skip slow --skip no_qemu
# build/test all supported on native x86_64 arch for library and bins (all tests)
build-test-native:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -122,13 +125,13 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
# build bins
- run: cargo build ${{ matrix.features }} --release --locked --workspace
- run: cargo +${{ matrix.toolchain }} build ${{ matrix.features }} --release --locked --workspace
# run tests with native unsquashfs on x86_64-unknown-linux-musl (using Cross.toml)
- run: RUST_LOG=info cargo test --workspace --release ${{ matrix.features }} --locked --features __test_unsquashfs -- --skip slow
- run: RUST_LOG=info cargo +${{ matrix.toolchain }} test --workspace --release ${{ matrix.features }} --locked --features __test_unsquashfs -- --skip slow

# fmt and clippy on stable
fmt-clippy-stable:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
name: Check MSRV of backhand
jobs:
build-test-backhand:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -26,10 +26,10 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: cargo check --locked -p backhand
- run: cargo +${{ matrix.toolchain }} check --locked -p backhand

build-test-backhand-cli:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand All @@ -45,4 +45,4 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: cargo check --locked -p backhand-cli
- run: cargo +${{ matrix.toolchain }} check --locked -p backhand-cli
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
changelog:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
Expand Down

0 comments on commit 39866db

Please sign in to comment.