From d286cb3bda81be90d11856b2de34cc067bda916c Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 16 Jun 2022 11:52:07 +0200 Subject: [PATCH 1/2] ci: test latest arch-defs packages in workflow 'Latest' Signed-off-by: Unai Martinez-Corral --- .github/latest.patch | 14 +++++++ .github/workflows/Latest.yml | 57 ++++++++++++++++++++++++++++ .github/workflows/sphinx-tuttest.yml | 24 +++++++++++- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 .github/latest.patch create mode 100644 .github/workflows/Latest.yml diff --git a/.github/latest.patch b/.github/latest.patch new file mode 100644 index 0000000..c5bf6be --- /dev/null +++ b/.github/latest.patch @@ -0,0 +1,14 @@ +--- a/docs/getting.rst ++++ b/docs/getting.rst +@@ -134,8 +134,8 @@ Download architecture definitions: + F4PGA_TIMESTAMP='20220714-173445' + F4PGA_HASH='f7afc12' + +- for PKG in install xc7a50t_test xc7a100t_test xc7a200t_test xc7z010_test; do +- wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${F4PGA_TIMESTAMP}/symbiflow-arch-defs-${PKG}-${F4PGA_HASH}.tar.xz | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install ++ for PKG in toolchain xc7a50t_test xc7a100t_test xc7a200t_test xc7z010_test; do ++ wget -qO- $(wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-gha/symbiflow-${PKG}-latest) | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install + done + + .. group-tab:: EOS-S3 +-- diff --git a/.github/workflows/Latest.yml b/.github/workflows/Latest.yml new file mode 100644 index 0000000..55929da --- /dev/null +++ b/.github/workflows/Latest.yml @@ -0,0 +1,57 @@ +name: Latest + +concurrency: + group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - main + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + + + Matrices: + runs-on: ubuntu-latest + outputs: + debian: ${{ steps.generate.outputs.debian }} + ubuntu: ${{ steps.generate.outputs.ubuntu }} + fedora: ${{ steps.generate.outputs.fedora }} + centos: ${{ steps.generate.outputs.centos }} + steps: + - uses: actions/checkout@v3 + - id: generate + run: ./.github/scripts/generate_job_matrices.py '${{ github.repository }}' + + + Debian: + needs: Matrices + uses: ./.github/workflows/sphinx-tuttest.yml + with: + matrix: ${{ needs.Matrices.outputs.debian }} + latest: true + + Ubuntu: + needs: Matrices + uses: ./.github/workflows/sphinx-tuttest.yml + with: + matrix: ${{ needs.Matrices.outputs.ubuntu }} + latest: true + + Fedora: + needs: Matrices + uses: ./.github/workflows/sphinx-tuttest.yml + with: + matrix: ${{ needs.Matrices.outputs.fedora }} + latest: true + + Centos: + needs: Matrices + uses: ./.github/workflows/sphinx-tuttest.yml + with: + matrix: ${{ needs.Matrices.outputs.centos }} + latest: true diff --git a/.github/workflows/sphinx-tuttest.yml b/.github/workflows/sphinx-tuttest.yml index 0bb28bd..3bd8064 100644 --- a/.github/workflows/sphinx-tuttest.yml +++ b/.github/workflows/sphinx-tuttest.yml @@ -7,6 +7,11 @@ on: description: 'Distribution to execute tests on' required: true type: string + latest: + description: 'Use latest arch-defs packages' + required: false + type: boolean + default: false jobs: @@ -37,7 +42,7 @@ jobs: - name: Install utils run: | case ${{ matrix.os }} in - ubuntu|debian) apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG ;; + debian|ubuntu) apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG ;; centos) yum -y install git wget ;; fedora) dnf install -y git wget ;; esac @@ -47,6 +52,23 @@ jobs: wget https://github.com/antmicro/tuttest/releases/download/v0.2-beta/tuttest -O /usr/bin/tuttest chmod a+rx /usr/bin/tuttest + - name: Patch package URLs + if: inputs.latest == true + run: | + case ${{ matrix.os }} in + debian|ubuntu) + apt update -qq + apt install -y patch + ;; + centos) + yum -y install patch + ;; + fedora) + dnf install -y patch + ;; + esac + patch -p1 -i .github/latest.patch + - name: Install F4PGA toolchain run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}} From 8241c5376eb3d12d012f01bd40fe2140a3016bc1 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Wed, 27 Jul 2022 15:58:45 +0200 Subject: [PATCH 2/2] use GitHub Releases instead of GCS Signed-off-by: Unai Martinez-Corral --- .github/latest.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/latest.patch b/.github/latest.patch index c5bf6be..85064e0 100644 --- a/.github/latest.patch +++ b/.github/latest.patch @@ -7,7 +7,7 @@ - for PKG in install xc7a50t_test xc7a100t_test xc7a200t_test xc7z010_test; do - wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/${F4PGA_TIMESTAMP}/symbiflow-arch-defs-${PKG}-${F4PGA_HASH}.tar.xz | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install + for PKG in toolchain xc7a50t_test xc7a100t_test xc7a200t_test xc7z010_test; do -+ wget -qO- $(wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-gha/symbiflow-${PKG}-latest) | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install ++ wget -qO- $(wget -qO- https://github.com/SymbiFlow/f4pga-arch-defs/releases/download/latest/symbiflow-${PKG}-latest) | tar -xJC $F4PGA_INSTALL_DIR/${FPGA_FAM}/install done .. group-tab:: EOS-S3