forked from xtensor-stack/xtensor
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (85 loc) · 2.64 KB
/
ci_extended.yaml
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
name: Extra CI
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
jobs:
linux:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
sys:
- {name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
- {name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
- {name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
- {name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
defaults:
run:
shell: bash -l {0}
name: ${{ matrix.runs-on }} • default - ${{ matrix.sys.name }}
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set conda environment
if: ${{ matrix.sys.name != 'tbb' }}
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
- name: Set conda environment
if: ${{ matrix.sys.name == 'tbb' }}
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
extra-specs: |
tbb-devel
- name: Configure using CMake
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON ${{ matrix.sys.flags }}
- name: Install
working-directory: build
run: cmake --install .
- name: Build
working-directory: build
run: cmake --build .
- name: Run tests
working-directory: build
run: ctest --output-on-failure
clang:
strategy:
fail-fast: false
matrix:
runs-on: [windows-latest]
defaults:
run:
shell: bash -l {0}
name: ${{ matrix.runs-on }} • clang - default
runs-on: ${{ matrix.runs-on }}
steps:
- name: Setup clang
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
extra-specs: |
sel(win): ninja
- name: Configure using CMake
run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON -G Ninja ${{ matrix.sys.flags }}
- name: Install
working-directory: build
run: cmake --install .
- name: Build
working-directory: build
run: cmake --build . --target test_xtensor_lib --parallel 8
- name: Run tests
working-directory: build
run: ctest -R ^xtest$ --output-on-failure