Skip to content

Commit

Permalink
CI: Run the main jobs on macOS arm64 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuya6502 committed Feb 5, 2024
1 parent 6e872db commit 5bac8c3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 15 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ jobs:
rust: 1.65.0 # MSRV
- runner: ubuntu-latest
rust: nightly # For checking the minimum version dependencies.
- runner: macos-14 # macOS arm64
- runner: macos-14 # macOS arm64 (3 x vCPU)
rust: stable
test-args: --test-threads=3
runs-on: ${{ matrix.platform.runner }}

steps:
Expand Down Expand Up @@ -85,29 +86,41 @@ jobs:
run: cargo tree --features 'sync, future'

- name: Run tests (debug, sync feature)
run: cargo test --features sync
run: cargo test --features sync -- ${{ matrix.platform.test-args }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (release, sync feature)
run: cargo test --release --features sync
run: cargo test --release --features sync -- ${{ matrix.platform.test-args }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (sync feature, key lock test for notification)
run: cargo test --release --lib --features sync sync::cache::tests::test_key_lock_used_by_immediate_removal_notifications -- --exact --ignored
run: |
cargo test --release --lib --features sync sync::cache::tests::test_key_lock_used_by_immediate_removal_notifications \
-- --exact --ignored ${{ matrix.platform.test-args }}
- name: Run tests (sync feature, drop value after eviction for sync::Cache)
run: cargo test --release --lib --features sync sync::cache::tests::drop_value_immediately_after_eviction -- --exact --ignored
run: |
cargo test --release --lib --features sync sync::cache::tests::drop_value_immediately_after_eviction \
-- --exact --ignored ${{ matrix.platform.test-args }}
- name: Run tests (sync feature, drop value after eviction for sync::SegmentedCache)
run: cargo test --release --lib --features sync sync::segment::tests::drop_value_immediately_after_eviction -- --exact --ignored
run: |
cargo test --release --lib --features sync sync::segment::tests::drop_value_immediately_after_eviction \
-- --exact --ignored ${{ matrix.platform.test-args }}
- name: Run tests (sync feature, drop cache)
run: cargo test --release --lib --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache -- --exact --ignored
run: |
cargo test --release --lib --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache \
-- --exact --ignored ${{ matrix.platform.test-args }}
- name: Run tests (future feature, but no sync feature)
run: cargo test --no-default-features --features 'future, atomic64, quanta'
run: |
cargo test --no-default-features --features 'future, atomic64, quanta' \
-- ${{ matrix.platform.test-args }}
- name: Run tests (future, sync and logging features)
run: cargo test --features 'future, sync, logging'
run: |
cargo test --features 'future, sync, logging' \
-- ${{ matrix.platform.test-args }}
23 changes: 17 additions & 6 deletions .github/workflows/CIQuantaDisabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ jobs:
rust: 1.65.0 # MSRV
- runner: ubuntu-latest
rust: nightly # For checking the minimum version dependencies.
- runner: macos-14 # macOS arm64
- runner: macos-14 # macOS arm64 (3 x vCPU)
rust: stable
test-args: --test-threads=3
runs-on: ${{ matrix.platform.runner }}

steps:
Expand Down Expand Up @@ -74,20 +75,30 @@ jobs:
run: ./.ci_extras/remove-examples-msrv.sh

- name: Run tests (debug, but no quanta feature)
run: cargo test --no-default-features --features 'sync, atomic64'
run: |
cargo test --no-default-features --features 'sync, atomic64' \
-- ${{ matrix.platform.test-args }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (release, but no quanta feature)
run: cargo test --release --no-default-features --features 'sync, atomic64'
run: |
cargo test --release --no-default-features --features 'sync, atomic64' \
-- ${{ matrix.platform.test-args }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (future feature, but no quanta and sync features)
run: cargo test --no-default-features --features 'future, atomic64'
run: |
cargo test --no-default-features --features 'future, atomic64' \
-- ${{ matrix.platform.test-args }}
- name: Run tests (future, sync and logging features, but no quanta feature)
run: cargo test --no-default-features --features 'sync, future, atomic64, logging'
run: |
cargo test --no-default-features --features 'sync, future, atomic64, logging' \
-- ${{ matrix.platform.test-args }}
- name: Run tests (sync feature, but no quanta feature, drop cache)
run: cargo test --release --lib --no-default-features --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache -- --exact --ignored
run: |
cargo test --release --lib --no-default-features --features sync sync::cache::tests::ensure_gc_runs_when_dropping_cache \
-- --exact --ignored ${{ matrix.platform.test-args }}

0 comments on commit 5bac8c3

Please sign in to comment.