Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
HEAD_SHA=$(git rev-parse HEAD)
PREV_SHA=$(gh api "repos/${{ github.repository }}/git/refs/tags/nightly" \
--jq '.object.sha' 2>/dev/null || true)
--jq '.object.sha' 2>/dev/null) || PREV_SHA=

if [ "$HEAD_SHA" = "$PREV_SHA" ]; then
echo "No new commits on main since last nightly build ($HEAD_SHA); skipping."
Expand All @@ -44,7 +44,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_ID=$(gh api "repos/${{ github.repository }}/releases/tags/nightly" --jq '.id' 2>/dev/null || true)
# On 404, gh prints the error JSON to stdout, so discard output on failure.
RELEASE_ID=$(gh api "repos/${{ github.repository }}/releases/tags/nightly" --jq '.id' 2>/dev/null) || RELEASE_ID=

if [ -n "$RELEASE_ID" ]; then
echo "Deleting existing nightly release"
Expand Down Expand Up @@ -140,8 +141,12 @@ jobs:
# since the Android/iOS toolchains are slow; signed builds live in mobile.yml.
android:
name: android build (unsigned debug)
needs: check
if: needs.check.outputs.should_run == 'true'
# After release, so the nightly release exists to attach the APK to.
needs: [check, release]
# Still build if one desktop target fails; the release exists either way.
if: ${{ !cancelled() && needs.check.outputs.should_run == 'true' }}
permissions:
contents: write
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
Expand All @@ -158,7 +163,7 @@ jobs:
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
targets: aarch64-linux-android

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -188,10 +193,14 @@ jobs:
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.0.12077973
run: npm run mobile:android:init

# arm64 only, without debug symbols: the universal unstripped build
# is ~2.4 GB, too big to sideload. This keeps it under ~100 MB.
- name: Build unsigned debug APK
env:
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.0.12077973
run: npm run mobile:android:build -- --debug
CARGO_PROFILE_DEV_DEBUG: "false"
CARGO_PROFILE_DEV_STRIP: "true"
run: npm run mobile:android:build -- --debug --apk --target aarch64

- name: Upload APK
uses: actions/upload-artifact@v4
Expand All @@ -201,6 +210,14 @@ jobs:
if-no-files-found: error
retention-days: 7

- name: Attach APK to nightly release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
APK=$(find src-tauri/gen/android/app/build/outputs/apk -name '*.apk' | head -n1)
cp "$APK" treq-nightly-android-arm64.apk
gh release upload nightly treq-nightly-android-arm64.apk --clobber

ios:
name: ios build (unsigned debug)
needs: check
Expand Down
6 changes: 6 additions & 0 deletions web/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ Download the latest version for your platform from the GitHub Releases page.

[View Releases](https://github.com/Ziinc/treq/releases)

### Nightly builds

A nightly build of `main` is published each day there are new commits. It has the same desktop targets plus an arm64 Android debug APK (`treq-nightly-android-arm64.apk`). Nightly builds are untested prereleases, so expect bugs.

[Download the nightly build](https://github.com/treq-dev/treq/releases/tag/nightly)

Treq works with ordinary Git repositories. You do not need to install or learn [Jujutsu](https://docs.jj-vcs.dev/latest/install-and-setup/) to use it. Treq initializes colocated Jujutsu metadata itself when you open a repo, and it runs Git and Jujutsu operations [under the hood](/docs/under-the-hood).

:::tip[Optional: install `jj` only for power-user debugging]
Expand Down
Loading