-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4df13b5
commit 628fa4d
Showing
1 changed file
with
5 additions
and
55 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
# This workflow builds a shared library for goopylib using CMake & Python wheels | ||
|
||
name: "Build Binary & Wheels" | ||
name: "Build Binary" | ||
run-name: ${{ github.actor }} building goopylib | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: [ "master" ] | ||
paths: | ||
- src/** | ||
- goopylib/**/*.cpp | ||
|
@@ -20,7 +19,6 @@ on: | |
- .github/workflows/build-goopylib.yml | ||
|
||
pull_request: | ||
branches: [ "master" ] | ||
paths: | ||
- src/** | ||
- goopylib/**/*.cpp | ||
|
@@ -47,10 +45,10 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Configure submodules | ||
run: git submodule update --init --recursive | ||
- uses: actions/setup-node@v4 | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
@@ -62,55 +60,7 @@ jobs: | |
uses: test-room-7/action-update-file@v1 | ||
with: | ||
file-path: binaries/**/*.* | ||
branch: master | ||
branch: ${{ github.ref_name }} | ||
allow-dot: true | ||
commit-msg: Uploaded auto-built binaries | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-source-distribution: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Install dependencies | ||
run: python -m pip install build | ||
|
||
- name: Create source distribution | ||
run: python -m build --sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: goopylib-source-distribution | ||
path: dist/ | ||
|
||
build-wheels: | ||
name: Build ${{ matrix.os }} Python wheels | ||
runs-on: ${{ matrix.os }} | ||
needs: build-cmake | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ windows-latest, macos-latest ] | ||
python: [ "cp38-", "cp39-", "cp310-", "cp311-" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Build Python wheels | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}* | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: goopylib-${{ matrix.python }}${{ matrix.os }}-wheels | ||
path: wheelhouse/ |