Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
BhavyeMathur authored Mar 27, 2024
1 parent 4df13b5 commit 628fa4d
Showing 1 changed file with 5 additions and 55 deletions.
60 changes: 5 additions & 55 deletions .github/workflows/build-goopylib.yml
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
Expand All @@ -20,7 +19,6 @@ on:
- .github/workflows/build-goopylib.yml

pull_request:
branches: [ "master" ]
paths:
- src/**
- goopylib/**/*.cpp
Expand All @@ -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}}
Expand All @@ -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/

0 comments on commit 628fa4d

Please sign in to comment.