[pre-commit.ci] pre-commit autoupdate #520
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: Check build | |
on: ["push", "pull_request"] | |
env: | |
CMEEL_LOG_LEVEL: DEBUG | |
jobs: | |
build: | |
name: Build ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: "${{ matrix.os }}-latest" | |
strategy: | |
matrix: | |
os: ["ubuntu", "macos"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: setup | |
run: | | |
python -m pip install -U pip | |
python -m pip install wheel | |
- name: build cmeel wheel | |
run: python -m pip wheel -vw wh . | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "artifact-${{ matrix.os }}-${{ matrix.python-version }}" | |
path: wh | |
test: | |
needs: ["build"] | |
name: Test ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: "${{ matrix.os }}-latest" | |
strategy: | |
matrix: | |
os: ["ubuntu", "macos"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/download-artifact@v4 | |
- run: mkdir /tmp/wh | |
- run: mv -n artifact-*/* /tmp/wh | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: setup | |
run: | | |
python -m pip install -U pip | |
python -m pip install wheel simple503 | |
python -m simple503 --sort --base-url /tmp/wh /tmp/wh | |
python -m pip install -U pip | |
- name: install wheel | |
run: python -m pip install -i "file:///tmp/wh" cmeel-example | |
- name: test binary | |
run: cmeel-add 3 4 | |
- name: test module | |
run: python -c "import cmeel_example; assert cmeel_example.cmeel_add(3, 4) == 7" | |
env: | |
PYTHONWARNINGS: error |