-
Notifications
You must be signed in to change notification settings - Fork 20
51 lines (46 loc) · 1.36 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
49
50
51
name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']
# https://stackoverflow.com/questions/57810623/how-to-select-the-c-c-compiler-used-for-a-github-actions-job:
compiler: [gcc, clang, cl]
exclude:
# ubuntu: gcc
- os: ubuntu-latest
compiler: clang
- os: ubuntu-latest
compiler: cl
# mac: gcc, clang
- os: macos-latest
compiler: cl
# win: cl
- os: windows-latest
compiler: clang
- os: windows-latest
compiler: gcc
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Print machine info
run: |
uname -a
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: ilammy/msvc-dev-cmd@v1
- name: Test with CC=${{ matrix.compiler }}
env:
CC: ${{ matrix.compiler }}
run: |
make test