Merge pull request #998 from darshan-hpc/snyder/pydarshan-report-in-docs #432
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Wheels | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- darshan-util/** | |
- include/** | |
- .github/workflows/build_wheels.yml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- darshan-util/** | |
- include/** | |
- .github/workflows/build_wheels.yml | |
workflow_dispatch: | |
jobs: | |
get_commit_message: | |
name: Get commit message | |
runs-on: ubuntu-latest | |
if: github.repository == 'darshan-hpc/darshan' | |
outputs: | |
message: ${{ steps.commit_message.outputs.message }} | |
steps: | |
- name: Checkout darshan | |
uses: actions/checkout@v3 | |
# 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 "::set-output name=message::$COMMIT_MSG" | |
echo github.ref ${{ github.ref }} | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
needs: get_commit_message | |
if: >- | |
contains(needs.get_commit_message.outputs.message, '[wheel build]') || | |
github.event_name == 'workflow_dispatch' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-13] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.17.0 | |
with: | |
package-dir: ./darshan-util/pydarshan | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: ./wheelhouse/*.whl |