pdm based build system pre-built wheels #20
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: LTTBC Package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install dependencies | |
run: python -m pip install --upgrade pdm | |
- name: Add msbuild to PATH | |
if: ${{ runner.os == 'Windows' }} | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build package | |
run: pdm build -v | |
- name: Install | |
if: ${{ matrix.python-version == '3.12' }} | |
run: pdm install -G:all | |
- name: Test with pytest | |
if: ${{ matrix.python-version == '3.12' }} | |
run: pdm test | |
- name: Lint | |
if: ${{ matrix.python-version == '3.12' }} | |
run: pdm lint | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-py${{ matrix.python-version }}-${{ matrix.os }} | |
path: dist | |
retention-days: 5 | |
combine_wheels: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download wheels artifact | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: 'true' | |
path: wheels | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels | |
path: wheels | |
retention-days: 5 |