Skip to content

Commit 46d8c19

Browse files
committed
Use nix
1 parent ad25ea2 commit 46d8c19

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v4
21+
- uses: cachix/install-nix-action@v27
22+
with:
23+
nix_path: nixpkgs=channel:nixpkgs-unstable
24+
- run: nix-channel --update
25+
26+
- uses: actions/checkout@v4
27+
28+
- name: Nix channel update
29+
run: nix-channel --update
2130

2231
- name: Install ArrayFire prerequisites
2332
run: |
@@ -30,28 +39,11 @@ jobs:
3039
chmod +x "$AF_INSTALLER"
3140
sudo "./$AF_INSTALLER" --exclude-subdir --prefix="$AF_PREFIX"
3241
33-
- name: Set up Haskell
34-
uses: haskell-actions/setup@v2
35-
with:
36-
ghc-version: "9.12"
37-
cabal-version: "latest"
38-
39-
- name: Cache cabal store
40-
uses: actions/cache@v4
41-
with:
42-
path: |
43-
~/.cabal/packages
44-
~/.cabal/store
45-
dist-newstyle
46-
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal', '**/cabal.project') }}
47-
restore-keys: |
48-
${{ runner.os }}-cabal-
49-
5042
- name: Update cabal package list
5143
run: cabal update
5244

5345
- name: Build
54-
run: cabal build all
46+
run: nix-shell -p ghc -p cabal-install --run 'cabal build'
5547
env:
5648
PATH: "/usr/local/bin:${{ env.PATH }}"
5749
LD_LIBRARY_PATH: "/usr/local/lib"

0 commit comments

Comments
 (0)