2020-12-08 07:36:23 -05:00
|
|
|
name: doc-test
|
|
|
|
|
2021-03-25 18:09:20 -04:00
|
|
|
on:
|
2022-04-06 18:46:31 -04:00
|
|
|
workflow_call:
|
2022-06-15 19:01:05 -04:00
|
|
|
inputs:
|
|
|
|
distribution:
|
|
|
|
description: 'Distribution to execute tests on'
|
|
|
|
required: true
|
|
|
|
type: string
|
2020-12-08 07:36:23 -05:00
|
|
|
|
|
|
|
jobs:
|
2021-10-19 17:43:29 -04:00
|
|
|
|
|
|
|
|
|
|
|
Matrix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.generate.outputs.matrix }}
|
2022-05-31 04:26:34 -04:00
|
|
|
surelog-matrix: ${{ steps.generate-surelog.outputs.matrix }}
|
2021-10-19 17:43:29 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2021-10-19 18:05:37 -04:00
|
|
|
- name: Setup repository
|
2022-04-05 08:00:29 -04:00
|
|
|
uses: actions/checkout@v3
|
2021-10-19 18:05:37 -04:00
|
|
|
|
2021-10-19 17:43:29 -04:00
|
|
|
- name: Generate examples matrix
|
|
|
|
id: generate
|
2022-06-15 19:01:05 -04:00
|
|
|
run: >-
|
|
|
|
F4PGA_EXAMPLES_DISTRIBUTION='${{ inputs.distribution }}'
|
|
|
|
./.github/scripts/generate_job_matrix.py
|
|
|
|
'${{ github.repository }}'
|
2022-05-31 04:26:34 -04:00
|
|
|
|
2021-10-19 17:43:29 -04:00
|
|
|
|
|
|
|
Test:
|
|
|
|
needs: Matrix
|
2020-12-08 07:36:23 -05:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-10-19 17:43:29 -04:00
|
|
|
include: ${{ fromJson(needs.Matrix.outputs.matrix) }}
|
2021-12-14 03:21:51 -05:00
|
|
|
runs-on: ${{ matrix.runs-on }}
|
2022-06-15 19:01:05 -04:00
|
|
|
name: ${{ matrix.os-version }} | ${{ matrix.name }} | ${{ matrix.fpga-fam }} | ${{ matrix.example }}
|
2022-01-12 10:00:00 -05:00
|
|
|
|
|
|
|
env:
|
|
|
|
LANG: "en_US.UTF-8"
|
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
GHA_PREEMPTIBLE: "false"
|
2022-06-15 19:01:05 -04:00
|
|
|
SURELOG_CMD: ${{ matrix.surelog }}
|
2021-01-05 09:46:28 -05:00
|
|
|
|
|
|
|
container: ${{matrix.os}}:${{matrix.os-version}}
|
2020-12-08 07:36:23 -05:00
|
|
|
|
|
|
|
steps:
|
2021-12-14 20:52:21 -05:00
|
|
|
|
|
|
|
- name: Setup repository
|
2022-04-05 08:00:29 -04:00
|
|
|
uses: actions/checkout@v3
|
2021-12-14 20:52:21 -05:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-12-14 03:20:51 -05:00
|
|
|
|
2022-06-15 13:54:40 -04:00
|
|
|
- name: Install utils
|
|
|
|
run: |
|
|
|
|
case ${{ matrix.os }} in
|
|
|
|
ubuntu|debian) 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
|
|
|
|
|
2020-12-08 07:36:23 -05:00
|
|
|
- name: Install tuttest
|
2020-12-10 08:49:18 -05:00
|
|
|
run: |
|
2021-01-19 16:52:16 -05:00
|
|
|
wget https://github.com/antmicro/tuttest/releases/download/v0.2-beta/tuttest -O /usr/bin/tuttest
|
2021-01-05 09:46:28 -05:00
|
|
|
chmod a+rx /usr/bin/tuttest
|
2020-12-08 07:36:23 -05:00
|
|
|
|
2022-02-18 12:15:44 -05:00
|
|
|
- name: Install F4PGA toolchain
|
2021-01-19 12:15:00 -05:00
|
|
|
run: bash .github/scripts/install-toolchain.sh ${{matrix.fpga-fam}} ${{matrix.os}}
|
2020-12-08 07:36:23 -05:00
|
|
|
|
|
|
|
- name: Build examples
|
2021-01-19 12:15:00 -05:00
|
|
|
run: bash .github/scripts/build-examples.sh ${{matrix.fpga-fam}} ${{matrix.example}}
|
2020-12-08 08:42:12 -05:00
|
|
|
|
2022-04-11 02:37:36 -04:00
|
|
|
- uses: actions/upload-artifact@v3
|
2020-12-08 08:42:12 -05:00
|
|
|
with:
|
2022-06-15 19:01:05 -04:00
|
|
|
name: f4pga-examples-bitstreams-${{ matrix.name }}
|
2022-05-31 04:28:01 -04:00
|
|
|
path: '**/*.bit'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2022-06-15 19:01:05 -04:00
|
|
|
name: f4pga-examples-plots-${{ matrix.name }}
|
2022-05-31 04:28:01 -04:00
|
|
|
path: '**/plot_*.svg'
|