From a4969b95f5be3138ef868b68f80162e20cfa0e57 Mon Sep 17 00:00:00 2001 From: Catherine Date: Fri, 3 Feb 2023 05:53:31 +0000 Subject: CI: test against all supported Amaranth versions. --- .github/workflows/main.yml | 22 +++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61b5332..b977303 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,11 +3,31 @@ name: CI jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - '3.7' + # this version range needs to be synchronized with the one in pyproject.toml + amaranth-version: + - '0.2' + - '0.3' + - 'git' + fail-fast: false 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: Test run: | - python setup.py test + python -m unittest discover -t . -s amaranth_boards -p '*.py' diff --git a/pyproject.toml b/pyproject.toml index bc0ccb8..3b95866 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,6 +12,7 @@ license = {file = "LICENSE.txt"} dependencies = [ "importlib_metadata; python_version<'3.8'", + # this version requirement needs to be synchronized with the one in .github/workflows/main.yml "amaranth>=0.2,<0.5", ] -- cgit v1.2.3