-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1.44 KB
/
docker.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
name: Test docker builds
on: ["push", "pull_request"]
jobs:
docker:
name: "Test docker on ${{ matrix.image }}_${{ matrix.arch }}"
runs-on: "ubuntu-latest"
strategy:
matrix:
image: ["manylinux2014", "musllinux_1_1"]
arch: ["x86_64"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
- name: setup
run: python -m pip install -U pip
- name: install cmeel
run: python -m pip install .
- name: clone cmeel-example
run: git clone --recursive -j2 https://github.com/cmake-wheel/cmeel-example
- name: build a manylinux wheel for cmeel-example
run: >
python -m cmeel -vvv docker -UC $PWD/cmeel-example -p python3.10
-i "quay.io/pypa/${{ matrix.image }}_${{ matrix.arch }}"
- name: install and test it
if: matrix.image == 'manylinux2014'
run: |
python -m pip install cmeel-example/wh/cmeel_example*.whl
python -c "import cmeel_example; assert cmeel_example.cmeel_add(3, 4) == 7"
- name: install and test it
if: matrix.image == 'musllinux_1_1'
run: >
docker run --rm -v "$PWD/cmeel-example/wh:/wh" -t alpine:3.17 sh -c
'apk add py3-pip &&
python -m pip install /wh/cmeel_example*.whl &&
python -c "import cmeel_example; assert cmeel_example.cmeel_add(3, 4) == 7"'