finish refactor, add docs and CI
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
nro:
|
||||
name: Build NRO
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: devkitpro/devkita64:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Configure
|
||||
run: cmake --preset switch
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j$(nproc)
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: NXST-${{ github.sha }}
|
||||
path: build/NXST.nro
|
||||
|
||||
release:
|
||||
name: Upload release asset
|
||||
runs-on: ubuntu-latest
|
||||
needs: nro
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: NXST-${{ github.sha }}
|
||||
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: NXST.nro
|
||||
|
||||
format:
|
||||
name: Format check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install clang-format
|
||||
run: |
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
sudo apt-get update && sudo apt-get install -y clang-format-22
|
||||
sudo ln -sf /usr/bin/clang-format-22 /usr/local/bin/clang-format
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
find src include \( -name '*.cpp' -o -name '*.hpp' \) \
|
||||
| xargs clang-format --dry-run --Werror
|
||||
|
||||
layering:
|
||||
name: Layering check
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: UI must not include net/sys headers
|
||||
run: |
|
||||
! grep -rE '^#include\s*[<"](arpa/inet|sys/socket|pthread)' src/ui/
|
||||
Reference in New Issue
Block a user