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 de68c99 commit 6e872db
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 23 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,47 +31,54 @@ jobs:
test:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
strategy:
# Continue running other jobs in the matrix even if one fails.
fail-fast: false
matrix:
rust:
- stable
- beta
- 1.65.0 # MSRV
- nightly # For checking minimum version dependencies.
platform:
- runner: ubuntu-latest # Ubuntu x86_64
rust: stable
- runner: ubuntu-latest
rust: beta
- runner: ubuntu-latest
rust: 1.65.0 # MSRV
- runner: ubuntu-latest
rust: nightly # For checking the minimum version dependencies.
- runner: macos-14 # macOS arm64
rust: stable
runs-on: ${{ matrix.platform.runner }}

steps:
- name: Checkout Moka
uses: actions/checkout@v4

# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# 2-core CPU (x86_64), 7 GB of RAM
- name: Show CPU into
- name: Show CPU into (Linux)
if: ${{ matrix.platform.runner == 'ubuntu-latest' }}
run: |
nproc
lscpu
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
toolchain: ${{ matrix.platform.rust }}

- name: Downgrade dependencies to minimal versions (Nightly only)
if: ${{ matrix.rust == 'nightly' }}
if: ${{ matrix.platform.rust == 'nightly' }}
run: cargo update -Z minimal-versions

- name: Pin some dependencies to specific versions (Nightly only)
if: ${{ matrix.rust == 'nightly' }}
if: ${{ matrix.platform.rust == 'nightly' }}
run: ./.ci_extras/pin-crate-vers-nightly.sh

- name: Pin some dependencies to specific versions (MSRV only)
if: ${{ matrix.rust == '1.65.0' }}
if: ${{ matrix.platform.rust == '1.65.0' }}
run: ./.ci_extras/pin-crate-vers-msrv.sh

- name: Remove some examples (MSRV only)
if: ${{ matrix.rust == '1.65.0' }}
if: ${{ matrix.platform.rust == '1.65.0' }}
run: ./.ci_extras/remove-examples-msrv.sh

- name: Show cargo tree
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/CIQuantaDisabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ jobs:
test:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
strategy:
# Continue running other jobs in the matrix even if one fails.
fail-fast: false
matrix:
rust:
- stable
- beta
- 1.65.0 # MSRV
- nightly # For checking minimum version dependencies.
platform:
- runner: ubuntu-latest # Ubuntu x86_64
rust: stable
- runner: ubuntu-latest
rust: beta
- runner: ubuntu-latest
rust: 1.65.0 # MSRV
- runner: ubuntu-latest
rust: nightly # For checking the minimum version dependencies.
- runner: macos-14 # macOS arm64
rust: stable
runs-on: ${{ matrix.platform.runner }}

steps:
- name: Checkout Moka
Expand All @@ -49,22 +55,22 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
toolchain: ${{ matrix.platform.rust }}

- name: Downgrade dependencies to minimal versions (Nightly only)
if: ${{ matrix.rust == 'nightly' }}
if: ${{ matrix.platform.rust == 'nightly' }}
run: cargo update -Z minimal-versions

- name: Pin some dependencies to specific versions (Nightly only)
if: ${{ matrix.rust == 'nightly' }}
if: ${{ matrix.platform.rust == 'nightly' }}
run: ./.ci_extras/pin-crate-vers-nightly.sh

- name: Pin some dependencies to specific versions (MSRV only)
if: ${{ matrix.rust == '1.65.0' }}
if: ${{ matrix.platform.rust == '1.65.0' }}
run: ./.ci_extras/pin-crate-vers-msrv.sh

- name: Remove some examples (MSRV only)
if: ${{ matrix.rust == '1.65.0' }}
if: ${{ matrix.platform.rust == '1.65.0' }}
run: ./.ci_extras/remove-examples-msrv.sh

- name: Run tests (debug, but no quanta feature)
Expand Down

0 comments on commit 6e872db

Please sign in to comment.