Skip to content

Commit

Permalink
ci: update workflow to use ubuntu-24.04 for all jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyaasir committed Nov 27, 2024
1 parent 7d44ceb commit c3eb0e2
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:

jobs:
check-for-run-condition:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
should-run: ${{ !github.event.pull_request || github.event.pull_request.draft == false }}
steps:
Expand All @@ -38,7 +38,7 @@ jobs:
check-for-modification:
needs: check-for-run-condition
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
core-modified: ${{ steps.change-detection.outputs.core-modified }} # map step output to job output
steps:
Expand Down Expand Up @@ -67,9 +67,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ ubuntu-24.04, macos-latest, windows-latest ]
include:
- os: ubuntu-latest
- os: ubuntu-24.04
sccache-path: /home/runner/.cache/sccache
- os: macos-latest
sccache-path: /Users/runner/Library/Caches/Mozilla.sccache
Expand Down Expand Up @@ -104,15 +104,15 @@ jobs:
os: ${{matrix.os}}

- name: Check --no-default-features
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: |
cargo metadata --format-version 1 | \
jq -r '.workspace_members[]' | \
awk '{print $1}' | \
xargs -I {} cargo check -p {} --no-default-features
- name: Check default features
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: |
cargo metadata --format-version 1 | \
jq -r '.workspace_members[]' | \
Expand All @@ -122,7 +122,7 @@ jobs:
# Clean debug target to avoid bloating the GitHub Actions cache.
# The previous builds cannot be re-used at all for the full --all-features --release build anyway.
- name: Clean target
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: cargo clean

# Build the library, tests, and examples without running them to avoid recompilation in the run tests step
Expand All @@ -133,7 +133,7 @@ jobs:
if: matrix.os != 'windows-latest'
uses: './.github/actions/iota-rebase-sandbox/setup'
with:
platform: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'macos' }}
platform: ${{ matrix.os == 'ubuntu-24.04' && 'linux' || 'macos' }}

- name: Run tests excluding `custom_time` feature
if: matrix.os != 'windows-latest'
Expand All @@ -144,7 +144,7 @@ jobs:

- name: Run Rust examples
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: |
cargo metadata --format-version 1 --manifest-path ./examples/Cargo.toml | \
jq -r '.packages[] | select(.name == "examples") | .targets[].name' | \
Expand All @@ -154,7 +154,7 @@ jobs:
- name: Run Rust Readme examples
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu-24.04'
run: |
cd bindings/wasm
npm ci
Expand All @@ -176,13 +176,13 @@ jobs:
test-wasm:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
include:
- os: ubuntu-latest
- os: ubuntu-24.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -212,13 +212,13 @@ jobs:
test-wasm-firefox:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
include:
- os: ubuntu-latest
- os: ubuntu-24.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -256,13 +256,13 @@ jobs:
test-wasm-chrome:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
include:
- os: ubuntu-latest
- os: ubuntu-24.04

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit c3eb0e2

Please sign in to comment.