Skip to content

Unify Github and Gitlab CIs #103

Unify Github and Gitlab CIs

Unify Github and Gitlab CIs #103

Workflow file for this run

# Copyright (c) 2023-2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
name: Pipeline
on: [pull_request, push, workflow_dispatch]
jobs:
Lint:
runs-on: ubuntu-latest
name: "Run Lint checks on Python sources"
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dev requirements
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends python3-pip python3-venv
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -U pip wheel setuptools
- name: Run lint checks
run: |
python3 -m pip install -r requirements.txt
nox -s isort_check black_check flake8
Tests:
runs-on: ubuntu-latest
container: verilator/verilator:v5.020
name: "Test Python ${{ matrix.python-version }}"
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install dev requirements
run: |
. ./.github/scripts/setup_env.sh ${{ matrix.python-version }}
install_deps
configure_python_env
python3 -m pip install git+https://github.com/antmicro/tuttest
- name: Build
run: |
activate_python_env
tuttest README.md | bash -
- name: Run pytest with nox
run: |
activate_python_env
nox -s tests
Examples:
runs-on: ubuntu-latest
container: verilator/verilator:v5.020
name: 'Example ${{ matrix.example }}'
strategy:
fail-fast: false
matrix:
example:
- hdmi
- inout
- pwm
env:
PYTHON_VERSION: "3.12"
steps:
- uses: actions/checkout@v3
- name: Install dev requirements
run: |
. .github/scripts/setup_env.sh ${{ env.PYTHON_VERSION }}
install_deps
configure_python_env
python3 -m pip install git+https://github.com/antmicro/tuttest
- name: Install fpga-topwrap
run: |
source .github/scripts/setup_env.sh ${{ env.PYTHON_VERSION }}
activate_python_env
tuttest README.md | bash -
- name: Generate sources for example ${{ matrix.example }} setup
run: |
source .github/scripts/setup_env.sh ${{ env.PYTHON_VERSION }}
activate_python_env
cd examples/${{ matrix.example }}
tuttest README.md generate | bash -