diff --git a/.github/scripts/generate_job_matrix.py b/.github/scripts/generate_job_matrix.py new file mode 100755 index 0000000..a610921 --- /dev/null +++ b/.github/scripts/generate_job_matrix.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python3 + +examples = [ + "counter", + "picosoc", + "litex", + "litex_linux", + "button_controller", + "pulse_width_led", + "timer", + "hello-a" +] + +jobs = [] + +osvers = [ + ("ubuntu", "xenial"), + ("ubuntu", "bionic"), + ("ubuntu", "focal"), + ("centos", "7"), + ("centos", "8"), + ("debian", "buster"), + ("debian", "bullseye"), + ("debian", "sid") +] + +for osver in osvers: + jobs += [{ + 'fpga-fam': "xc7", + 'os': osver[0], + 'os-version': osver[1], + 'example': example + } for example in examples] + +jobs += [{ + 'fpga-fam': "eos-s3", + 'os': osver[0], + 'os-version': osver[1], + 'example': "counter" +} for osver in osvers] + +print('::set-output name=matrix::' + str(jobs)) diff --git a/.github/workflows/sphinx-tuttest.yml b/.github/workflows/sphinx-tuttest.yml index 9691302..6451517 100644 --- a/.github/workflows/sphinx-tuttest.yml +++ b/.github/workflows/sphinx-tuttest.yml @@ -7,92 +7,31 @@ on: - cron: "0 0 * * *" jobs: - test: + + + Matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.generate.outputs.matrix }} + + steps: + + - name: Setup repository + uses: actions/checkout@v2 + + - name: Generate examples matrix + id: generate + run: ./.github/scripts/generate_job_matrix.py + + + Test: + needs: Matrix runs-on: [self-hosted, Linux, X64] strategy: fail-fast: false matrix: - include: - - {fpga-fam: "eos-s3", os: "ubuntu", os-version: "xenial", example: "counter"} - - {fpga-fam: "eos-s3", os: "ubuntu", os-version: "bionic", example: "counter"} - - {fpga-fam: "eos-s3", os: "ubuntu", os-version: "focal", example: "counter"} - - {fpga-fam: "eos-s3", os: "centos", os-version: "7", example: "counter"} - - {fpga-fam: "eos-s3", os: "centos", os-version: "8", example: "counter"} - - {fpga-fam: "eos-s3", os: "debian", os-version: "buster", example: "counter"} - - {fpga-fam: "eos-s3", os: "debian", os-version: "bullseye", example: "counter"} - - {fpga-fam: "eos-s3", os: "debian", os-version: "sid", example: "counter"} + include: ${{ fromJson(needs.Matrix.outputs.matrix) }} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "counter"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "counter"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "counter"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "counter"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "counter"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "counter"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "counter"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "counter"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "picosoc"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "picosoc"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "picosoc"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "picosoc"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "picosoc"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "picosoc"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "picosoc"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "picosoc"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "litex"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "litex"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "litex"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "litex"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "litex"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "litex"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "litex"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "litex"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "litex_linux"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "litex_linux"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "litex_linux"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "litex_linux"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "litex_linux"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "litex_linux"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "litex_linux"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "litex_linux"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "button_controller"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "button_controller"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "button_controller"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "button_controller"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "button_controller"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "button_controller"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "button_controller"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "button_controller"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "pulse_width_led"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "pulse_width_led"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "timer"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "timer"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "timer"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "timer"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "timer"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "timer"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "timer"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "timer"} - - - {fpga-fam: "xc7", os: "ubuntu", os-version: "xenial", example: "hello-a"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "bionic", example: "hello-a"} - - {fpga-fam: "xc7", os: "ubuntu", os-version: "focal", example: "hello-a"} - - {fpga-fam: "xc7", os: "centos", os-version: "7", example: "hello-a"} - - {fpga-fam: "xc7", os: "centos", os-version: "8", example: "hello-a"} - - {fpga-fam: "xc7", os: "debian", os-version: "buster", example: "hello-a"} - - {fpga-fam: "xc7", os: "debian", os-version: "bullseye", example: "hello-a"} - - {fpga-fam: "xc7", os: "debian", os-version: "sid", example: "hello-a"} env: LANG: "en_US.UTF-8" DEBIAN_FRONTEND: "noninteractive"