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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/rust"
pull-request-branch-name:
separator: "-"
schedule:
interval: "weekly"
cooldown:
default-days: 7
groups:
rust-dependencies:
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
groups:
actions-dependencies:
patterns:
Expand Down
9 changes: 9 additions & 0 deletions .github/pinact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 3
rules:
# Branch refs that must keep tracking their branch: there is no stable tag
# to pin to. lean-update's `dev` carries the fork's features, and the shared
# ci-workflows actions are consumed from `main`.
- ignore: true
conditions:
- expr: ActionName == "argumentcomputer/lean-update"
- expr: ActionName matches "^argumentcomputer/ci-workflows/"
53 changes: 38 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -16,9 +19,11 @@ jobs:
name: Lean Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions-rust-lang/setup-rust-toolchain@v2
- uses: leanprover/lean-action@v1
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
- uses: leanprover/lean-action@50fcf42d2e460296f1a34b402e990d1b24f8b596 # v1.6.0
with:
build-args: "--wfail"
test: true
Expand All @@ -27,15 +32,20 @@ jobs:
needs: lean-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions-rust-lang/setup-rust-toolchain@v2
# Only restore the cache, since the `test` job will save the test binary to the cache first
- uses: actions/cache/restore@v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: ./test/.lake
key: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('test/lake-manifest.json') }}-${{ github.sha }}
restore-keys: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('test/lake-manifest.json') }}
- uses: leanprover/lean-action@v1
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
# Restore the `.lake` that lean-action saved in the lean-test job for
# this commit, so the test binary is not rebuilt from scratch. Restore
# only: lean-action below runs with its cache off to avoid a second save
# under the same key.
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ./.lake
key: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}-${{ github.sha }}
restore-keys: lake-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('lean-toolchain') }}-${{ hashFiles('lake-manifest.json') }}
- uses: leanprover/lean-action@50fcf42d2e460296f1a34b402e990d1b24f8b596 # v1.6.0
with:
auto-config: false
build: true
Expand All @@ -57,12 +67,14 @@ jobs:
name: Nix Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v17
github_access_token: ${{ github.token }}
- uses: cachix/cachix-action@38b082610b782e7e93e209c35fd730d399dee866 # v17
with:
name: argumentcomputer
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
Expand All @@ -74,3 +86,14 @@ jobs:
# Catch-all: near-free after the steps above; fails if a check is added
# to the flake without a step here.
- run: nix flake check --accept-flake-config

lints:
name: Lint workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# actionlint, shellcheck over composite action scripts, pinact (actions
# must be SHA-pinned with a matching version comment) and zizmor
- uses: argumentcomputer/ci-workflows/.github/actions/lint-workflows@main
8 changes: 5 additions & 3 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- uses: cachix/install-nix-action@v31
- uses: cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24 # v31.11.1
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
github_access_token: ${{ github.token }}

# `dev` carries pinned-tag updates and lean4-nix gating; `main` only
# mirrors upstream and ignores these inputs.
Expand Down
8 changes: 8 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rules:
unpinned-uses:
config:
policies:
# Branch-tracking refs allowed by .github/pinact.yaml
"argumentcomputer/lean-update": ref-pin
"argumentcomputer/ci-workflows/*": ref-pin
"*": hash-pin
Loading