Skip to content

CI: Fix for musllinux #28

CI: Fix for musllinux

CI: Fix for musllinux #28

Workflow file for this run

# Build on every branch push, tag push, and pull request change:
# From: https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
# Also:
# https://github.com/airspeed-velocity/asv/blob/main/.github/workflows/build_wheels.yml
# include [wheel build] in the commit to trigger wheel builds
name: Build wheels
on: [push, pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
get_commit_message:
name: Get commit message
runs-on: ubuntu-latest
# Once it is ready to be merged
# if: "github.repository == 'd-SEAMS/pydSEAMSlib'"
outputs:
message: ${{ steps.commit_message.outputs.message }}
steps:
- name: Checkout pydSEAMSlib
uses: actions/checkout@v4
# Gets the correct commit message for pull request
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get commit message
id: commit_message
run: |
set -xe
COMMIT_MSG=$(git log --no-merges -1 --oneline)
echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT
echo github.ref ${{ github.ref }}
build_wheels:
name: Build wheels
needs: get_commit_message
if: >-
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
runs-on: ${{ matrix.os }}
env: # Boost needs 13.0
MACOSX_DEPLOYMENT_TARGET: '13.0'
CIBW_BEFORE_ALL_LINUX: "scripts/cibw_before_build.sh"
CIBW_BEFORE_ALL_MACOS: "scripts/cibw_before_build.sh"
strategy:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
# TODO: windows-2022
os: [ubuntu-24.04, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
# From https://github.com/pypa/cibuildwheel/discussions/989
- name: Install boost
if: ${{ runner.os == 'Windows' }}
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: 1.83.0
link: static
- name: Echo build platform
run: echo Building wheels for ${{ matrix.os }}
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ENVIRONMENT_WINDOWS: BOOST_ROOT='${{ steps.install-boost.outputs.BOOST_ROOT }}'
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
needs: get_commit_message
if: >-
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
shell: bash -l {0}
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz