-
Notifications
You must be signed in to change notification settings - Fork 24
61 lines (52 loc) · 1.78 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Run tests
on: [pull_request, push]
env:
apt_options: -o Acquire::Retries=3
jobs:
build:
name: Run tests on ${{ matrix.os }}.${{ matrix.compiler.CC }}
runs-on: ${{ matrix.os }}
# Run on external PRs, but not internal PRs as they'll be run by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler:
- {CC: clang, CXX: clang++}
- {CC: gcc, CXX: g++}
exclude:
- os: macos-latest
compiler: {CC: gcc, CXX: g++}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get ${{env.apt_options}} update -y
sudo apt-get ${{env.apt_options}} install -y build-essential libhdf5-dev language-pack-de
- name: Install packages on MacOS
if: runner.os == 'macOS'
run: |
# { work around https://github.com/actions/setup-python/issues/577
#brew update
#brew --version
export HOMEBREW_NO_AUTO_UPDATE=1
# }
brew install cmake || true # macos image has cmake installed, but a new version may exist; ignore it if so
brew install hdf5
- name: Build and run unittests
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
run: |
locale -a
./ci/python_test.sh
./ci/cpp_test.sh
./ci/cpp_test.sh "-DMORPHIO_USE_DOUBLE=ON"