chore(deps): update dtolnay/rust-toolchain digest to 21dc36f (#213) #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Clippy Check | |
permissions: read-all | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
# sccache enablement | |
SCCACHE_GHA_ENABLED: true | |
RUSTC_WRAPPER: sccache | |
# For pushes to any branch, we want to test the build. | |
# Force the build to run on the latest commit of the branch. If a new commit is pushed while the build is running, the build will be cancelled. | |
# This is to ensure that the build is always run on the latest commit and doesn't waste resources on outdated commits. | |
concurrency: | |
group: rust-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | |
- name: Install bun | |
uses: oven-sh/setup-bun@8f24390df009a496891208e5e36b8a1de1f45135 #v1 | |
- name: Create Fake .env File (dotenvy_macro requirement) | |
run: | | |
touch src-tauri/.env | |
echo APTABASE_KEY=${{ secrets.APTABASE_KEY }} >> src-tauri/.env | |
- name: Install Dependencies | |
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature. | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends libwebkit2gtk-4.0-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
file \ | |
libssl-dev \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
sudo apt-get install --no-install-recommends javascriptcoregtk-4.1 \ | |
libsoup-3.0 \ | |
webkit2gtk-4.1 | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # v0.0.4 | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 # master | |
with: | |
toolchain: stable | |
- name: Install Client Dependencies & Build | |
run: | | |
bun install | |
bun run build | |
- name: Build the Tauri App | |
run: bunx tauri build | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_PRIVATE_KEY_PASSWORD }} | |
- name: Show sccache stats | |
shell: bash | |
run: | | |
echo '## SCCACHE STATS' >> $GITHUB_STEP_SUMMARY | |
echo '| Metric | Value |' >> $GITHUB_STEP_SUMMARY | |
echo '|--------|-------|' >> $GITHUB_STEP_SUMMARY | |
${SCCACHE_PATH} --show-stats | awk -F'[[:space:]][[:space:]]+' 'NR<=22{ print "| "$1" | "$2" |"}' >> $GITHUB_STEP_SUMMARY | |
echo '</hr>' >> $GITHUB_STEP_SUMMARY | |
- name: Run clippy | |
run: | | |
cd src-tauri | |
cargo clippy -- -D warnings |