-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (34 loc) · 1.08 KB
/
Copy pathci.yml
File metadata and controls
41 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: ArrayFire CI
on:
push:
branches:
- master
pull_request:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # Add macOS to the matrix
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install ArrayFire (macOS)
if: runner.os == 'macOS'
run: |
set -euo pipefail
brew install arrayfire
# The cabal file's OSX default paths are hardcoded to /opt/arrayfire;
# point them at the Homebrew install so the build finds the headers,
# libs, and rpath.
sudo ln -sfn "$(brew --prefix arrayfire)" /opt/arrayfire
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Nix channel --update
run: nix-channel --update
- name: Cabal update
run: nix develop --command bash -c 'cabal update'
- name: Build and run tests
run: nix develop --command bash -c 'cabal install hspec-discover && cabal test'