-
Notifications
You must be signed in to change notification settings - Fork 18
80 lines (73 loc) · 2.07 KB
/
Copy pathmain.yml
File metadata and controls
80 lines (73 loc) · 2.07 KB
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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash -e -l {0}
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux
extra-cmake-args: ""
- os: ubuntu-latest
name: Linux (no exceptions)
extra-cmake-args: "-DDISABLE_EXCEPTIONS=ON"
- os: macos-latest
name: macOS arm
extra-cmake-args: ""
- os: macos-26-intel
name: macOS intel
extra-cmake-args: ""
- os: windows-latest
name: Windows
extra-cmake-args: "-DCMAKE_BUILD_TYPE=Release"
steps:
- name: Setup MSVC
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Checkout code
uses: actions/checkout@v7
- name: Set conda environment
uses: mamba-org/setup-micromamba@v3
with:
environment-name: xtensor-fftw
init-shell: bash
cache-downloads: true
condarc: |
channels:
- conda-forge
channel_priority: strict
create-args: >-
cmake
ninja
xtl
xtensor
fftw
gtest
- name: Configure using CMake
run: cmake -G Ninja -Bbuild -DBUILD_TESTS=ON -DCMAKE_PREFIX_PATH=$CONDA_PREFIX ${{ matrix.extra-cmake-args }}
- name: Build
working-directory: build
run: cmake --build . --target test_xtensor-fftw --parallel 2
- name: Run tests (Unix)
if: matrix.os != 'windows-latest'
working-directory: build/test
run: ./test_xtensor-fftw
- name: Run tests (Windows)
if: matrix.os == 'windows-latest'
working-directory: build/test
run: ./test_xtensor-fftw.exe