Skip to content

Commit 061dcc9

Browse files
author
Rastislav Turanyi
committed
Try forcing MacOS gcc
1 parent 66a0eba commit 061dcc9

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

.github/workflows/run_tests.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,65 @@ name: Run tests
33
on: [push,workflow_dispatch]
44

55
jobs:
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

0 commit comments

Comments
 (0)