Skip to content

Commit 7b615ae

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

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

.github/workflows/build_steps.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
@@ -83,7 +94,7 @@ jobs:
8394
maximum-size: 6GB
8495
disk-root: "D:" # This is also the checkout directory. Total size 12GB.
8596
continue-on-error: true
86-
97+
8798
- name: Extra envs
8899
# This has to come after msvc-dev-cmd to overwrite the bad VCPKG_ROOT it sets
89100
run: |
@@ -101,7 +112,7 @@ jobs:
101112
run: |
102113
du -m /mnt/usr/local/lib/ | sort -n | tail -n 50
103114
nohup rm -rf /mnt/usr/local/lib/android &
104-
115+
105116
- name: Find and remove ccache # See PR: #945
106117
if: matrix.os == 'windows'
107118
run: rm $(which ccache) || true
@@ -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
@@ -292,7 +316,7 @@ jobs:
292316
if: matrix.os == 'linux'
293317
run: |
294318
#there are cp313 and cp313t
295-
if [[ "${{env.python_impl_name}}" == "cp313" ]]; then
319+
if [[ "${{env.python_impl_name}}" == "cp313" ]]; then
296320
echo /opt/python/cp313-cp313/bin >> $GITHUB_PATH;
297321
else
298322
echo /opt/python/${{env.python_impl_name}}*/bin >> $GITHUB_PATH;
@@ -350,7 +374,7 @@ jobs:
350374
gcp_secret_key: "${{ secrets.GCP_S3_SECRET_KEY }}"
351375
persistent_storage: "${{ inputs.persistent_storage }}"
352376
strategy_branch: "${{ env.distinguishing_name }}"
353-
377+
354378
- name: Set s3 sts persistent storage variables for Windows
355379
if: ${{ env.real_tests_enabled != 'no' && matrix.os == 'windows' }}
356380
uses: ./.github/actions/set_s3_sts_persistent_storage_env_vars

0 commit comments

Comments
 (0)