-
Notifications
You must be signed in to change notification settings - Fork 27
48 lines (39 loc) · 1.31 KB
/
build.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
---
name: build
on: [push, pull_request]
jobs:
test:
name: ${{ matrix.os }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
# this will set the system compiler;
# I don't know how to set the conda compilers for windows
# This must be done *before* setting up miniconda, see:
# https://github.com/ilammy/msvc-dev-cmd/issues/34
- name: Set windows env
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/workflows/environment.yaml
- name: Build unix
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash -l {0}
run: .github/workflows/build_unix.sh
- name: Build win
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: .github/workflows/build_win.bat
- name: Run tests
shell: bash -l {0}
run: python -m unittest discover -s src/python/test -v