2020-12-08 07:36:23 -05:00
|
|
|
name: doc-test
|
|
|
|
|
2021-03-25 18:09:20 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *"
|
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 }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2021-10-19 18:05:37 -04:00
|
|
|
- name: Setup repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-10-19 17:43:29 -04:00
|
|
|
- name: Generate examples matrix
|
|
|
|
id: generate
|
2021-12-14 03:21:51 -05:00
|
|
|
run: ./.github/scripts/generate_job_matrix.py '${{ github.repository }}'
|
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 }}
|
|
|
|
name: ${{ matrix.fpga-fam }} | ${{ matrix.os }} ${{ matrix.os-version }} | ${{ matrix.example }}
|
2021-10-19 17:43:29 -04:00
|
|
|
|
2020-12-08 07:36:23 -05:00
|
|
|
env:
|
|
|
|
LANG: "en_US.UTF-8"
|
2021-01-05 09:46:28 -05:00
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
2021-11-24 10:00:11 -05:00
|
|
|
GHA_PREEMPTIBLE: "false"
|
2021-01-05 09:46:28 -05:00
|
|
|
|
|
|
|
container: ${{matrix.os}}:${{matrix.os-version}}
|
2020-12-08 07:36:23 -05:00
|
|
|
|
|
|
|
steps:
|
2021-01-05 09:46:28 -05:00
|
|
|
- name: Install utils
|
|
|
|
if: ${{matrix.os == 'ubuntu' || matrix.os == 'debian'}}
|
2021-12-14 20:52:21 -05:00
|
|
|
run: apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG
|
2020-12-10 08:49:18 -05:00
|
|
|
|
2021-01-05 09:46:28 -05:00
|
|
|
- name: Install utils
|
|
|
|
if: ${{matrix.os == 'centos'}}
|
2021-12-14 20:52:21 -05:00
|
|
|
run: yum -y install git wget
|
2020-12-08 07:36:23 -05:00
|
|
|
|
2021-12-14 03:20:51 -05:00
|
|
|
- name: Install utils
|
|
|
|
if: ${{matrix.os == 'fedora'}}
|
2021-12-14 20:52:21 -05:00
|
|
|
run: dnf install -y git wget
|
|
|
|
|
|
|
|
- name: Setup repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-12-14 03:20:51 -05:00
|
|
|
|
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
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-02-18 12:15:44 -05:00
|
|
|
name: f4pga-examples-bitstreams
|
2020-12-08 08:42:12 -05:00
|
|
|
path: |
|
|
|
|
**/*.bit
|
2021-01-15 16:21:18 -05:00
|
|
|
**/plot_*.svg
|