From 4dc5f2f580b00de2a705b3b74549078f5b681294 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Mon, 25 Apr 2022 23:03:11 +0200 Subject: [PATCH] ci: add job 'generate' Signed-off-by: Unai Martinez-Corral --- .github/workflows/build-packages.yml | 443 ++++++--------------------- 1 file changed, 89 insertions(+), 354 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 7a9407c6..832f8002 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -15,15 +15,82 @@ on: workflow_dispatch: schedule: - cron: '0 23 * * *' # run daily at 23:00 (UTC) + env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} ANACONDA_USER: ${{ secrets.ANACONDA_USER }} NUM_OF_JOBS: 70 + defaults: run: shell: bash + jobs: + + generate: + runs-on: ubuntu-latest + outputs: + jobs: ${{ steps.jobs.outputs.jobs }} + steps: + - name: 'Generate jobs' + id: jobs + shell: python + run: | + jobs = [ + { 'PACKAGE': "bit/icestorm", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #2 + { 'PACKAGE': "bit/prjtrellis", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #3 + { 'PACKAGE': "bit/prjoxide", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #4 + { 'PACKAGE': "bit/prjxray-db", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #5 + { 'PACKAGE': "bit/prjxray-tools", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #6 + { 'PACKAGE': "sim/icarus", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #7 + { 'PACKAGE': "sim/verilator", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #8 + { 'PACKAGE': "syn/quicklogic-yosys", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #13 + { 'PACKAGE': "syn/quicklogic-yosys-plugins", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #14 + { 'PACKAGE': "pnr/vtr", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #16 + { 'PACKAGE': "pnr/vtr-gui", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #17 + { 'PACKAGE': "pnr/vtr-optimized", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #18 + { 'PACKAGE': "pnr/symbiflow-vtr", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #19 + { 'PACKAGE': "pnr/symbiflow-vtr-gui", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #20 + { 'PACKAGE': "pnr/nextpnr/generic", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #25 + { 'PACKAGE': "pnr/nextpnr/fpga_interchange", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #27 + { 'PACKAGE': "bit/icestorm", 'OS_NAME': "osx", 'RUNS_ON': "macos-latest" }, #31 + { 'PACKAGE': "bit/prjtrellis", 'OS_NAME': "osx", 'RUNS_ON': "macos-latest" }, #32 + { 'PACKAGE': "sim/icarus", 'OS_NAME': "osx", 'RUNS_ON': "macos-latest" }, #33 + { 'PACKAGE': "sim/verilator", 'OS_NAME': "osx", 'RUNS_ON': "macos-latest" }, #34 + { 'PACKAGE': "pnr/nextpnr/generic", 'OS_NAME': "osx", 'RUNS_ON': "macos-latest" }, #42 + { 'PACKAGE': "bit/icestorm", 'OS_NAME': "windows", 'RUNS_ON': "windows-latest" }, #43 + { 'PACKAGE': "sim/icarus", 'OS_NAME': "windows", 'RUNS_ON': "windows-latest" }, #45 + { 'PACKAGE': "syn/yosys", 'OS_NAME': "windows", 'RUNS_ON': "windows-latest" }, #46 + { 'PACKAGE': "syn/quicklogic-yosys", 'OS_NAME': "windows", 'RUNS_ON': "windows-latest" }, #47 + { 'PACKAGE': "misc/tree-sitter-verilog", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #51 + { 'PACKAGE': "pnr/odin_II", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #52 + { 'PACKAGE': "sv-front/sv-parser", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #54 + { 'PACKAGE': "misc/libunwind", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #62 + { 'PACKAGE': "misc/netgen", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #66 + { 'PACKAGE': "sv-front/zachjs-sv2v", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #67 + { 'PACKAGE': "pnr/openroad", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-20.04" }, #69 + # uses older ubuntu for better compat: + # https://github.com/hdl/conda-eda/issues/199 + { 'PACKAGE': "hls/xls", 'OS_NAME': "linux", 'RUNS_ON': "ubuntu-18.04" }, #70 + ] + print(f'::set-output name=jobs::{jobs!s}') + + matrix: + needs: generate + strategy: + fail-fast: false + matrix: + include: ${{ fromJson(needs.generate.outputs.jobs) }} + name: '${{ matrix.PACKAGE }} | ${{ matrix.OS_NAME }}' + runs-on: ${{ matrix.RUNS_ON }} + env: + PACKAGE: ${{ matrix.PACKAGE }} + OS_NAME: ${{ matrix.OS_NAME }} + steps: + - uses: actions/checkout@v2 + - uses: hdl/conda-ci@master + #1 magic-linux: runs-on: "ubuntu-20.04" @@ -38,76 +105,6 @@ jobs: sudo apt install -y csh - uses: hdl/conda-ci@master - #2 - icestorm-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "bit/icestorm" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #3 - prjtrellis-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "bit/prjtrellis" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #4 - prjoxide-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "bit/prjoxide" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #5 - prjxray-db-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "bit/prjxray-db" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #6 - prjxray-tools-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "bit/prjxray-tools" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #7 - icarus-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "sim/icarus" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #8 - verilator-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "sim/verilator" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #9 yosys-linux-py37: runs-on: "ubuntu-20.04" @@ -133,7 +130,7 @@ jobs: #11 yosys-plugins-symbiflow-linux: runs-on: "ubuntu-20.04" - needs: ["icarus-linux", "yosys-linux-py37", "yosys-linux-py38", "surelog-linux-py37", "surelog-linux-py38"] + needs: ["matrix", "yosys-linux-py37", "yosys-linux-py38", "surelog-linux-py37", "surelog-linux-py38"] env: PACKAGE: "syn/yosys-plugins-symbiflow" OS_NAME: "linux" @@ -144,7 +141,7 @@ jobs: #12 nextpnr-nexus-linux: runs-on: "ubuntu-20.04" - needs: ["prjoxide-linux"] + needs: "matrix" env: PACKAGE: "pnr/nextpnr/nexus" OS_NAME: "linux" @@ -152,30 +149,10 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #13 - quicklogic-yosys-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "syn/quicklogic-yosys" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #14 - quicklogic-yosys-plugins-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "syn/quicklogic-yosys-plugins" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #15 symbiflow-yosys-plugins-linux: runs-on: "ubuntu-20.04" - needs: ["icarus-linux", "yosys-linux-py37", "yosys-linux-py38", "surelog-linux-py37", "surelog-linux-py38"] + needs: ["matrix", "yosys-linux-py37", "yosys-linux-py38", "surelog-linux-py37", "surelog-linux-py38"] env: PACKAGE: "syn/symbiflow-yosys-plugins" OS_NAME: "linux" @@ -183,60 +160,10 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #16 - vtr-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/vtr" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #17 - vtr-gui-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/vtr-gui" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #18 - vtr-optimized-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/vtr-optimized" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #19 - symbiflow-vtr-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/symbiflow-vtr" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #20 - symbiflow-vtr-gui-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/symbiflow-vtr-gui" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #21 quicklogic-vtr-linux: runs-on: "ubuntu-20.04" - needs: "vtr-linux" + needs: "matrix" env: PACKAGE: "pnr/quicklogic-vtr" OS_NAME: "linux" @@ -249,7 +176,7 @@ jobs: #22 quicklogic-vtr-gui-linux: runs-on: "ubuntu-20.04" - needs: "vtr-gui-linux" + needs: "matrix" env: PACKAGE: "pnr/quicklogic-vtr-gui" OS_NAME: "linux" @@ -262,7 +189,7 @@ jobs: #23 nextpnr-ice40-linux: runs-on: "ubuntu-20.04" - needs: ["icestorm-linux"] + needs: "matrix" env: PACKAGE: "pnr/nextpnr/ice40" OS_NAME: "linux" @@ -273,7 +200,7 @@ jobs: #24 nextpnr-ecp5-linux: runs-on: "ubuntu-20.04" - needs: ["prjtrellis-linux"] + needs: "matrix" env: PACKAGE: "pnr/nextpnr/ecp5" OS_NAME: "linux" @@ -281,16 +208,6 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #25 - nextpnr-generic-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/nextpnr/generic" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #26 nextpnr-xilinx-linux: runs-on: "ubuntu-20.04" @@ -309,16 +226,6 @@ jobs: sudo apt install -y pypy3 - uses: hdl/conda-ci@master - #27 - nextpnr-fpga_interchange-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/nextpnr/fpga_interchange" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #28 symbiyosys-linux-py37: runs-on: "ubuntu-20.04" @@ -351,52 +258,12 @@ jobs: env: PACKAGE: "xilinx/vivado" OS_NAME: "linux" - VERSIONS: ${{ format('{0}{1}', github.workspace, '/xilinx/vivado/versions') }} + VERSIONS: ${{ format('{0}{1}', github.workspace, '/xilinx/vivado/versions') }} SCRIPT: ${{ format('{0}{1}', github.workspace, '/xilinx/vivado/gen_metapackages.sh') }} steps: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #31 - icestorm-osx: - runs-on: "macos-latest" - env: - PACKAGE: "bit/icestorm" - OS_NAME: "osx" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #32 - prjtrellis-osx: - runs-on: "macos-latest" - env: - PACKAGE: "bit/prjtrellis" - OS_NAME: "osx" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #33 - icarus-osx: - runs-on: "macos-latest" - env: - PACKAGE: "sim/icarus" - OS_NAME: "osx" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #34 - verilator-osx: - runs-on: "macos-latest" - env: - PACKAGE: "sim/verilator" - OS_NAME: "osx" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #35 yosys-osx: runs-on: "macos-latest" @@ -422,7 +289,7 @@ jobs: #37 quicklogic-yosys-plugins-osx: runs-on: "macos-latest" - needs: ["icarus-osx", "quicklogic-yosys-osx"] + needs: ["matrix", "quicklogic-yosys-osx"] env: PACKAGE: "syn/quicklogic-yosys-plugins" OS_NAME: "osx" @@ -433,7 +300,7 @@ jobs: #38 symbiflow-yosys-plugins-osx: runs-on: "macos-latest" - needs: ["icarus-osx", "yosys-osx"] + needs: ["matrix", "yosys-osx"] env: PACKAGE: "syn/symbiflow-yosys-plugins" OS_NAME: "osx" @@ -467,7 +334,7 @@ jobs: #41 nextpnr-ice40-osx: runs-on: "macos-latest" - needs: ["icestorm-osx"] + needs: "matrix" env: PACKAGE: "pnr/nextpnr/ice40" OS_NAME: "osx" @@ -475,26 +342,6 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #42 - nextpnr-generic-osx: - runs-on: "macos-latest" - env: - PACKAGE: "pnr/nextpnr/generic" - OS_NAME: "osx" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #43 - icestorm-windows: - runs-on: "windows-latest" - env: - PACKAGE: "bit/icestorm" - OS_NAME: "windows" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #44 prjtrellis-windows: runs-on: "windows-latest" @@ -506,40 +353,10 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #45 - icarus-windows: - runs-on: "windows-latest" - env: - PACKAGE: "sim/icarus" - OS_NAME: "windows" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #46 - yosys-windows: - runs-on: "windows-latest" - env: - PACKAGE: "syn/yosys" - OS_NAME: "windows" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #47 - quicklogic-yosys-windows: - runs-on: "windows-latest" - env: - PACKAGE: "syn/quicklogic-yosys" - OS_NAME: "windows" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #48 nextpnr-ice40-windows: runs-on: "windows-latest" - needs: ["icestorm-windows"] + needs: "matrix" env: PACKAGE: "pnr/nextpnr/ice40" OS_NAME: "windows" @@ -570,26 +387,6 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #51 - tree-sitter-verilog-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "misc/tree-sitter-verilog" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #52 - odin-ii-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/odin_II" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #53 slang-linux: runs-on: "ubuntu-20.04" @@ -601,16 +398,6 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #54 - sv-parser-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "sv-front/sv-parser" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #55 moore-linux: runs-on: "ubuntu-20.04" @@ -624,7 +411,7 @@ jobs: #56 surelog-linux-py37: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "sv-front/surelog" @@ -636,7 +423,7 @@ jobs: #57 surelog-linux-py38: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "sv-front/surelog" @@ -648,7 +435,7 @@ jobs: #58 surelog-uhdm-linux-py37: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "sv-front/surelog-uhdm" @@ -661,7 +448,7 @@ jobs: #59 surelog-uhdm-linux-py38: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "sv-front/surelog-uhdm" @@ -674,7 +461,7 @@ jobs: #60 yosys-uhdm-linux-py37: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "syn/yosys-uhdm" @@ -686,7 +473,7 @@ jobs: #61 yosys-uhdm-linux-py38: - needs: ["libunwind", "gperftools"] + needs: ["matrix", "gperftools"] runs-on: "ubuntu-20.04" env: PACKAGE: "syn/yosys-uhdm" @@ -696,19 +483,9 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #62 - libunwind: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "misc/libunwind" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #63 gperftools: - needs: "libunwind" + needs: "matrix" runs-on: "ubuntu-20.04" env: PACKAGE: "misc/gperftools" @@ -719,7 +496,7 @@ jobs: #64 verilator-uhdm-linux-py37: - needs: ["gperftools"] + needs: "gperftools" runs-on: "ubuntu-20.04" env: PACKAGE: "sim/verilator-uhdm" @@ -731,7 +508,7 @@ jobs: #65 verilator-uhdm-linux-py38: - needs: ["gperftools"] + needs: "gperftools" runs-on: "ubuntu-20.04" env: PACKAGE: "sim/verilator-uhdm" @@ -741,30 +518,10 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #66 - netgen-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "misc/netgen" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #67 - zachjs-sv2v-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "sv-front/zachjs-sv2v" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - #68 open_pdks-linux: runs-on: "ubuntu-20.04" - needs: ["magic-linux"] + needs: "magic-linux" env: PACKAGE: "misc/open_pdks" OS_NAME: "linux" @@ -772,28 +529,6 @@ jobs: - uses: actions/checkout@v2 - uses: hdl/conda-ci@master - #69 - openroad-linux: - runs-on: "ubuntu-20.04" - env: - PACKAGE: "pnr/openroad" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - - #70 - xls-linux: - # uses older ubuntu for better compat: - # https://github.com/hdl/conda-eda/issues/199 - runs-on: "ubuntu-18.04" - env: - PACKAGE: "hls/xls" - OS_NAME: "linux" - steps: - - uses: actions/checkout@v2 - - uses: hdl/conda-ci@master - master-package: runs-on: "ubuntu-20.04" env: