-
Notifications
You must be signed in to change notification settings - Fork 28
62 lines (56 loc) · 1.55 KB
/
build_wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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