|
17 | 17 | GITHUB_ACTIONS_SKIP_NOTIFICATIONS: true |
18 | 18 | ACTIONS_STEP_DEBUG: false |
19 | 19 | GITHUB_ACTIONS_NOTIFICATIONS: false |
20 | | - |
| 20 | + |
21 | 21 | jobs: |
22 | 22 | build_and_test: |
23 | 23 | name: Build and test on ${{ matrix.os }} with Python ${{ matrix.python-version }} |
24 | 24 | runs-on: ${{ matrix.os }} |
25 | 25 | strategy: |
26 | 26 | fail-fast: false # Continue with other jobs if one fails |
27 | 27 | matrix: |
28 | | - os: [ubuntu-latest, macos-latest] |
| 28 | + os: [ubuntu-latest, macos-latest, windows-latest] |
29 | 29 | python-version: ['3.11'] |
30 | 30 |
|
31 | 31 | steps: |
|
63 | 63 | run: | |
64 | 64 | python -m venv .venv |
65 | 65 | echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV |
66 | | - echo "$PWD/.venv/bin" >> $GITHUB_PATH |
| 66 | + |
| 67 | + - name: Set PATH for Unix |
| 68 | + if: matrix.os != 'windows-latest' |
| 69 | + run: echo "$PWD/.venv/bin" >> $GITHUB_PATH |
| 70 | + |
| 71 | + - name: Set PATH for Windows |
| 72 | + if: matrix.os == 'windows-latest' |
| 73 | + run: echo "$PWD/.venv/Scripts" >> $GITHUB_PATH |
| 74 | + shell: bash |
67 | 75 |
|
68 | 76 | - name: Install dependencies for testing |
69 | 77 | run: | |
|
78 | 86 | - name: Build and install package with maturin |
79 | 87 | uses: PyO3/maturin-action@v1 |
80 | 88 | with: |
81 | | - target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || 'x86_64' }} |
| 89 | + target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || (matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64') }} |
82 | 90 | command: develop |
83 | 91 | args: --release |
84 | 92 | sccache: 'true' |
|
90 | 98 | - name: Build wheel |
91 | 99 | uses: PyO3/maturin-action@v1 |
92 | 100 | with: |
93 | | - target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || 'x86_64' }} |
| 101 | + target: ${{ matrix.os == 'macos-latest' && 'universal2-apple-darwin' || (matrix.os == 'windows-latest' && 'x86_64-pc-windows-msvc' || 'x86_64') }} |
94 | 102 | command: build |
95 | 103 | args: --release |
96 | 104 | sccache: 'true' |
|
0 commit comments