BhavyeMathur building goopylib #50
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
# This workflow builds a shared library for goopylib using CMake | |
name: "Build Binary & Wheels" | |
run-name: ${{ github.actor }} building goopylib | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master" ] | |
paths: | |
- src/** | |
- goopylib/** | |
- CMakeLists.txt | |
- setup.py | |
- tools/setup_extensions.py | |
- pyproject.toml | |
- MANIFEST.in | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- src/** | |
- goopylib/** | |
- CMakeLists.txt | |
- setup.py | |
- tools/setup_extensions.py | |
- pyproject.toml | |
- MANIFEST.in | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-cmake: | |
name: Build with CMake on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v1 | |
- name: Configure submodules | |
run: git submodule update --init --recursive | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build goopylib | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 8 --target goopylib | |
- name: Upload Binaries | |
uses: test-room-7/action-update-file@v1 | |
with: | |
file-path: binaries/**/*.* | |
branch: master | |
allow-dot: true | |
commit-msg: Uploaded auto-built binaries | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
build-wheels: | |
name: Build Python wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: build-cmake | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure submodules | |
run: git submodule update --init --recursive | |
- name: Build Python wheels | |
uses: pypa/[email protected] |