[pre-commit.ci] pre-commit autoupdate #567
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"' |