From 0346999d3b6f616b192e4befd3bae6f978acaf05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fin=20Maa=C3=9F?= Date: Mon, 16 Sep 2024 10:43:34 +0200 Subject: [PATCH] ci: improve and update github action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit improve and update github action Signed-off-by: Fin Maaß --- .github/workflows/ci.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29d1b6f..c4801b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,28 +4,37 @@ 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: Set up Python + run: | + python3 -m venv --system-site-packages .venv # Install (n)Migen / LiteX / Cores - name: Install LiteX run: | + source .venv/bin/activate 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: | + source .venv/bin/activate + python3 -m pip install --editable . # Test - name: Run Tests - run: python3 setup.py test + run: | + source .venv/bin/activate + python3 -m pytest -v