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
5 changes: 3 additions & 2 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ inputs:
runs:
using: composite
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: ${{ inputs.targets }}

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
key: ${{ inputs.cache-key }}
save-if: false

- name: Stamp the version
shell: bash
Expand Down
21 changes: 21 additions & 0 deletions .github/actions/sidecar/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: The resident the picker carries
description: >-
`externalBin` in tauri.conf.json makes the binary a build-time requirement of
the picker, so anything that compiles the workspace — a test, a clippy run —
needs it there first, not only a bundle.

inputs:
profile:
description: debug or release.
required: false
default: debug
target:
description: Rust target the resident is built for, empty for the host.
required: false
default: ""

runs:
using: composite
steps:
- shell: bash
run: bash scripts/sidecar.sh "${{ inputs.profile }}" "${{ inputs.target }}"
73 changes: 73 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
version: 2

updates:
- package-ecosystem: github-actions
directories:
- /
- /.github/actions/prepare
- /.github/actions/sidecar
schedule:
interval: monthly
open-pull-requests-limit: 3
commit-message:
prefix: "chore"
groups:
actions:
patterns:
- "*"
update-types:
- minor
- patch
actions-majors:
patterns:
- "*"
update-types:
- major

- package-ecosystem: cargo
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 3
commit-message:
prefix: "chore"
groups:
rust:
patterns:
- "*"
update-types:
- minor
- patch
rust-majors:
patterns:
- "*"
update-types:
- major

- package-ecosystem: npm
directory: /app
schedule:
interval: monthly
open-pull-requests-limit: 3
commit-message:
prefix: "chore"
groups:
picker:
patterns:
- "*"
update-types:
- minor
- patch
picker-majors:
patterns:
- "*"
update-types:
- major

- package-ecosystem: npm
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 1
commit-message:
prefix: "chore"
20 changes: 14 additions & 6 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
CARGO_TERM_COLOR: always

Expand All @@ -38,9 +42,11 @@ jobs:
runs-on: windows-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- uses: actions/setup-node@v7
with:
Expand Down Expand Up @@ -98,11 +104,13 @@ jobs:
env:
TARGET: aarch64-apple-darwin
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
targets: aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- uses: actions/setup-node@v7
with:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Caches

on:
pull_request_target:
types: [closed]
workflow_run:
workflows: ["CI"]
types: [completed]
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
inputs:
dry_run:
description: "List what would go, delete nothing."
type: boolean
default: true

permissions:
actions: write

jobs:
sweep:
name: a closed pull request takes its caches with it
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Everything written under this pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
REF: refs/pull/${{ github.event.pull_request.number }}/merge
run: gh cache delete --all --ref "$REF" --succeed-on-no-caches

generations:
name: one generation of each cache, and nothing a tag left behind
if: >-
github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
|| (github.event_name == 'workflow_run'
&& github.event.workflow_run.event == 'push'
&& github.event.workflow_run.head_branch == 'main'
&& github.event.workflow_run.head_repository.full_name == github.repository
&& github.event.workflow_run.conclusion != 'cancelled')
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
actions: write
contents: read
concurrency:
group: cache-generations
cancel-in-progress: false
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: What no build will ask for again
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
run: python3 scripts/generations.py
Loading
Loading