File tree Expand file tree Collapse file tree 1 file changed +38
-8
lines changed
Expand file tree Collapse file tree 1 file changed +38
-8
lines changed Original file line number Diff line number Diff line change @@ -3,35 +3,65 @@ name: Run tests
33on : [push,workflow_dispatch]
44
55jobs :
6- test :
6+ test-linux :
77 strategy :
88 fail-fast : false
99 matrix :
10- os : [ubuntu-latest, macos-latest ]
10+ os : [ubuntu-latest]
1111 compiler : [gcc, clang]
1212
1313 runs-on : ${{matrix.os}}
1414
1515 steps :
1616 - uses : actions/checkout@v4
1717
18- - name : Setup dependencies Ubuntu
19- if : runner.os == 'Linux'
18+ - name : Setup dependencies
2019 run : |
2120 sudo apt update
2221 sudo apt upgrade
2322 sudo apt-get install -y libcriterion-dev libopenblas-dev
2423
25- - name : Setup dependencies MacOS
26- if : runner.os == 'macOS'
24+ - name : Compile
25+ env :
26+ CC : ${{ matrix.compiler }}
27+ run : |
28+ cmake -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
29+ cmake --build /tmp/build
30+
31+ - name : Run tests
2732 run : |
28- brew install openblas criterion
33+ cd /tmp/build
34+ make vtest
35+
36+ test-macos :
37+ strategy :
38+ fail-fast : false
39+ matrix :
40+ compiler : [gcc, clang]
41+
42+ runs-on : macos-latest
43+
44+ steps :
45+ - uses : actions/checkout@v4
46+
47+ - name : Setup dependencies
48+ run : |
49+ brew install criterion
50+
51+ - name : Install gcc
52+ if : matrix.compiler == 'gcc'
53+ run : brew install gcc@13
2954
3055 - name : Compile
3156 env :
3257 CC : ${{ matrix.compiler }}
3358 run : |
34- cmake -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
59+ if [ $CC = "gcc" ]; then
60+ BREW_PREFIX="$(brew --prefix)"
61+ cmake -DCMAKE_C_COMPILER=${BREW_PREFIX}/bin/gcc-13 -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
62+ else
63+ cmake -DBUILD_TESTING=ON -DBUILD_OPENMP_TESTS=ON -S . -B /tmp/build
64+ fi
3565 cmake --build /tmp/build
3666
3767 - name : Run tests
You can’t perform that action at this time.
0 commit comments