diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2026-05-08 17:22:58 +0300 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2026-05-08 17:22:58 +0300 |
| commit | 4e2b291a4acdc2cbd39f005c88bda363bc06bd34 (patch) | |
| tree | e90048d5973ad1164b109d575cf577af7daf50be /subprojects/pixpat/.github/workflows/ci.yml | |
| parent | 8f94b39040e79eccd9312ed1e467fe8ebfab8860 (diff) | |
| parent | e0b7d30fd437292c88141fb08d60681870b86c6e (diff) | |
Merge commit 'e0b7d30fd437292c88141fb08d60681870b86c6e' as 'subprojects/pixpat'
Diffstat (limited to 'subprojects/pixpat/.github/workflows/ci.yml')
| -rw-r--r-- | subprojects/pixpat/.github/workflows/ci.yml | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/subprojects/pixpat/.github/workflows/ci.yml b/subprojects/pixpat/.github/workflows/ci.yml new file mode 100644 index 0000000..3eb168a --- /dev/null +++ b/subprojects/pixpat/.github/workflows/ci.yml @@ -0,0 +1,86 @@ +name: CI + +on: + pull_request: + branches: [master] + push: + branches: [master, test] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: lint (uncrustify + ruff) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + + - name: Install uncrustify + run: | + sudo apt-get update + sudo apt-get install -y uncrustify + + - name: Install ruff + run: pip install ruff + + - name: uncrustify --check + run: | + files=$(git ls-files '*.cpp' '*.h') + uncrustify -c uncrustify.cfg -l CPP --check $files + + - name: ruff check + run: ruff check . + + - name: ruff format --check + run: ruff format --check . + + build: + name: build (${{ matrix.compiler }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + compiler: [gcc, clang] + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y meson ninja-build + if [ "${{ matrix.compiler }}" = "clang" ]; then + sudo apt-get install -y clang + fi + + - name: Configure meson + run: | + if [ "${{ matrix.compiler }}" = "clang" ]; then + export CC=clang CXX=clang++ + else + export CC=gcc CXX=g++ + fi + meson setup build + + - name: Compile + run: meson compile -C build + + - name: Run native tests + run: meson test -C build --print-errorlogs + + - name: Install pixpat wheel + run: pip install . + + - name: Run pytest + run: | + pip install pytest + pytest pixpat-python/tests |
