-
Notifications
You must be signed in to change notification settings - Fork 24
115 lines (105 loc) · 3.12 KB
/
test_numpy.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Test Numpy versions
on:
push:
branches:
- stable
- unstable
pull_request:
branches:
- stable
- unstable
schedule:
- cron: '0 23 * * 1'
defaults:
run:
shell: bash
jobs:
pre_job:
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: 'true'
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md", "**/docs/**"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
name: ${{ matrix.config.name }}
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: "Minimum Numpy version",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-11",
cxx: "g++-11",
generators: "Ninja",
target: "all",
numpy: "numpy==1.18.5",
python-version: "3.8"
}
- {
name: "Latest Numpy version",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-11",
cxx: "g++-11",
generators: "Ninja",
target: "all",
numpy: "numpy",
python-version: "3.11"
}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install pytest cmake ninja
python -m pip install ${{ matrix.config.numpy }}
sudo apt install -y libopenblas-dev
ninja --version
cmake --version
- name: Configure
run: |
mkdir build
cd build
export PY_CMD=$(python -c 'import sys; print(sys.executable)')
cmake \
-DCARMA_BUILD_TESTS=ON \
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_INSTALL_PREFIX:PATH=. \
-DPython3_EXECUTABLE=${PY_CMD} \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-G "Ninja" \
..
- name: Build
run: |
cd build
cmake \
--build . \
--target ${{ matrix.config.target }} \
--config ${{ matrix.config.build_type }}
- name: Test
run: |
cd build
ctest \
--verbose --rerun-failed --output-on-failure \
-C ${{ matrix.config.build_type }}