diff --git a/.github/workflows/build-nightly.yml b/.github/workflows/build-nightly.yml deleted file mode 100644 index db1a09bb..00000000 --- a/.github/workflows/build-nightly.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Build Nightly - -on: - push: - branches: [main] - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-26.04 - timeout-minutes: 60 - permissions: - contents: read - steps: - - uses: actions/checkout@v7 - with: - persist-credentials: false - - uses: ./.github/actions/build - with: - gradle-args: ":app:assembleDebug :app:assembleNightly --no-daemon" - - name: Collect - run: | - cp app/build/outputs/apk/debug/app-debug.apk subtracks-nightly-debug.apk - cp app/build/outputs/apk/nightly/app-nightly.apk subtracks-nightly.apk - - name: Checksums - run: sha256sum subtracks-nightly.apk subtracks-nightly-debug.apk - - uses: actions/upload-artifact@v7 - with: - name: subtracks-nightly - path: | - subtracks-nightly.apk - subtracks-nightly-debug.apk diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2781225c..e3c697ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,22 @@ jobs: persist-credentials: false - uses: ./.github/actions/build with: - gradle-args: ":app:ktlintCheck :app:lintDebug :app:testDebugUnitTest :app:assembleNightly --no-configuration-cache --console=plain --no-daemon" + gradle-args: ":app:ktlintCheck :app:lintDebug :app:testDebugUnitTest :app:assembleDebug :app:assembleNightly --no-configuration-cache --console=plain --no-daemon" + - name: Collect nightly builds + if: github.ref == 'refs/heads/main' + run: | + cp app/build/outputs/apk/debug/app-debug.apk subtracks-nightly-debug.apk + cp app/build/outputs/apk/nightly/app-nightly.apk subtracks-nightly.apk + - name: Checksums + if: github.ref == 'refs/heads/main' + run: sha256sum subtracks-nightly.apk subtracks-nightly-debug.apk + - uses: actions/upload-artifact@v7 + if: github.ref == 'refs/heads/main' + with: + name: subtracks-nightly + path: | + subtracks-nightly.apk + subtracks-nightly-debug.apk - uses: actions/cache@v6 with: path: .integration/music diff --git a/AGENTS.md b/AGENTS.md index 8eba6709..7734a2a6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,7 +34,7 @@ Everything comes from the Nix flake devshell; do not install toolchains by hand. ## CI -- Forgejo Actions, `.forgejo/workflows/ci.yml`, a single `ci` job that runs the lint, unit test and integration test steps (one cache restore/save and Gradle warm-up instead of three). +- Forgejo Actions, `.forgejo/workflows/ci.yml`, a single `ci` job that runs lint, the unit tests, the debug and nightly assembles and the integration suite (one cache restore/save and Gradle warm-up instead of several); the GitHub copy uploads the debug and nightly APKs as the `subtracks-nightly` artifact on a push to `main`. - Runs on the `nix-docker` runner (the `localhost/nix-ci` image built by the separate `nix-home` repo) inside the devshell, restoring the Nix store via `cache-nix-action` and caching Gradle and the integration test music. - The `nix-docker` and `bookworm` runner labels, their images and the runner's networking are defined in the separate `nix-home` repo (`hosts-incus/git-runner.nix`). - Pull requests from a fork need approval before the workflow runs.