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
50 changes: 26 additions & 24 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,40 +61,33 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "frontend/src-tauri -> target"
cache-on-failure: true

- name: Cache Cargo registry
- name: Install sccache
run: |
SCCACHE_VERSION=0.8.2
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz"
curl -L "$SCCACHE_URL" | tar xz
sudo mv sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache /usr/local/bin/
chmod +x /usr/local/bin/sccache
sccache --version

- name: Cache sccache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-android-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
${{ runner.os }}-sccache-android-
${{ runner.os }}-sccache-

- name: Cache Cargo bin
- name: Cache Cargo bin (Tauri CLI)
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-tauri-cli
key: ${{ runner.os }}-cargo-bin-tauri-cli-2.9.2
restore-keys: |
${{ runner.os }}-cargo-bin-tauri-cli-
${{ runner.os }}-cargo-bin-

- name: Cache APT packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-android-${{ hashFiles('.github/workflows/android-build.yml') }}
restore-keys: |
${{ runner.os }}-apt-android-
${{ runner.os }}-apt-

- name: Install Linux dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -142,6 +135,12 @@ jobs:

echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE"

- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Build Tauri Android App (Signed Release)
working-directory: ./frontend
run: |
Expand Down Expand Up @@ -184,6 +183,9 @@ jobs:
VITE_MAPLE_BILLING_API_URL: ${{ github.event_name == 'pull_request' && 'https://billing-dev.opensecret.cloud' || 'https://billing.opensecret.cloud' }}
VITE_CLIENT_ID: ba5a14b5-d915-47b1-b7b1-afda52bc5fc6

- name: Show sccache stats
run: sccache --show-stats

- name: Upload Android APK
uses: actions/upload-artifact@v4
with:
Expand Down
48 changes: 22 additions & 26 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ jobs:
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin,aarch64-apple-ios

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: "frontend/src-tauri -> target"
cache-on-failure: true
- name: Install sccache
run: |
SCCACHE_VERSION=0.8.2
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz"
curl -L "$SCCACHE_URL" | tar xz
sudo mv sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache /usr/local/bin/
chmod +x /usr/local/bin/sccache
sccache --version

- name: Cache APT packages
- name: Cache sccache
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/claude.yml') }}
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-claude-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-apt-
${{ runner.os }}-sccache-claude-
${{ runner.os }}-sccache-

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
Expand All @@ -101,25 +101,21 @@ jobs:
working-directory: ./frontend
run: bun install

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache Cargo bin
- name: Cache Cargo bin (Tauri CLI)
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-tauri-cli
key: ${{ runner.os }}-cargo-bin-tauri-cli-2.9.2
restore-keys: |
${{ runner.os }}-cargo-bin-tauri-cli-
${{ runner.os }}-cargo-bin-

- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Install Tauri CLI
run: |
if ! command -v cargo-tauri &> /dev/null; then
Expand Down
87 changes: 71 additions & 16 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,41 @@ jobs:
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Cache Homebrew
uses: actions/cache@v4
with:
workspaces: "frontend/src-tauri -> target"
cache-on-failure: true

- name: Install dependencies (macOS)
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar/sccache
/opt/homebrew/Cellar/openssl@3
key: ${{ runner.os }}-brew-${{ hashFiles('.github/workflows/desktop-build.yml') }}
restore-keys: |
${{ runner.os }}-brew-

- name: Install sccache
run: |
brew install openssl@3
brew install sccache
brew link --overwrite --force sccache
sccache --version

- name: Cache sccache
uses: actions/cache@v4
with:
path: ~/Library/Caches/Mozilla.sccache
key: ${{ runner.os }}-sccache-macos-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-macos-
${{ runner.os }}-sccache-

- name: Install frontend dependencies
working-directory: ./frontend
run: bun install

- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Import Apple Developer Certificate
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
Expand Down Expand Up @@ -80,6 +101,9 @@ jobs:
projectPath: './frontend'
args: --target ${{ matrix.target }}

- name: Show sccache stats
run: sccache --show-stats

- name: Upload macOS Build
uses: actions/upload-artifact@v4
with:
Expand All @@ -102,20 +126,37 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install sccache
run: |
SCCACHE_VERSION=0.8.2
SCCACHE_URL="https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz"
curl -L "$SCCACHE_URL" | tar xz
sudo mv sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl/sccache /usr/local/bin/
chmod +x /usr/local/bin/sccache
sccache --version

- name: Cache sccache
uses: actions/cache@v4
with:
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-linux-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-sccache-linux-
${{ runner.os }}-sccache-

- name: Cache Cargo bin (Tauri CLI)
uses: actions/cache@v4
with:
workspaces: "frontend/src-tauri -> target"
cache-on-failure: true
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-tauri-cli-2.9.2
restore-keys: |
${{ runner.os }}-cargo-bin-tauri-cli-
${{ runner.os }}-cargo-bin-

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
Expand All @@ -126,10 +167,21 @@ jobs:
run: bun install

- name: Install Tauri CLI
run: cargo install tauri-cli --version "2.9.2" --locked
run: |
if ! command -v cargo-tauri &> /dev/null; then
cargo install tauri-cli --version "2.9.2" --locked
else
echo "Tauri CLI already installed"
fi
env:
CARGO_CFG_TARGET_OS: linux

- name: Configure sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_DIR=$HOME/.cache/sccache" >> $GITHUB_ENV
echo "SCCACHE_CACHE_SIZE=2G" >> $GITHUB_ENV

- name: Build Tauri App (Linux)
working-directory: ./frontend
run: cargo tauri build
Expand All @@ -140,6 +192,9 @@ jobs:
VITE_MAPLE_BILLING_API_URL: ${{ github.event_name == 'pull_request' && 'https://billing-dev.opensecret.cloud' || 'https://billing.opensecret.cloud' }}
VITE_CLIENT_ID: ba5a14b5-d915-47b1-b7b1-afda52bc5fc6

- name: Show sccache stats
run: sccache --show-stats

- name: Upload Linux Builds
uses: actions/upload-artifact@v4
with:
Expand Down
38 changes: 30 additions & 8 deletions .github/workflows/mobile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,32 @@ jobs:
with:
targets: aarch64-apple-ios

- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Cache Homebrew
uses: actions/cache@v4
with:
workspaces: "frontend/src-tauri -> target"
cache-on-failure: true
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar/openssl@3
key: ${{ runner.os }}-brew-${{ hashFiles('.github/workflows/mobile-build.yml') }}
restore-keys: |
${{ runner.os }}-brew-

- name: Install dependencies (macOS)
run: |
brew install openssl@3
- name: Cache Xcode DerivedData and SourcePackages
uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-ios-${{ github.workflow }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
xcode-cache-ios-${{ github.workflow }}-
xcode-cache-ios-

- name: Cache Cargo bin (Tauri CLI)
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-tauri-cli-2.9.2
restore-keys: |
${{ runner.os }}-cargo-bin-tauri-cli-
${{ runner.os }}-cargo-bin-

- name: Install frontend dependencies
working-directory: ./frontend
Expand All @@ -42,7 +59,12 @@ jobs:
xcode-version: '16.4'

- name: Install Tauri CLI
run: cargo install tauri-cli --version "2.9.2" --locked
run: |
if ! command -v cargo-tauri &> /dev/null; then
cargo install tauri-cli --version "2.9.2" --locked
else
echo "Tauri CLI already installed"
fi
env:
# Workaround for getrandom v0.2.16 (https://github.com/rust-random/getrandom/issues/641)
# cargo install builds for the host; on macOS runners target_os is "macos"
Expand Down
Loading
Loading