Skip to content

Commit

Permalink
Github Action: Enable workflow_dispatch to manually trigger jobs to p…
Browse files Browse the repository at this point in the history
…roduce either Debug or Release builds
  • Loading branch information
Antelox committed Oct 17, 2024
1 parent 9334d22 commit 3bd1cbe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build-uc2.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Build UC2

on:
workflow_dispatch:
inputs:
buildType:
description: 'Build Type'
required: false
default: ''
type: choice
options:
- 'Debug'
- 'Release'
push:
paths-ignore:
- ".gitignore"
Expand All @@ -15,8 +25,8 @@ on:
pull_request:

env:
# Build Debug mode if not tag release
BUILD_TYPE: ${{ startsWith(github.ref, 'refs/tags') && 'Release' || 'Debug' }}
# Specify build type either according to the tag release or manual override
BUILD_TYPE: ${{ inputs.buildType != '' && inputs.buildType || startsWith(github.ref, 'refs/tags') && 'Release' || 'Debug' }}

jobs:
Windows:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build-wheels-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Build wheels with cibuildwheel

on:
workflow_dispatch:
inputs:
debugMode:
description: 'Debug Mode'
required: false
default: ''
type: choice
options:
- '0'
- '1'
push:
paths-ignore:
- ".gitignore"
Expand All @@ -15,8 +25,8 @@ on:
pull_request:

env:
# Enable DEBUG flag if not tag release
UNICORN_DEBUG: ${{ startsWith(github.ref, 'refs/tags') && '0' || '1' }}
# Enable DEBUG flag either according to the tag release or manual override
UNICORN_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || startsWith(github.ref, 'refs/tags') && '0' || '1' }}

jobs:
# job to be executed for every push - testing purpose
Expand Down

0 comments on commit 3bd1cbe

Please sign in to comment.