Skip to content

Commit

Permalink
Partially replace the matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kwk committed Feb 5, 2024
1 parent 1957316 commit 35e9dcf
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/tmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ permissions:
actions: write

jobs:
osmatrix:
osversions:
runs-on: ubuntu-latest
container:
image: "fedora:rawhide"
outputs:
matrix: ${{ steps.osmatrix.outputs.matrix }}
matrix: ${{ steps.osversions.outputs.osversions }}
steps:
- uses: actions/checkout@v4

Expand All @@ -37,33 +37,28 @@ jobs:
run: |
dnf install -y copr-cli
- id: osmatrix
- id: osversions
shell: bash -e {0}
run: |
source scripts/functions.sh
# Get OS versions comma separated with properly quoted rawhide
os_versions=`get_os_versions | paste -sd "," - | sed 's/rawhide/"rawhide"/'`
cat <<EOF > /tmp/osmatrix
matrix={
"version": [$os_versions]
"strategy": [standalone, big-merge, bootstrap],
"include": [
{"strategy": "standalone", "copr_project_tpl": "llvm-snapshots-incubator-YYYYMMDD"},
{"strategy": "big-merge", "copr_project_tpl": "llvm-snapshots-big-merge-YYYYMMDD"},
{"strategy": "bootstrap", "copr_project_tpl": "llvm-snapshots-bootstrap-YYYYMMDD"}
]
}
EOF
# Store the output
cat /tmp/osmatrix | tr '\n' ' ' >> $GITHUB_OUTPUT
echo os_versions=`get_os_versions | paste -sd "," - | sed 's/rawhide/"rawhide"/'` >> $GITHUB_OUTPUT
run-tmt:
needs: osmatrix
needs: osversions
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.osmatrix.outputs.matrix) }}
matrix:
os: [fedora]
version: ${{ fromJSON(needs.osversions.outputs.osversions) }}
strategy: [standalone, big-merge, bootstrap]
include:
- strategy: standalone
copr_project_tpl: "llvm-snapshots-incubator-YYYYMMDD"
- strategy: big-merge
copr_project_tpl: "llvm-snapshots-big-merge-YYYYMMDD"
- strategy: bootstrap
copr_project_tpl: "llvm-snapshots-bootstrap-YYYYMMDD"
runs-on: ubuntu-latest
container:
image: "${{ matrix.os }}:${{ matrix.version }}"
Expand Down

0 comments on commit 35e9dcf

Please sign in to comment.