Update CI workflows (#1)

* update ci workflows
This commit is contained in:
Yanis
2025-07-20 12:50:58 +02:00
committed by GitHub
parent e6833212f4
commit f005da9ab8
4 changed files with 171 additions and 136 deletions
+36
View File
@@ -0,0 +1,36 @@
name: Build
on:
push:
pull_request:
jobs:
build:
container: ghcr.io/yanis002/st-build:main
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [eur, jp]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare
run: |
mv /extract/* ./extract
- name: Build
run: |
python tools/configure.py ${{ matrix.version }} -w wibo
ninja arm9 report check
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.version }}_report
path: build/${{ matrix.version }}/report.json
+31
View File
@@ -0,0 +1,31 @@
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Linting/style checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit/
# Invalidate the cache if the pre-commit config changes or the Python version changes
key: pre-commit-cache|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit checks
run: pre-commit run --all-files --verbose
-32
View File
@@ -1,32 +0,0 @@
name: Check Format
on:
push:
pull_request:
jobs:
format:
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
# Checkout the repository (shallow clone)
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Set Git config
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Run formatter
- name: Run clang-format
run: find include libs src -name *.h -o -name *.c -o -name *.hpp -o -name *.cpp | xargs clang-format -i
# Cancel if there's a diff
- name: Check status
run: git diff --name-only --exit-code