|
34 | 34 | - ${{fromJSON(inputs.matrix)[0]}} # The items after 0 are for tests only
|
35 | 35 |
|
36 | 36 | runs-on: ${{ matrix.distro}}
|
37 |
| - container: ${{ (matrix.os == 'linux' && inputs.job_type != 'build-python-wheels') && matrix.container || null}} |
| 37 | + container: ${{matrix.os == 'linux' && matrix.container || null}} |
38 | 38 | env:
|
39 | 39 | # 0 - uses S3 Cache, 1 - uses GHA cache
|
40 | 40 | # this way the external PRs can use the GHA cache
|
|
74 | 74 |
|
75 | 75 | - name: Configure sccache
|
76 | 76 | uses: mozilla-actions/[email protected]
|
| 77 | + with: |
| 78 | + version: "v0.10.0" |
| 79 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 80 | + |
| 81 | + - name: Setup macOS build environment |
| 82 | + if: matrix.os == 'macos' |
| 83 | + run: | |
| 84 | + brew install cmake ninja |
| 85 | + brew install sccache |
| 86 | + echo "SCCACHE_DIR=/tmp/sccache" >> $GITHUB_ENV |
| 87 | + mkdir -p /tmp/sccache |
77 | 88 |
|
78 | 89 | - name: Windows Pagefile
|
79 | 90 | if: matrix.os == 'windows'
|
@@ -144,6 +155,8 @@ jobs:
|
144 | 155 | configurePreset: ${{env.ARCTIC_CMAKE_PRESET}}
|
145 | 156 | configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build']"
|
146 | 157 | buildPreset: ${{env.ARCTIC_CMAKE_PRESET}}
|
| 158 | + env: |
| 159 | + SCCACHE_DIR: ${{env.SCCACHE_DIR || ''}} |
147 | 160 |
|
148 | 161 | - name: Compile C++ tests
|
149 | 162 | if: inputs.job_type == 'cpp-tests'
|
@@ -201,9 +214,20 @@ jobs:
|
201 | 214 |
|
202 | 215 | - name: Build wheel
|
203 | 216 | if: inputs.job_type == 'build-python-wheels'
|
204 |
| - run: pipx run cibuildwheel==${{inputs.cibw_version}} |
| 217 | + run: | |
| 218 | + if [ "${{matrix.os}}" = "macos" ]; then |
| 219 | + # For macOS, we need to set up the build environment |
| 220 | + brew install cmake ninja |
| 221 | + # Set up Python environment |
| 222 | + python3 -m pip install --upgrade pip |
| 223 | + pip3 install cibuildwheel==${{inputs.cibw_version}} |
| 224 | + fi |
| 225 | + pipx run cibuildwheel==${{inputs.cibw_version}} |
205 | 226 | env:
|
206 | 227 | CIBW_MANYLINUX_X86_64_IMAGE: ${{inputs.cibw_image_tag}}
|
| 228 | + CIBW_MACOSX_DEPLOYMENT_TARGET: "11.0" |
| 229 | + CIBW_ARCHS_MACOS: "x86_64 arm64" |
| 230 | + SCCACHE_DIR: ${{env.SCCACHE_DIR || ''}} |
207 | 231 |
|
208 | 232 | - name: Store wheel artifact
|
209 | 233 | if: inputs.job_type == 'build-python-wheels'
|
@@ -272,8 +296,8 @@ jobs:
|
272 | 296 | container: ${{matrix.os == 'linux' && matrix.container || null}}
|
273 | 297 | defaults:
|
274 | 298 | run: {shell: bash}
|
275 |
| - services: ${{matrix.test_services}} |
276 | 299 | env:
|
| 300 | + SCCACHE_GHA_ENABLED: "true" |
277 | 301 | python_impl_name: ${{needs.compile.outputs.python_impl_name}}
|
278 | 302 | distinguishing_name: ${{matrix.os}}-${{needs.compile.outputs.python_impl_name}}-${{matrix.type}}${{matrix.python_deps_id}}
|
279 | 303 | ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
|
0 commit comments