Skip to content

Commit

Permalink
Merge pull request #419 from rust-lang/macos-arm-ci
Browse files Browse the repository at this point in the history
Fix macos tests in CI
  • Loading branch information
calebzulawski authored Apr 30, 2024
2 parents c886e69 + 4fcf18b commit 1419136
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,19 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, i586-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-apple-darwin]
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc, i586-pc-windows-msvc, x86_64-unknown-linux-gnu]
# `default` means we use the default target config for the target,
# `native` means we run with `-Ctarget-cpu=native`, and anything else is
# an arg to `-Ctarget-feature`
target_feature: [default, native, +sse3, +ssse3, +sse4.1, +sse4.2, +avx, +avx2]

exclude:
# The macos runners seem to only reliably support up to `avx`.
- { target: x86_64-apple-darwin, target_feature: +avx2 }
# These features are statically known to be present for all 64 bit
# macs, and thus are covered by the `default` test
- { target: x86_64-apple-darwin, target_feature: +sse3 }
- { target: x86_64-apple-darwin, target_feature: +ssse3 }
# -Ctarget-cpu=native sounds like bad-news if target != host
- { target: i686-pc-windows-msvc, target_feature: native }
- { target: i586-pc-windows-msvc, target_feature: native }

include:
# Populate the `matrix.os` field
- { target: x86_64-apple-darwin, os: macos-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: i686-pc-windows-msvc, os: windows-latest }
Expand Down Expand Up @@ -133,6 +126,35 @@ jobs:
run: cargo doc --verbose --target=${{ matrix.target }}
env:
RUSTDOCFLAGS: -Dwarnings

macos-tests:
name: ${{ matrix.target }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-apple-darwin
- x86_64-apple-darwin
steps:
- uses: actions/checkout@v2
- name: Setup Rust
run: rustup target add ${{ matrix.target }}

- name: Configure RUSTFLAGS
shell: bash
run: echo "RUSTFLAGS=-Dwarnings" >> $GITHUB_ENV

- name: Test (debug)
run: cargo test --verbose --target=${{ matrix.target }}

- name: Test (release)
run: cargo test --verbose --target=${{ matrix.target }} --release

- name: Generate docs
run: cargo doc --verbose --target=${{ matrix.target }}
env:
RUSTDOCFLAGS: -Dwarnings

wasm-tests:
name: "wasm (firefox, ${{ matrix.name }})"
Expand Down

0 comments on commit 1419136

Please sign in to comment.