Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install ArrayFire
run: brew install arrayfire

- name: Set up GHC
uses: haskell-actions/setup@v2
with:
ghc-version: '9.8.4'
cabal-version: 'latest'

- name: Cache cabal store
uses: actions/cache@v4
with:
path: ~/.cabal/store
key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project', '*.cabal') }}
restore-keys: |
${{ runner.os }}-cabal-

- name: Configure
run: cabal configure --flags="disable-default-paths disable-build-tool-depends" --extra-include-dirs=$(brew --prefix arrayfire)/include --extra-lib-dirs=$(brew --prefix arrayfire)/lib

- name: Build
run: cabal build arrayfire

2 changes: 1 addition & 1 deletion src/ArrayFire/FFI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ op2
:: Array b
-> Array a
-> (Ptr AFArray -> AFArray -> AFArray -> IO AFErr)
-> Array a
-> Array c
{-# NOINLINE op2 #-}
op2 (Array fptr1) (Array fptr2) op =
unsafePerformIO $ do
Expand Down
1 change: 1 addition & 0 deletions test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ instance (A.AFType a, Arbitrary a) => Arbitrary (Array a) where

main :: IO ()
main = do
A.setBackend A.CPU
-- checks (Proxy :: Proxy (A.Array (A.Complex Float)))
-- checks (Proxy :: Proxy (A.Array (A.Complex Double)))
-- checks (Proxy :: Proxy (A.Array Double))
Expand Down
Loading