Skip to content

Commit

Permalink
Merge pull request #474 from antmicro/umarcor/ci/matrices
Browse files Browse the repository at this point in the history
ci/Suite: combine matrices
  • Loading branch information
tmichalak authored Sep 5, 2022
2 parents 3688578 + 4d436e2 commit 8ca0b7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
6 changes: 2 additions & 4 deletions .github/scripts/generate_job_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,5 @@
dict(project=project, toolchain=toolchain, board=board)
)

# Different matrices need to be produced to overcome the 256 jobs limit imposed
# by GH actions
for tool, matrix in jobs.items():
print(f"::set-output name=matrix_{tool.replace('-', '_')}:: {matrix}")
matrices = {tool.replace('-', '_'): content for tool, content in jobs.items()}
print(f"::set-output name=matrices::{matrices}")
34 changes: 12 additions & 22 deletions .github/workflows/Suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,7 @@ jobs:
Matrix:
runs-on: ubuntu-latest
outputs:
matrix_vpr: ${{ steps.generate.outputs.matrix_vpr }}
matrix_vpr_fasm2bels: ${{ steps.generate.outputs.matrix_vpr_fasm2bels }}
matrix_vivado: ${{ steps.generate.outputs.matrix_vivado }}
matrix_yosys_vivado: ${{ steps.generate.outputs.matrix_yosys_vivado }}
matrix_yosys_vivado_uhdm: ${{ steps.generate.outputs.matrix_yosys_vivado_uhdm }}
matrix_nextpnr_fpga_interchange: ${{ steps.generate.outputs.matrix_nextpnr_fpga_interchange }}
matrix_nextpnr_ice40: ${{ steps.generate.outputs.matrix_nextpnr_ice40 }}
matrix_nextpnr_nexus: ${{ steps.generate.outputs.matrix_nextpnr_nexus }}
matrix_nextpnr_xilinx: ${{ steps.generate.outputs.matrix_nextpnr_xilinx }}
matrix_nextpnr_xilinx_fasm2bels: ${{ steps.generate.outputs.matrix_nextpnr_xilinx_fasm2bels }}
matrix_quicklogic: ${{ steps.generate.outputs.matrix_quicklogic }}
matrices: ${{ steps.generate.outputs.matrices }}
link: ${{ steps.link.outputs.link }}

steps:
Expand Down Expand Up @@ -63,7 +53,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_vpr) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).vpr }}

container: ubuntu:focal

Expand Down Expand Up @@ -102,7 +92,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_vpr_fasm2bels) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).vpr_fasm2bels }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down Expand Up @@ -145,7 +135,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_quicklogic) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).quicklogic }}

container: ubuntu:focal

Expand Down Expand Up @@ -185,7 +175,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_vivado) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).vivado }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down Expand Up @@ -227,7 +217,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_yosys_vivado) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).yosys_vivado }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down Expand Up @@ -269,7 +259,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_yosys_vivado_uhdm) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).yosys_vivado_uhdm }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down Expand Up @@ -312,7 +302,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_nextpnr_fpga_interchange) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).nextpnr_fpga_interchange }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down Expand Up @@ -354,7 +344,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_nextpnr_ice40) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).nextpnr_ice40 }}

container: ubuntu:focal

Expand Down Expand Up @@ -393,7 +383,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_nextpnr_nexus) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).nextpnr_nexus }}

container: ubuntu:focal

Expand Down Expand Up @@ -432,7 +422,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_nextpnr_xilinx) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).nextpnr_xilinx }}

container: ubuntu:focal

Expand Down Expand Up @@ -471,7 +461,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix_nextpnr_xilinx_fasm2bels) }}
include: ${{ fromJson(needs.Matrix.outputs.matrices).nextpnr_xilinx_fasm2bels }}

env:
GHA_EXTERNAL_DISK: "tools"
Expand Down

0 comments on commit 8ca0b7e

Please sign in to comment.