Skip to content

Commit

Permalink
chore: enable CI on arm arch (#842)
Browse files Browse the repository at this point in the history
* chore: enable CI on arm arch

Signed-off-by: MrCroxx <[email protected]>

* chore: enable arm on more tasks

Signed-off-by: MrCroxx <[email protected]>

* chore: disable udeps test on arm

Signed-off-by: MrCroxx <[email protected]>

* chore: update cache key naming

Signed-off-by: MrCroxx <[email protected]>

* fix: fix doc test on arm and x64 ubuntu

Signed-off-by: MrCroxx <[email protected]>

---------

Signed-off-by: MrCroxx <[email protected]>
  • Loading branch information
MrCroxx authored Jan 18, 2025
1 parent 2e91826 commit c325ebb
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
env:
RUST_TOOLCHAIN_NIGHTLY: nightly-2024-08-30
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20250114
CACHE_KEY_SUFFIX: 20250118v2

jobs:
misc-check:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-cargo-manifest-check
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-cargo-manifest-check
- name: Install tools
if: steps.cache.outputs.cache-hit != 'true'
run: |
Expand All @@ -81,7 +81,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -99,7 +99,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-udeps
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-udeps
- name: Install NASM for aws-lc-rs on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
Expand All @@ -120,7 +120,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -139,7 +139,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-ffmt-check
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-ffmt-check
- name: Fastidious Format Check
run: |
cargo fmt --all --check -- --config-path rustfmt.nightly.toml
Expand All @@ -155,7 +155,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
rust_toolchain: [stable, 1.81.0]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -175,7 +175,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-test
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-test
- name: Install NASM for aws-lc-rs on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
cargo llvm-cov --no-report run --example equivalent
cargo llvm-cov --no-report run --example export_metrics_prometheus_hyper
- name: Run foyer-bench with coverage
if: runner.os == 'Linux'
if: runner.os == 'Linux' && runner.arch == 'X64'
env:
RUST_BACKTRACE: 1
CI: true
Expand All @@ -235,7 +235,7 @@ jobs:
run: |
cargo llvm-cov report --lcov --output-path lcov.info
- uses: codecov/codecov-action@v4
if: runner.os == 'Linux' && matrix.rust_toolchain == 'stable'
if: runner.os == 'Linux' && runner.arch == 'X64' && matrix.rust_toolchain == 'stable'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand All @@ -245,7 +245,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -263,7 +263,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rustdoc-test
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rustdoc-test
- name: Install NASM for aws-lc-rs on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
Expand All @@ -281,7 +281,7 @@ jobs:
- name: Upload docs.rs docs as artifacts
uses: actions/upload-artifact@v4
with:
name: foyer-docs-${{ github.sha }}-${{ runner.os }}
name: foyer-docs-${{ github.sha }}-${{ runner.os }}-${{ runner.arch }}
path: target/doc
if-no-files-found: error
retention-days: 7
Expand All @@ -305,7 +305,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-deadlock
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-deadlock
- name: Run foyer-bench with single worker thread and deadlock detection
env:
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-asan
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-asan
- name: Run Unit Tests With Address Sanitizer
env:
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -389,7 +389,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-madsim
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-madsim
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust clippy check (madsim, check only)
Expand Down

0 comments on commit c325ebb

Please sign in to comment.