Skip to content

Commit

Permalink
[CI] Add options to control whether workflow_dispatch assert + build …
Browse files Browse the repository at this point in the history
…mode. (#6549)
  • Loading branch information
dtzSiFive authored Jan 5, 2024
1 parent 78973a8 commit c8a2514
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/uploadReleaseArtifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ on:
- linux
- macos
- windows

# The following options only influence workflow_dispatch, and are ignored otherwise.
runTests:
type: choice
description: Run CIRCT tests
default: false
type: boolean

llvm_enable_assertions:
description: Build with assertions.
default: false
type: boolean

cmake_build_type:
required: true
type: choice
options:
- true
- false
- release
- relwithdebinfo
- debug
default: release

# Run every day at 0700 UTC which is:
# - 0000 PDT / 2300 PST
# - 0300 EDT / 0200 EST
Expand Down Expand Up @@ -123,10 +137,18 @@ jobs:
- name: Add Build Config for firtool and om-linker
id: add-build-config-firtool
run: |
# Default configuration template.
json='{"name":"firtool","install_target":"install-firtool install-om-linker","package_name_prefix":"firrtl-bin","mode":"release","assert":"OFF","shared":"OFF","stats":"ON"}'
if [[ ${{ github.event_name }} == 'schedule' ]] || [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
json=$(echo $json | jq -c '.assert = "ON" | .mode = "relwithdebinfo"')
fi
case ${{ github.event_name }} in
# Workflow dispatch looks to input knobs for asserts and build type.
workflow_dispatch)
json=$(echo $json | jq -c '.assert = "${{ inputs.llvm_enable_assertions && 'ON' || 'OFF' }}" | .mode = "${{ inputs.cmake_build_type }}"')
;;
# Scheulded runs are Release but with Asserts + Debug.
schedule)
json=$(echo $json | jq -c '.assert = "ON" | .mode = "relwithdebinfo"')
;;
esac
echo "out=$json" >> $GITHUB_OUTPUT
- name: Add Build Config for CIRCT-full (shared)
id: add-build-config-circt-full-shared
Expand Down

0 comments on commit c8a2514

Please sign in to comment.