Add smoke tests for a selection of iCE40, ECP5, Gowin, Xilinx boards #843
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' # test daily against git HEAD of dependencies | |
name: CI | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- 'pypy-3.8' | |
- 'pypy-3.9' | |
# this version range needs to be synchronized with the one in pyproject.toml | |
amaranth-version: | |
- '0.4' | |
- 'git' | |
allow-failure: | |
- true | |
- false | |
exclude: # all of these are inverted (this is unfortunately the best way to do this) | |
- amaranth-version: '0.4' | |
allow-failure: false | |
- amaranth-version: 'git' | |
allow-failure: true | |
continue-on-error: '${{ matrix.allow-failure }}' | |
name: "test (${{ matrix.python-version }}, ${{ matrix.amaranth-version }}${{ matrix.allow-failure == 'false' && ', required' || '' }})" | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Amaranth release | |
if: ${{ matrix.amaranth-version != 'git' }} | |
run: | | |
pip install 'amaranth==${{ matrix.amaranth-version }}' | |
- name: Install Amaranth from git | |
if: ${{ matrix.amaranth-version == 'git' }} | |
run: | | |
pip install git+https://github.com/amaranth-lang/amaranth.git | |
- name: Run tests | |
run: | | |
python -m unittest discover -t . -s amaranth_boards -p '*.py' | |
required: # group all required workflows into one to avoid reconfiguring this in Actions settings | |
needs: | |
- test | |
if: ${{ always() && !contains(needs.*.result, 'cancelled') }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: ${{ contains(needs.*.result, 'failure') && 'false' || 'true' }} |