142 lines
3.9 KiB
YAML
142 lines
3.9 KiB
YAML
name: doc-test
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
|
|
|
|
Matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.generate.outputs.matrix }}
|
|
surelog-matrix: ${{ steps.generate-surelog.outputs.matrix }}
|
|
|
|
steps:
|
|
|
|
- name: Setup repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Generate examples matrix
|
|
id: generate
|
|
run: ./.github/scripts/generate_job_matrix.py '${{ github.repository }}'
|
|
|
|
- name: Generate examples matrix
|
|
id: generate-surelog
|
|
run: ./.github/scripts/generate_job_matrix.py '${{ github.repository }}' Surelog
|
|
|
|
|
|
Test:
|
|
needs: Matrix
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include: ${{ fromJson(needs.Matrix.outputs.matrix) }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
name: ${{ matrix.fpga-fam }} | ${{ matrix.os }} ${{ matrix.os-version }} | ${{ matrix.example }}
|
|
|
|
env:
|
|
LANG: "en_US.UTF-8"
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
GHA_PREEMPTIBLE: "false"
|
|
SURELOG_CMD: ""
|
|
|
|
container: ${{matrix.os}}:${{matrix.os-version}}
|
|
|
|
steps:
|
|
|
|
- name: Setup repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'ubuntu' || matrix.os == 'debian'}}
|
|
run: apt -qqy update && apt -qqy install wget locales && locale-gen $LANG
|
|
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'centos'}}
|
|
run: yum -y install wget
|
|
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'fedora'}}
|
|
run: dnf install -y wget
|
|
|
|
- name: Install tuttest
|
|
run: |
|
|
wget https://github.com/antmicro/tuttest/releases/download/v0.2-beta/tuttest -O /usr/bin/tuttest
|
|
chmod a+rx /usr/bin/tuttest
|
|
|
|
- name: Install SymbiFlow toolchain
|
|
run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}}
|
|
|
|
- name: Build examples
|
|
run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}}
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: f4pga-examples-bitstreams
|
|
path: '**/*.bit'
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: f4pga-examples-plots
|
|
path: '**/plot_*.svg'
|
|
|
|
|
|
Test-Surelog:
|
|
needs: Matrix
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include: ${{ fromJson(needs.Matrix.outputs.surelog-matrix) }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
name: Surelog frontend - ${{ matrix.fpga-fam }} | ${{ matrix.os }} ${{ matrix.os-version }} | ${{ matrix.example }}
|
|
|
|
env:
|
|
LANG: "en_US.UTF-8"
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
GHA_PREEMPTIBLE: "false"
|
|
SURELOG_CMD: "-parse -DSYNTHESIS"
|
|
|
|
container: ${{matrix.os}}:${{matrix.os-version}}
|
|
|
|
steps:
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'ubuntu' || matrix.os == 'debian'}}
|
|
run: apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG
|
|
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'centos'}}
|
|
run: yum -y install git wget
|
|
|
|
- name: Install utils
|
|
if: ${{matrix.os == 'fedora'}}
|
|
run: dnf install -y git wget
|
|
|
|
- name: Setup repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install tuttest
|
|
run: |
|
|
wget https://github.com/antmicro/tuttest/releases/download/v0.2-beta/tuttest -O /usr/bin/tuttest
|
|
chmod a+rx /usr/bin/tuttest
|
|
|
|
- name: Install F4PGA toolchain
|
|
run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}}
|
|
|
|
- name: Build examples
|
|
run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}}
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: f4pga-examples-bitstreams-systemverilog-plugin
|
|
path: '**/*.bit'
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: f4pga-examples-plots-systemverilog-plugin
|
|
path: '**/plot_*.svg'
|