| 1 | name: Windows x64 Build |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | pull_request: |
| 6 | types: |
| 7 | - opened |
| 8 | - synchronize |
| 9 | - reopened |
| 10 | jobs: |
| 11 | build: |
| 12 | |
| 13 | runs-on: windows-latest |
| 14 | strategy: |
| 15 | matrix: |
| 16 | python-version: ["3.9","3.10","3.11","3.12","3.13"] |
| 17 | |
| 18 | steps: |
| 19 | - uses: actions/checkout@v4 |
| 20 | - name: Set up Python ${{ matrix.python-version }} |
| 21 | uses: actions/setup-python@v5 |
| 22 | with: |
| 23 | python-version: ${{ matrix.python-version }} |
| 24 | - uses: ilammy/[email protected] |
| 25 | with: |
| 26 | arch: x64 |
| 27 | - name: Install dependencies |
| 28 | run: | |
| 29 | python -m pip install --upgrade pip |
| 30 | pip install numpy wheel |
| 31 | - name: Build extension |
| 32 | run: | |
| 33 | python --version |
| 34 | python -c "import struct; print(struct.calcsize('P') * 8)" |
| 35 | pip install build |
| 36 | python -m build |
| 37 | pip install . |
| 38 | pip list |
| 39 | - uses: actions/upload-artifact@v4 |
| 40 | with: |
| 41 | name: windows-artifacts-py-${{ matrix.python-version }} |
| 42 | path: dist/* |
| 43 | retention-days: 5 |
| 44 | |
| 45 | - name: Run skfmm tests |
| 46 | run: | |
| 47 | python -c 'import os; os.chdir(".."); import skfmm; print(skfmm.__version__)' |
| 48 | python -c 'import os; os.chdir(".."); import skfmm, sys; sys.exit(skfmm.test())' |
| 49 | |
| 50 | merge: |
| 51 | name: Merge artifacts |
| 52 | needs: [build] |
| 53 | runs-on: ubuntu-latest |
| 54 | steps: |
| 55 | - name: Checkout code |
| 56 | uses: actions/checkout@v4 |
| 57 | - uses: actions/download-artifact@v4 |
| 58 | with: |
| 59 | pattern: windows-* |
| 60 | merge-multiple: true |
| 61 | path: dist |
| 62 | |
| 63 | - uses: actions/upload-artifact@v4 |
| 64 | with: |
| 65 | name: windows-artifacts-merged |
| 66 | path: dist |