diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e690ce7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: MIT +# Build and test on Linux x86_64 and arm64 (native GitHub runners) for every push and pull request. +name: CI + +on: + push: + branches: [main] + tags: ["v*"] + pull_request: + +permissions: + contents: read + +jobs: + linux: + name: Linux ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + runner: ubuntu-24.04 + - arch: arm64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # tags are needed for the version description + + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + build-essential cmake ninja-build pkg-config gettext \ + libcurl4-openssl-dev libarchive-dev nlohmann-json3-dev doctest-dev \ + libglib2.0-dev libgtkmm-4.0-dev + + - name: Configure + run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENPU_WERROR=ON -DOPENPU_UI_GTK=ON + + - name: Build + run: cmake --build build + + - name: Unit tests + run: ctest --test-dir build --output-on-failure + + - name: Smoke test + run: | + build/src/cli/openpu-cli --version + test -f build/locale/fr/LC_MESSAGES/openpu.mo + + sanitizers: + name: ASan + UBSan + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends build-essential cmake ninja-build pkg-config \ + libcurl4-openssl-dev libarchive-dev nlohmann-json3-dev doctest-dev libglib2.0-dev + - name: Build and test + run: | + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DOPENPU_SANITIZE=ON + cmake --build build + UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 ctest --test-dir build --output-on-failure diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a5a459..effb375 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,9 +18,11 @@ complete; every release is an annotated git tag `vX.Y.Z` (see `tools/release.sh` - Recherche d'une nouvelle version d'OpenPU (releases GitHub) : proposition d'ouvrir la page de téléchargement dans le navigateur ; `openpu-cli app-update`. - Licence MIT (`LICENSE`, en-têtes SPDX). +- Intégration continue GitHub Actions : compilation et tests sur Linux x86_64 et arm64, ASan/UBSan. ### Prévu - Paquets Linux `.deb`, Flatpak et AppImage ; paquet Haiku `.hpkg`. +- À partir de 1.0.0, binaires joints à chaque release, x86_64 et arm64. ### Modifié - Le dépôt principal est désormais https://github.com/yann64/openpu (Gitea reste un miroir). diff --git a/README.md b/README.md index 98bc3be..358aba0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ C'est une alternative à l'application officielle « Peugeot Update » (Windows/ - [x] Traductions gettext (anglais, français) - [ ] USB Haiku (Storage Kit) - [ ] UI Haiku +- [x] Intégration continue GitHub Actions (Linux x86_64 + arm64) - [ ] Paquets Linux : `.deb`, Flatpak et AppImage ; Haiku : `.hpkg` +- [ ] Binaires x86_64 + arm64 joints à chaque release (à partir de 1.0.0) ## Architecture ```