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

ci: improve and update github action #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,38 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
# Checkout Repository
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

# Install Tools
- name: Install Tools
run: |
sudo apt-get install wget build-essential python3
pip3 install setuptools
sudo apt-get install wget build-essential python3 python3-setuptools python3-pytest

- name: Create Python virtual environment
run: |
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
echo "VIRTUAL_ENV=${VIRTUAL_ENV}" >> $GITHUB_ENV
echo "${VIRTUAL_ENV}/bin" >> $GITHUB_PATH
shell: bash

# Install (n)Migen / LiteX / Cores
- name: Install LiteX
run: |
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
python3 litex_setup.py init install --user
python3 litex_setup.py init install --config=minimal

# Install Project
- name: Install Project
run: python3 setup.py develop --user
run: |
python3 -m pip install --editable .

# Test
- name: Run Tests
run: python3 setup.py test
run: |
python3 -m pytest -v