Skip to content

Debugging to MacOS build failures #1112

Debugging to MacOS build failures

Debugging to MacOS build failures #1112

Workflow file for this run

name: Unit tests
on: [push, pull_request]
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test-python:
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
cc: clang
cxx: clang++
python-version: '3.12'
extras: disabled
runs-on: ${{ matrix.os }}
env:
SCCACHE_GHA_ENABLED: "true"
CXX: sccache ${{ matrix.cxx }}
# Don't error on deprecations: Xcode marks sprintf deprecated and Boost references it
CXXFLAGS: -Wno-error=deprecated-declarations
steps:
- name: Show environment
run: env
- name: Test running cargo
run: cargo --version
- uses: actions/checkout@v4
- name: Set up sccache
uses: mozilla-actions/[email protected]
- name: Install system packages
run: ./.ci/install-sys-pkgs.sh
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Python dependencies
run: ./.ci/py-requirements.sh
env:
CC: ${{ matrix.cc }} # Do not pass -Werror when building dependencies
- name: Install Python package
run: >-
pip install -v
--config-settings=setup-args=--native-file=ci.ini
--config-settings=setup-args=-Dwerror=true
--config-settings=setup-args=-Dauto_features=${{ matrix.extras }}
--config-settings=setup-args=-Dfmv="$(if [[ '${{ matrix.cxx }}' == g++* ]]; then echo enabled; else echo disabled; fi)"
.
- name: Run tests
run: pytest -v -ra # -ra summarises the reasons for skipping or failing tests
- name: Run shutdown tests
run: ./.ci/py-tests-shutdown.sh
cibuildwheel-macos:
strategy:
fail-fast: false
matrix:
os: [macos-14]
python: [cp312]
exclude:
# Python 3.8 not natively available for Apple Silicon. cibuildwheel
# tries to do a cross build, which fails.
- os: macos-14
python: cp38
runs-on: ${{ matrix.os }}
env:
SCCACHE_GHA_ENABLED: "true"
steps:
- name: show environment
run: env
- name: try running cargo
run: cargo --version
- uses: actions/checkout@v4
- name: Set up sccache
uses: mozilla-actions/[email protected]
- uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python }}-macos*
- uses: actions/upload-artifact@v4
with:
name: wheel_macos-${{ matrix.os }}-${{ matrix.python }}
path: ./wheelhouse/*.whl