|
name: ArrayFire CI |
|
on: |
|
push: |
|
branches: |
|
- master |
|
pull_request: |
|
|
|
jobs: |
|
build: |
|
strategy: |
|
matrix: |
|
os: [ubuntu-latest, macos-latest] |
|
runs-on: ${{ matrix.os }} |
|
steps: |
|
- uses: actions/checkout@v4 |
|
|
|
# macos-latest is Apple Silicon; ArrayFire only ships x86_64-darwin, so |
|
# we build under Rosetta 2 targeting .#packages.x86_64-darwin.default. |
|
- name: Install Rosetta 2 |
|
if: runner.os == 'macOS' |
|
run: softwareupdate --install-rosetta --agree-to-license |
|
|
|
- uses: ners/simply-nix@main |
|
with: |
|
reclaim_space: true |
|
|
|
- name: Build and run tests (Linux) |
|
if: runner.os == 'Linux' |
|
run: nix build -L |
|
|
|
- name: Build and run tests (macOS, x86_64 via Rosetta) |
|
if: runner.os == 'macOS' |
|
run: nix build -L .#packages.x86_64-darwin.default |