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
13 changes: 11 additions & 2 deletions .github/actions/cache-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,26 @@ runs:
run: |
echo "path=$(npm config get cache)" >> "$GITHUB_OUTPUT"
echo "arch=$(node -p process.arch)" >> "$GITHUB_OUTPUT"
# Prefer verified tarballs already in the download cache. Keep network
# retries bounded; npm ci still validates the lockfile and integrity.
echo 'NPM_CONFIG_PREFER_OFFLINE=true' >> "$GITHUB_ENV"
echo 'NPM_CONFIG_AUDIT=false' >> "$GITHUB_ENV"
echo 'NPM_CONFIG_FUND=false' >> "$GITHUB_ENV"
echo 'NPM_CONFIG_FETCH_RETRIES=2' >> "$GITHUB_ENV"
echo 'NPM_CONFIG_FETCH_TIMEOUT=60000' >> "$GITHUB_ENV"
# Keep setup-node's existing key and path so the current beta cache remains
# reusable. Cache lookup falls back to the PR base/default branch on a miss.
- name: Restore npm outside beta builds
if: github.ref != 'refs/heads/beta' || (github.event_name != 'push' && github.event_name != 'workflow_dispatch')
if: github.ref != 'refs/heads/beta' || (github.event_name != 'push' && github.event_name != 'workflow_dispatch' && github.event_name != 'schedule')
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm.outputs.path }}
key: node-cache-${{ runner.os }}-${{ steps.npm.outputs.arch }}-npm-${{ hashFiles('openless-all/app/package-lock.json') }}
restore-keys: node-cache-${{ runner.os }}-${{ steps.npm.outputs.arch }}-npm-
- name: Maintain npm cache on beta builds
if: github.ref == 'refs/heads/beta' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
if: github.ref == 'refs/heads/beta' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
uses: actions/cache@v4
with:
path: ${{ steps.npm.outputs.path }}
key: node-cache-${{ runner.os }}-${{ steps.npm.outputs.arch }}-npm-${{ hashFiles('openless-all/app/package-lock.json') }}
restore-keys: node-cache-${{ runner.os }}-${{ steps.npm.outputs.arch }}-npm-
31 changes: 22 additions & 9 deletions .github/workflows/android-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ on:
type: boolean
default: false

# Repeated pushes of the same tag run only the newest; workflow_dispatch isolates by run_id to avoid mutual cancellation.
# Supersede equivalent manual builds; different ABI/profile/signing requests stay
# independent. Tag publication must finish once started.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || github.ref }}
cancel-in-progress: ${{ github.event_name == 'push' }}
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}-${{ inputs.abis || 'aarch64' }}-${{ inputs.fast_profile || false }}-${{ inputs.signed_debug || false }}
cancel-in-progress: ${{ github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/') }}

jobs:
plan:
timeout-minutes: 10
name: Plan Android ABI matrix
permissions:
contents: read
Expand Down Expand Up @@ -148,6 +150,7 @@ jobs:
echo "Resolved ABIs: $abi_list (fast_profile=$fast)"

build-android-apk:
timeout-minutes: 90
name: Build Android (${{ matrix.abi }})
needs: plan
# Publishing is `publish-android-release`. Branch and schedule builds only
Expand Down Expand Up @@ -226,6 +229,7 @@ jobs:
packages: platform-tools

- name: Install NDK and accept SDK licenses
timeout-minutes: 15
shell: bash
run: |
set -euo pipefail
Expand All @@ -249,8 +253,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: openless-all/app/package-lock.json
- name: Cache npm from beta
uses: ./.github/actions/cache-npm

- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -265,13 +269,15 @@ jobs:
shared-key: android-${{ matrix.abi }}
workspaces: openless-all/app/src-tauri -> target
cache-on-failure: true
save-if: ${{ github.ref == 'refs/heads/beta' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}

- uses: gradle/actions/setup-gradle@v4
with:
# Keep Gradle caches for post-job save; do not wipe ~/.gradle before post.
cache-read-only: false
# Keep reusable baseline caches; avoid one large copy per release tag.
cache-read-only: ${{ github.ref != 'refs/heads/beta' || (github.event_name != 'schedule' && github.event_name != 'workflow_dispatch') }}

- name: Install npm deps
timeout-minutes: 10
working-directory: openless-all/app
run: npm ci

Expand Down Expand Up @@ -318,6 +324,7 @@ jobs:
run: node scripts/configure-android-release-signing.mjs

- name: Prime Gradle wrapper
timeout-minutes: 10
working-directory: openless-all/app
shell: bash
run: |
Expand All @@ -333,6 +340,7 @@ jobs:
exit 1

- name: Build Android debug APK
timeout-minutes: 70
if: needs.plan.outputs.mode == 'debug'
working-directory: openless-all/app
env:
Expand All @@ -343,6 +351,7 @@ jobs:
run: npm run tauri:android:build:debug

- name: Build Android release APK
timeout-minutes: 70
if: needs.plan.outputs.mode == 'release'
working-directory: openless-all/app
env:
Expand Down Expand Up @@ -379,6 +388,7 @@ jobs:
- name: Upload Android APK artifact
uses: actions/upload-artifact@v4
with:
retention-days: 14
name: ${{ needs.plan.outputs.mode == 'release' && format('openless-android-release-{0}', matrix.gradle_abi) || format('openless-android-debug-{0}', matrix.gradle_abi) }}
path: ${{ steps.apk.outputs.apk_path }}
if-no-files-found: error
Expand Down Expand Up @@ -413,6 +423,7 @@ jobs:
fi

publish-android-release:
timeout-minutes: 30
name: Publish Android release assets
if: needs.plan.outputs.is_tag_release == 'true'
needs: [plan, build-android-apk]
Expand All @@ -431,10 +442,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: openless-all/app/package-lock.json
- name: Cache npm from beta
uses: ./.github/actions/cache-npm

- name: Install npm deps
timeout-minutes: 10
working-directory: openless-all/app
run: npm ci

Expand Down Expand Up @@ -532,6 +544,7 @@ jobs:
- name: Upload Android updater manifests
uses: actions/upload-artifact@v4
with:
retention-days: 14
name: openless-android-updater-manifests
if-no-files-found: error
path: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/check-linux-egui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
if: inputs.scope != 'none'

- name: Install native build and test dependencies
timeout-minutes: 10
if: inputs.scope != 'none'
# Same list as the packaging job: the fcitx5 plugin build and the
# `pwsh` contract scripts both live here now.
Expand Down Expand Up @@ -103,6 +104,7 @@ jobs:
test -s build/openless.conf

- name: Test Core, Linux host, and platform boundaries
timeout-minutes: 40
if: inputs.scope != 'none'
working-directory: openless-all/app
run: |
Expand Down Expand Up @@ -136,6 +138,7 @@ jobs:
pwsh -NoProfile -File ./scripts/check-linux-public-surface.ps1

- name: Test remote input TLS identity and Unix key permissions
timeout-minutes: 20
if: inputs.scope != 'none'
working-directory: openless-all/app
run: cargo test --locked --manifest-path src-tauri/backend-tests/Cargo.toml --test remote_tls
Expand All @@ -162,6 +165,7 @@ jobs:
ref: ${{ inputs.checkout_ref || github.ref }}

- name: Install native build and packaging dependencies
timeout-minutes: 10
if: inputs.scope != 'none'
run: |
sudo add-apt-repository -y universe || true
Expand Down Expand Up @@ -235,11 +239,13 @@ jobs:
appstreamcli validate --no-net openless-all/app/linux-egui/packaging/top.openless.OpenLess.metainfo.xml

- name: Build Linux egui host
timeout-minutes: 40
if: inputs.scope != 'none'
working-directory: openless-all/app
run: cargo build --locked --release -p openless-linux-egui

- name: Package deb and rpm without Tauri
timeout-minutes: 10
if: inputs.scope != 'none'
working-directory: openless-all/app
env:
Expand Down Expand Up @@ -285,6 +291,7 @@ jobs:
if: inputs.scope != 'none' && (github.event_name != 'push' || env.RELEASE_TAG != '')
uses: actions/upload-artifact@v7
with:
retention-days: 14
name: openless-linux-egui-x86_64
path: openless-all/app/target/linux-egui-packages/*
if-no-files-found: error
Expand All @@ -293,6 +300,7 @@ jobs:
if: inputs.scope != 'none' && (github.event_name != 'push' || env.RELEASE_TAG != '')
uses: actions/upload-artifact@v7
with:
retention-days: 14
name: openless-linux-egui-direct-download
path: ${{ runner.temp }}/openless-linux-egui-direct-download/*
if-no-files-found: error
Expand Down
Loading
Loading