43 lines
1.8 KiB
YAML
43 lines
1.8 KiB
YAML
# Shared setup of the Linux jobs (ci.yml; release.yml's ci and linux jobs) on the VDS runner (label ubuntu-22.04, the
|
|
# catthehacker act image): Tauri's system packages plus `packages`, the Bun / Cargo caches, Bun and Rust on PATH.
|
|
name: linux-setup
|
|
description: System packages, caches, Bun and Rust for storebound's Linux jobs
|
|
inputs:
|
|
packages:
|
|
description: Extra apt packages
|
|
default: ''
|
|
cache-key:
|
|
description: Cache key prefix (separate caches for CI and the installer build)
|
|
default: ci
|
|
rust-components:
|
|
description: Extra rustup components (for example clippy)
|
|
default: ''
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: System packages
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y -qq --no-install-recommends libwebkit2gtk-4.1-dev libgtk-3-dev \
|
|
libayatana-appindicator3-dev librsvg2-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libssl-dev libxdo-dev \
|
|
build-essential curl unzip pkg-config ${{ inputs.packages }} >/dev/null
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.bun/install/cache
|
|
~/.cache/tauri
|
|
~/.cargo/registry/index
|
|
~/.cargo/registry/cache
|
|
~/.cargo/git/db
|
|
key: ${{ inputs.cache-key }}-${{ runner.os }}-${{ hashFiles('bun.lock', 'apps/desktop/src-tauri/Cargo.lock') }}
|
|
restore-keys: ${{ inputs.cache-key }}-${{ runner.os }}-
|
|
- name: Bun and Rust
|
|
shell: bash
|
|
run: |
|
|
P="${FORGEJO_PATH:-$GITHUB_PATH}"
|
|
bash tools/ci-install-bun.sh
|
|
echo "$HOME/.bun/bin" >> "$P"
|
|
command -v rustup || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
|
echo "$HOME/.cargo/bin" >> "$P"
|
|
for c in ${{ inputs.rust-components }}; do "$HOME/.cargo/bin/rustup" component add "$c"; done
|