File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 AF_PREFIX : " /usr/local"
1818
1919 steps :
20+ - uses : cachix/install-nix-action@v31
21+ with :
22+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
23+
24+ - name : Cancel Previous Runs
25+ uses : styfle/cancel-workflow-action@0.9.1
26+ with :
27+ access_token : ${{ github.token }}
2028 - uses : actions/checkout@v4
2129
30+ - name : Nix channel update
31+ run : nix-channel --update
32+
33+ - name : Cabal install
34+ run : nix-env -iA pkgs.cabal-install -f .
35+
2236 - name : Install ArrayFire prerequisites
2337 run : |
2438 sudo apt-get update
@@ -30,28 +44,11 @@ jobs:
3044 chmod +x "$AF_INSTALLER"
3145 sudo "./$AF_INSTALLER" --exclude-subdir --prefix="$AF_PREFIX"
3246
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-
5047 - name : Update cabal package list
5148 run : cabal update
5249
5350 - name : Build
54- run : cabal build all
51+ run : nix-shell -p ghc --run ' cabal build'
5552 env :
5653 PATH : " /usr/local/bin:${{ env.PATH }}"
5754 LD_LIBRARY_PATH : " /usr/local/lib"
You can’t perform that action at this time.
0 commit comments