ci: concurrecy for cancelling simultaneous jobs #11
This file contains hidden or 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: Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| package: | |
| runs-on: ubuntu-latest | |
| name: Building wheels | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade setuptools build | |
| - name: Fetch and compile wheels | |
| run: | | |
| make | |
| - name: Upload wheel artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: packaged-wheels.zip | |
| path: ./dist | |
| test: | |
| needs: package | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # The platform tags follow the Python wheel naming conventions | |
| - os: macos-latest | |
| platform-tag: py3-none-macosx_aarch64 | |
| - os: ubuntu-latest | |
| platform-tag: py3-none-linux_x86_64 | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Download wheel artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: packaged-wheels.zip | |
| - name: Install wheel | |
| run: | | |
| python3 -m pip install ./*-${{ matrix.platform-tag }}.whl | |
| - name: Test | |
| run: | | |
| python3 -c "import xspectrampoline" |