Skip to content

Commit

Permalink
Add strategies matrix input. See #276
Browse files Browse the repository at this point in the history
  • Loading branch information
kwk committed Feb 26, 2024
1 parent 81f1545 commit 0e818de
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/testing-farm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
os-versions: ${{ steps.get-os-versions-step.outputs.os_versions }}
strategies: ${{ steps.get-os-versions-step.outputs.strategies }}
steps:
- id: get-os-versions-step
run: |
Expand All @@ -53,17 +54,25 @@ jobs:
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.os-version }}" != "all" ]]; then
os_versions="[\"${{ github.event.inputs.os-version }}\"]"
fi
echo "os_versions=$os_versions" >> $GITHUB_OUTPUT
# Convert strategies from bash array to json
strategies=(big-merge standalone bootstrap)
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.strategy }}" != "all" ]]; then
strategies=(${{ github.event.inputs.strategy }})
fi
strategies_json=`jq -c -n '$ARGS.positional' --args "${strategies[@]}"`
echo "strategies=$strategies_json" >> $GITHUB_OUTPUT
run-testing-farm:
needs: get-os-details-job
name: run
strategy:
fail-fast: false
matrix:
os-version: ${{ fromJSON(needs.get-os-details-job.outputs.os-versions) }}
strategy: [standalone, big-merge, bootstrap]
strategy: ${{ fromJSON(needs.get-os-details-job.outputs.strategies) }}
include:
- strategy: standalone
copr_project_tpl: "llvm-snapshots-incubator-YYYYMMDD"
Expand Down

0 comments on commit 0e818de

Please sign in to comment.