From c23ddfdc5b09263dce739e0697685612a44dd8da Mon Sep 17 00:00:00 2001 From: wcampbell Date: Mon, 16 Dec 2024 22:46:57 -0500 Subject: [PATCH 1/2] Update CI build images 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 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/binaries.yml | 10 +++++----- .github/workflows/coverage.yml | 2 +- .github/workflows/labeler.yml | 2 +- .github/workflows/main.yml | 22 ++++++++++++---------- .github/workflows/msrv.yml | 4 ++-- .github/workflows/pull_request.yml | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 1018f152..3a3f6f5d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 2d364f0f..e971f40b 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -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 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e8865157..9f1a0fa8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,7 +7,7 @@ permissions: jobs: coverage: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: CARGO_TERM_COLOR: always strategy: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2a340279..1ac8a079 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7500f0fc..0c5f0be4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 @@ -91,13 +91,15 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} + # TODO: really only needed for the matrix variables without use-cross + target: ${{ matrix.job.target }} # 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 + # 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 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: @@ -128,7 +130,7 @@ jobs: # 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 diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 962bc25c..1e8b8692 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -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: @@ -29,7 +29,7 @@ jobs: - run: cargo check --locked -p backhand build-test-backhand-cli: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index bbb575ff..a5022042 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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 From 32b5ace0e980423bd925219022fb7e81d1d2a9a6 Mon Sep 17 00:00:00 2001 From: wcampbell Date: Wed, 25 Dec 2024 00:48:20 -0500 Subject: [PATCH 2/2] fixup! Update CI build images --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c5f0be4..715c022e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,7 +67,7 @@ jobs: - { 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 } + - { target: x86_64-apple-darwin, os: macos-14, } toolchain: - stable # msrv of backhand-cli @@ -92,8 +92,10 @@ jobs: with: toolchain: ${{ matrix.toolchain }} # TODO: really only needed for the matrix variables without use-cross - target: ${{ matrix.job.target }} - # build lib and bins with cross + targets: ${{ matrix.job.target }} + + # build lib and bins with cross or cargo + - run : echo $BUILD_CMD - 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 without use-cross without use-cross - 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