Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5bb24a9
WIP
loverdos Aug 1, 2025
7f5020f
WIP
loverdos Aug 1, 2025
71d4b00
WIP
loverdos Aug 1, 2025
612c0b8
WIP
loverdos Aug 1, 2025
11b98ae
WIP
loverdos Aug 1, 2025
94df977
WIP
loverdos Aug 1, 2025
a9e6c58
WIP
loverdos Aug 1, 2025
698b447
WIP
loverdos Aug 1, 2025
dc85228
WIP
loverdos Aug 1, 2025
a8c2abc
WIP
loverdos Aug 1, 2025
132d58c
WIP
loverdos Aug 1, 2025
c91113b
WIP
loverdos Aug 1, 2025
bf4c621
WIP
loverdos Aug 1, 2025
4f45aed
WIP
loverdos Aug 1, 2025
eff8e5f
WIP
loverdos Aug 1, 2025
bd236b0
update pre-commit hook
loverdos Aug 4, 2025
3b53a53
WIP
loverdos Aug 4, 2025
89e89cc
WIP
loverdos Aug 4, 2025
d55ceb9
WIP
loverdos Aug 4, 2025
cadfb7a
WIP
loverdos Aug 4, 2025
fb2cf85
WIP
loverdos Aug 4, 2025
1523c33
WIP
loverdos Aug 4, 2025
5c74ca7
WIP
loverdos Aug 4, 2025
926eb1e
WIP
loverdos Aug 4, 2025
b184720
WIP
loverdos Aug 4, 2025
614825c
WIP
loverdos Aug 4, 2025
779772d
WIP
loverdos Aug 4, 2025
a7c6ceb
WIP
loverdos Aug 4, 2025
c0f0e44
WIP
loverdos Aug 4, 2025
c4ddcec
WIP
loverdos Aug 4, 2025
2883969
WIP
loverdos Aug 4, 2025
938d857
WIP
loverdos Aug 4, 2025
d104c2c
WIP
loverdos Aug 4, 2025
6d71b57
WIP
loverdos Aug 4, 2025
e45f6cc
WIP
loverdos Aug 4, 2025
5ade59d
WIP
loverdos Aug 4, 2025
cde97ca
WIP
loverdos Aug 4, 2025
bc318b2
WIP
loverdos Aug 5, 2025
7d9ad26
WIP
loverdos Aug 5, 2025
ac5ad6c
WIP
loverdos Aug 5, 2025
7c8c000
WIP
loverdos Aug 5, 2025
96ed972
WIP
loverdos Aug 6, 2025
bae9eae
WIP
loverdos Aug 8, 2025
de12896
WIP
loverdos Aug 8, 2025
25c0c29
Merge branch 'main' into feat/pre-commit-sync-CI
loverdos Aug 8, 2025
8a481ad
Merge branch 'main' into feat/pre-commit-sync-CI
loverdos Aug 8, 2025
9d52bf1
Merge branch 'main' into feat/pre-commit-sync-CI
loverdos Aug 11, 2025
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
30 changes: 30 additions & 0 deletions .github/actions/cache/restore/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Restore cache
description: Restore cache using actions/cache/restore
inputs:
key:
description: 'An explicit key for restoring the cache'
required: true
restore-keys:
description: 'An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.'
required: true
outputs:
cache-primary-key:
description: 'A resolved cache key for which cache match was attempted'
value: ${{ steps.cache-action-restore.outputs.cache-primary-key }}

runs:
using: "composite"
steps:
- id: cache-action-restore
uses: actions/cache/restore@v4.2.3
with:
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
path: |
~/.cache/sccache
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/work/**/target
21 changes: 21 additions & 0 deletions .github/actions/cache/save/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Save cache
description: Save cache using actions/cache/save
inputs:
key:
description: 'An explicit key for saving the cache'
required: true

runs:
using: "composite"
steps:
- uses: actions/cache/save@v4.2.3
with:
key: ${{ inputs.key }}
path: |
~/.cache/sccache
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/work/**/target
23 changes: 23 additions & 0 deletions .github/actions/pre-commit/dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Install pre-commit dependencies
description: Install pre-commit dependencies

runs:
using: "composite"
steps:
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.13.0
with:
toolchain: nightly-2025-01-06, stable
override: true
components: rustfmt, clippy
cache: 'false'

# For more tools, see: https://github.com/taiki-e/install-action/blob/main/TOOLS.md
- name: Install Rust tools
uses: taiki-e/install-action@v2.57.8
with:
tool: cargo-binstall,just,cargo-nextest,typos

- name: Install NPM stuff from helpers/npm-install-g.txt
shell: bash
run: ./helpers/npm-install-g.sh
60 changes: 0 additions & 60 deletions .github/workflows/cli.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/pre-commit_(PR).yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Pre-commit hook (PR)
on:
pull_request:

# Fix for OOM.
env:
RUST_CACHE_VERBOSE: true
CARGO_BUILD_JOBS: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: >
-C codegen-units=1


jobs:
run-pre-commit:
name: Run pre-commit hook (PR branch)
runs-on: ubuntu-latest
steps:
- name: Get architecture
id: get-arch
run: echo "ARCH=$(uname -m)" >> $GITHUB_OUTPUT

- name: Check out repository code
uses: actions/checkout@v4

- name: Compute cache keys
id: cache-keys
run: |
# `main` branch cache keys
echo "MAIN_CACHE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-main-${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_OUTPUT
echo "MAIN_CACHE_RESTORE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-main-" >> $GITHUB_OUTPUT
# PR branch cache keys
echo "PR_CACHE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-PR-${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_OUTPUT
echo "PR_CACHE_RESTORE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-PR-" >> $GITHUB_OUTPUT

# Restoring the PR cache takes into account:
#
# 1. The PR cache itself, which is used to speed up the PR development cycle.
# 2. In case the above is missing, the main branch cache, which is used to bootstrap the PR cache.
- name: Restore cache (PR)
id: cache-restore
uses: ./.github/actions/cache/restore
with:
key: ${{ steps.cache-keys.outputs.PR_CACHE_KEY }}
restore-keys: |
${{ steps.cache-keys.outputs.PR_CACHE_RESTORE_KEY }}
${{ steps.cache-keys.outputs.MAIN_CACHE_RESTORE_KEY }}

- name: Install pre-commit dependencies
uses: ./.github/actions/pre-commit/dependencies

# Here it is ...
- name: Run pre-commit hook
run: ./.pre-commit/pre-commit

- name: Save cache (PR)
uses: ./.github/actions/cache/save
if: ${{ always() }}
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
58 changes: 58 additions & 0 deletions .github/workflows/pre-commit_(main).yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Pre-commit hook (main)
on:
push:
branches:
- main

# Fix for OOM.
env:
RUST_CACHE_VERBOSE: true
CARGO_BUILD_JOBS: 1
CARGO_INCREMENTAL: 0
RUSTFLAGS: >
-C codegen-units=1

jobs:
run-pre-commit:
name: Run pre-commit hook (main branch)
runs-on: ubuntu-latest
steps:
- name: Get architecture
id: get-arch
run: echo "ARCH=$(uname -m)" >> $GITHUB_OUTPUT

- name: Check out repository code
uses: actions/checkout@v4

- name: Compute cache keys
id: cache-keys
run: |
# `main` branch cache keys
echo "MAIN_CACHE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-main-${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_OUTPUT
echo "MAIN_CACHE_RESTORE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-main-" >> $GITHUB_OUTPUT
# PR branch cache keys
echo "PR_CACHE_RESTORE_KEY=v7-${{ runner.os }}-${{ steps.get-arch.outputs.ARCH }}-PR-" >> $GITHUB_OUTPUT

- name: Restore cache (main)
id: cache-restore
uses: ./.github/actions/cache/restore
with:
key: ${{ steps.cache-keys.outputs.MAIN_CACHE_KEY }}
restore-keys: |
${{ steps.cache-keys.outputs.MAIN_CACHE_RESTORE_KEY }}
${{ steps.cache-keys.outputs.MAIN_CACHE_RESTORE_KEY0 }}
${{ steps.cache-keys.outputs.PR_CACHE_RESTORE_KEY }}

- name: Install pre-commit dependencies
uses: ./.github/actions/pre-commit/dependencies

# Here it is ...
- name: Run pre-commit hook
run: ./.pre-commit/pre-commit


- name: Save cache (main)
uses: ./.github/actions/cache/save
if: ${{ always() }}
with:
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
62 changes: 0 additions & 62 deletions .github/workflows/sdk.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/toolkit-rust.yml

This file was deleted.

Loading
Loading