Skip to content

Commit 7346181

Browse files
committed
Implement build steps
Signed-off-by: Julien Jerphanion <[email protected]>
1 parent 88d778a commit 7346181

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

.github/workflows/build_steps.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- ${{fromJSON(inputs.matrix)[0]}} # The items after 0 are for tests only
3535

3636
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}}
3838
env:
3939
# 0 - uses S3 Cache, 1 - uses GHA cache
4040
# this way the external PRs can use the GHA cache
@@ -74,6 +74,17 @@ jobs:
7474

7575
- name: Configure sccache
7676
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
7788
7889
- name: Windows Pagefile
7990
if: matrix.os == 'windows'
@@ -144,6 +155,8 @@ jobs:
144155
configurePreset: ${{env.ARCTIC_CMAKE_PRESET}}
145156
configurePresetAdditionalArgs: "['-DVCPKG_INSTALL_OPTIONS=--clean-after-build']"
146157
buildPreset: ${{env.ARCTIC_CMAKE_PRESET}}
158+
env:
159+
SCCACHE_DIR: ${{env.SCCACHE_DIR || ''}}
147160

148161
- name: Compile C++ tests
149162
if: inputs.job_type == 'cpp-tests'
@@ -201,9 +214,20 @@ jobs:
201214
202215
- name: Build wheel
203216
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}}
205226
env:
206227
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 || ''}}
207231

208232
- name: Store wheel artifact
209233
if: inputs.job_type == 'build-python-wheels'
@@ -272,8 +296,8 @@ jobs:
272296
container: ${{matrix.os == 'linux' && matrix.container || null}}
273297
defaults:
274298
run: {shell: bash}
275-
services: ${{matrix.test_services}}
276299
env:
300+
SCCACHE_GHA_ENABLED: "true"
277301
python_impl_name: ${{needs.compile.outputs.python_impl_name}}
278302
distinguishing_name: ${{matrix.os}}-${{needs.compile.outputs.python_impl_name}}-${{matrix.type}}${{matrix.python_deps_id}}
279303
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

0 commit comments

Comments
 (0)