|
1 | | -name: build |
| 1 | +name: Build python-oracledb packages |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | tags: |
6 | 6 | - v* |
7 | 7 | workflow_dispatch: |
| 8 | + inputs: |
| 9 | + tgt: |
| 10 | + description: List of package targets to build |
| 11 | + default: 'Linux, macOS, Windows, Source' |
| 12 | + required: false |
8 | 13 |
|
9 | 14 | jobs: |
10 | 15 |
|
11 | 16 | build_source_package: |
12 | 17 | name: Build source package |
| 18 | + if: contains(inputs.tgt, 'Source') || inputs.tgt == '' |
13 | 19 | runs-on: ubuntu-latest |
14 | 20 | steps: |
15 | 21 |
|
|
36 | 42 |
|
37 | 43 | build_linux_wheels: |
38 | 44 | name: Build wheels for Linux |
| 45 | + if: contains(inputs.tgt, 'Linux') || inputs.tgt == '' |
39 | 46 | runs-on: ${{ matrix.os }} |
40 | 47 | strategy: |
41 | 48 | matrix: |
@@ -82,12 +89,13 @@ jobs: |
82 | 89 | name: Linux_${{ matrix.platform }}_wheels |
83 | 90 | path: dist/*.whl |
84 | 91 |
|
85 | | - build_non_linux_wheels: |
| 92 | + build_macos_wheels: |
86 | 93 | name: Build wheels for ${{ matrix.os }} Python-${{ matrix.python-version}}-${{ matrix.arch }} |
| 94 | + if: contains(inputs.tgt, 'macOS') || inputs.tgt == '' |
87 | 95 | runs-on: ${{ matrix.os }} |
88 | 96 | strategy: |
89 | 97 | matrix: |
90 | | - os: [windows-latest, macos-latest] |
| 98 | + os: [macos-latest] |
91 | 99 | python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] |
92 | 100 | arch: ['x86', ''] |
93 | 101 | exclude: |
@@ -118,9 +126,44 @@ jobs: |
118 | 126 | name: python-oracledb-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.arch }} |
119 | 127 | path: dist/*.whl |
120 | 128 |
|
| 129 | + build_windows_wheels: |
| 130 | + name: Build wheels for ${{ matrix.os }} Python-${{ matrix.python-version}}-${{ matrix.arch }} |
| 131 | + if: contains(inputs.tgt, 'Windows') || inputs.tgt == '' |
| 132 | + runs-on: ${{ matrix.os }} |
| 133 | + strategy: |
| 134 | + matrix: |
| 135 | + os: [windows-latest] |
| 136 | + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] |
| 137 | + arch: ['x86', ''] |
| 138 | + |
| 139 | + steps: |
| 140 | + - uses: actions/checkout@v4 |
| 141 | + with: |
| 142 | + submodules: true |
| 143 | + |
| 144 | + - uses: actions/setup-python@v5 |
| 145 | + with: |
| 146 | + cache: 'pip' |
| 147 | + python-version: ${{ matrix.python-version }} |
| 148 | + architecture: ${{ matrix.arch }} |
| 149 | + allow-prereleases: true |
| 150 | + |
| 151 | + - name: Ensure build package is present |
| 152 | + run: python -m pip install build |
| 153 | + |
| 154 | + - name: Build wheel for Python ${{ matrix.python-version }} |
| 155 | + run: python -m build |
| 156 | + |
| 157 | + - name: Upload the artifact |
| 158 | + uses: actions/upload-artifact@v4 |
| 159 | + with: |
| 160 | + name: python-oracledb-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.arch }} |
| 161 | + path: dist/*.whl |
| 162 | + |
121 | 163 | combine_artifacts: |
122 | 164 | name: Combine artifacts into single artifact |
123 | | - needs: [build_source_package, build_linux_wheels, build_non_linux_wheels] |
| 165 | + if: ${{ always() }} |
| 166 | + needs: [build_source_package, build_linux_wheels, build_macos_wheels, build_windows_wheels] |
124 | 167 | runs-on: ubuntu-latest |
125 | 168 |
|
126 | 169 | steps: |
|
0 commit comments