Feat: Option to manually specify the build type in the workflow (#2034)
* Python bindings: Fix upload-artifact actions * Github Action: Enable workflow_dispatch to manually trigger jobs to produce either Debug or Release builds
This commit is contained in:
14
.github/workflows/build-uc2.yml
vendored
14
.github/workflows/build-uc2.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
name: Build UC2
|
name: Build UC2
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
buildType:
|
||||||
|
description: 'Build Type'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- 'Debug'
|
||||||
|
- 'Release'
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
@@ -15,8 +25,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Build Debug mode if not tag release
|
# Specify build type either according to the tag release or manual override
|
||||||
BUILD_TYPE: ${{ startsWith(github.ref, 'refs/tags') && 'Release' || 'Debug' }}
|
BUILD_TYPE: ${{ inputs.buildType != '' && inputs.buildType || startsWith(github.ref, 'refs/tags') && 'Release' || 'Debug' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Windows:
|
Windows:
|
||||||
|
|||||||
19
.github/workflows/build-wheels-publish.yml
vendored
19
.github/workflows/build-wheels-publish.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
name: Build wheels with cibuildwheel
|
name: Build wheels with cibuildwheel
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
debugMode:
|
||||||
|
description: 'Debug Mode'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- '0'
|
||||||
|
- '1'
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
@@ -15,8 +25,8 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Enable DEBUG flag if not tag release
|
# Enable DEBUG flag either according to the tag release or manual override
|
||||||
UNICORN_DEBUG: ${{ startsWith(github.ref, 'refs/tags') && '0' || '1' }}
|
UNICORN_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || startsWith(github.ref, 'refs/tags') && '0' || '1' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# job to be executed for every push - testing purpose
|
# job to be executed for every push - testing purpose
|
||||||
@@ -160,7 +170,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}-py38
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
# Job to be executed to build all wheels for all platforms/architectures/python versions only for tag release
|
# Job to be executed to build all wheels for all platforms/architectures/python versions only for tag release
|
||||||
@@ -315,7 +325,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}-all
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
make_sdist:
|
make_sdist:
|
||||||
@@ -335,6 +345,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: sdist-archive
|
||||||
path: bindings/python/dist/*.tar.gz
|
path: bindings/python/dist/*.tar.gz
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
|
|||||||
Reference in New Issue
Block a user