Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github actions for python #74

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/host.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: python

on:
push:
pull_request:
workflow_dispatch:

# Run automatically every monday
schedule:
- cron: 1 12 * * 1

jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

name: test (${{ matrix.python-version }})
steps:
- uses: actions/checkout@v1
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm install -G :all
- name: Run tests
run: pdm run test
2 changes: 1 addition & 1 deletion apollo_fpga/protocol/jtag_svf.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def _lex(self):
else:
line, column = self.line_column()
print_args = (line, column, self.buffer[self.position:self.position + 16])
raise SVFParsingError("unrecognized SVF data at line {}, column {} ({}...)".format(print_args))
raise SVFParsingError("unrecognized SVF data at line {}, column {} ({}...)".format(*print_args))

def peek(self):
"""Return the next token without advancing the position."""
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ dependencies = [
"pyxdg>=0.27",
]

[project.optional-dependencies]
py_ci = [
"amaranth==0.4.1",
"luna-usb @ git+https://github.com/greatscottgadgets/luna@main"
]

[project.urls]
repository = "https://github.com/greatscottgadgets/apollo"

Expand All @@ -41,3 +47,6 @@ include = ["apollo_fpga*"]

[project.scripts]
apollo = "apollo_fpga.commands.cli:main"

[tool.pdm.scripts]
test.cmd = "python -m unittest discover -p jtag_svf.py -v"