docs: add badges to README #70
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ArrayFire CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # macos-latest is Apple Silicon, but ArrayFire only ships an x86_64 macOS | |
| # binary, so the flake's darwin output is x86_64-darwin. Build it under | |
| # Rosetta 2: ensure Rosetta is present and let Nix build x86_64-darwin | |
| # derivations via `extra-platforms` below. | |
| - name: Install Rosetta 2 | |
| if: runner.os == 'macOS' | |
| run: softwareupdate --install-rosetta --agree-to-license | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixpkgs-unstable | |
| extra_nix_config: | | |
| extra-platforms = x86_64-darwin | |
| - 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 |