-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.21 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
name: Test with example
on: ["push", "pull_request"]
jobs:
test:
name: Test ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os}}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8","3.9","3.10", "3.11"]
env:
SYSTEM_VERSION_COMPAT: 0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: setup
run: |
python -m pip install -U pip
python -m pip install -U wheel
- name: build cmeel wheel
run: python -m pip wheel -w $HOME/wh .
- name: install cmeel
run: python -m pip install $HOME/wh/cmeel*.whl
- name: build cmeel-example wheel
run: python -m pip wheel -w $HOME/wh git+https://github.com/cmake-wheel/cmeel-example
- name: install cmeel-example
run: python -m pip install $HOME/wh/cmeel_example*.whl
- name: test module
run: python -c "import cmeel_example; assert cmeel_example.cmeel_add(3, 4) == 7"
- name: test executable
run: cmeel-add 3 4
- name: save artifacts
run: mkdir wh && cp $HOME/wh/cmeel*.whl wh/