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
39 changes: 15 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,33 @@
version: 2
updates:
- package-ecosystem: npm
directory: /

# npm and Cargo land in one PR: one CI run instead of two (plus a rerun of whichever
# merges second), and the Tauri npm packages and crates always move together. A Cargo
# bump merged ahead of its npm counterpart once broke release builds with
# "Found version mismatched Tauri packages".
multi-ecosystem-groups:
app-deps:
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies

updates:
- package-ecosystem: npm
directory: /
multi-ecosystem-group: app-deps
patterns: ["*"]
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
groups:
npm-minor-patch:
patterns:
- "*"
update-types:
- minor
- patch

- package-ecosystem: cargo
directory: /src-tauri
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies
multi-ecosystem-group: app-deps
patterns: ["*"]
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
groups:
cargo-minor-patch:
patterns:
- "*"
update-types:
- minor
- patch

- package-ecosystem: github-actions
directory: /
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Replaces CodeQL default setup, which also scanned every push to main. With "require
# branches to be up to date" on main, a merge commit has the same tree the PR's scan
# just analyzed, so main is only rescanned weekly (keeps its alert state current).
name: CodeQL

on:
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
strategy:
fail-fast: false
matrix:
language: [actions, javascript-typescript, python, rust]
steps:
- uses: actions/checkout@v7

- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none

- uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}
36 changes: 36 additions & 0 deletions .github/workflows/release-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,39 @@ concurrency:
cancel-in-progress: true

jobs:
# A release's version bump touches Cargo.toml/Cargo.lock but no dependency, and
# rust-cache only caches dependencies, so the existing caches still fit. Skip those.
changes:
runs-on: ubuntu-latest
outputs:
deps: ${{ steps.check.outputs.deps }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0

- id: check
env:
BEFORE: ${{ github.event.before }}
run: |
if [ "$GITHUB_EVENT_NAME" != push ] || ! git cat-file -e "$BEFORE^{commit}" 2>/dev/null; then
echo "deps=true" >> "$GITHUB_OUTPUT"; exit 0
fi
# Blank out the app's own version, then compare.
norm_lock() { git show "$1:src-tauri/Cargo.lock" | awk '/^name = "wavetrace"$/ { print; getline; print "version = -"; next } { print }'; }
norm_toml() { git show "$1:src-tauri/Cargo.toml" | awk '/^\[/ { sec = $0 } sec == "[package]" && /^version = / { print "version = -"; next } { print }'; }
if git diff --quiet "$BEFORE" HEAD -- .github/workflows/release-cache.yml \
&& cmp -s <(norm_lock "$BEFORE") <(norm_lock HEAD) \
&& cmp -s <(norm_toml "$BEFORE") <(norm_toml HEAD); then
echo "Only the wavetrace version changed; caches are still valid."
echo "deps=false" >> "$GITHUB_OUTPUT"
else
echo "deps=true" >> "$GITHUB_OUTPUT"
fi

native:
needs: changes
if: needs.changes.outputs.deps == 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -73,6 +105,8 @@ jobs:
run: npm run tauri build -- --no-bundle

macos:
needs: changes
if: needs.changes.outputs.deps == 'true'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -109,6 +143,8 @@ jobs:
run: npm run tauri build -- --target ${{ matrix.target }} --no-bundle --config src-tauri/tauri.macos.ci.conf.json

arch:
needs: changes
if: needs.changes.outputs.deps == 'true'
runs-on: ubuntu-latest
container:
image: archlinux:latest
Expand Down
Loading