Use Amaranth SoC GPIO peripheral. #55
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: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
name: CI | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up PDM | |
uses: pdm-project/setup-pdm@v4 | |
- name: Install dependencies | |
run: | | |
pdm lock --dev | |
pdm install | |
- name: Run tests | |
run: | | |
pdm run test | |
- name: Run lints | |
run: | | |
pdm run lint | |
- name: Run doc tests | |
run: pdm run test-docs | |
license: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check source code licenses | |
run: | | |
docker run --platform=linux/amd64 -v ${PWD}:/src ghcr.io/google/addlicense -v -check -l BSD-2-Clause -c "ChipFlow" -s=only -ignore **/__init__.py **/*.py | |
build-docs: | |
needs: test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: 3.9 | |
- name: Install deps | |
run: pdm install | |
- name: Build docs | |
run: pdm run document | |
- name: Upload docs artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/_build | |
publish-docs: | |
needs: build-docs | |
if: ${{ github.repository == 'chipflow/chipflow-lib' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download docs artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: docs/ | |
- name: Publish "latest" docs | |
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }} | |
uses: JamesIves/github-pages-deploy-action@releases/v4 | |
with: | |
repository-name: chipflow/chipflow.github.io | |
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }} | |
branch: main | |
folder: docs/ | |
target-folder: chipflow-lib/latest/ | |