Unify Github and Gitlab CIs #98
Workflow file for this run
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
# 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: | | |
apt-get update -qq | |
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 | |
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: | | |
source .github/scripts/setup_env.sh ${{ matrix.python-version }} | |
install_system_deps | |
configure_python_env | |
- 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 | |
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: | | |
source .github/scripts/setup_env.sh ${{ env.PYTHON_VERSION }} | |
install_system_deps | |
configure_python_env | |
- name: Install fpga-topwrap | |
run: | | |
activate_python_env | |
tuttest README.md | bash - | |
- name: Generate sources for example ${{ matrix.example }} setup | |
run: | | |
activate_python_env | |
cd examples/${{ matrix.example }} | |
tuttest README.md generate | bash - |