Skip to content

Rebrand, move to GitHub and related changes #5

Rebrand, move to GitHub and related changes

Rebrand, move to GitHub and related changes #5

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 10
steps:
# 6.0.2
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Install uv
# 7.2.0
uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b
with:
version: "0.9.21"
enable-cache: true
save-cache: ${{ github.ref == 'refs/heads/main' }}
cache-dependency-glob: |
**/uv.lock
**/pyproject.toml
- name: Install python dependencies
run: uv sync --all-extras --all-groups --frozen
- name: Check Python code formatting
run: uv run ruff format --check
- name: Check Python code lint
run: uv run ruff check --output-format=github
- name: Check Python code types
run: uv run mypy .
- name: Run tests
run: uv run pytest
build:
strategy:
matrix:
os: ['ubuntu-24.04', 'ubuntu-24.04-arm']
compiler: ['gcc', 'clang']
runs-on: ${{ matrix.os }}
container:
image: ubuntu:latest
options: --privileged
permissions:
contents: read
timeout-minutes: 20
env:
CC: ${{ matrix.compiler }}
BUILDDIR: builddir
CONFIG_OPTS: -Dtests=true
steps:
- name: Install dependencies
run: apt-get update && apt-get install -y git findutils
- name: Set git safe directory
run: git config --global safe.directory "*"
# 6.0.2
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Install build dependencies
run: |
apt-get install -y ${{ matrix.compiler }} uncrustify \
$(xargs < .github/dependencies.apt.txt)
- name: Run uncrustify
run: ./uncrustify.sh && git diff --exit-code
- name: Configure with meson
run: |
meson setup --wrap-mode nodownload ${CONFIG_OPTS} \
-Dwerror=true ${BUILDDIR} .
- name: Build with meson
run: meson compile -C ${BUILDDIR}
- name: Test with meson
run: |
meson test -C ${BUILDDIR}
- name: Create dist tarball
run: |
meson setup --wrap-mode nodownload --reconfigure ${CONFIG_OPTS} ${BUILDDIR}_dist .
meson dist --include-subprojects -C ${BUILDDIR}_dist