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
16 changes: 16 additions & 0 deletions .github/workflows/check-retrace-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Retrace Spec

on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Check for newer retrace spec
run: ./scripts/check-retrace-spec.sh
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy --no-self-update
- uses: Swatinem/rust-cache@v2
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: rustup toolchain install stable --profile minimal --no-self-update
- uses: Swatinem/rust-cache@v2
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
# Fetch all commits so we can determine previous version
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --component clippy --no-self-update
Expand Down
25 changes: 25 additions & 0 deletions scripts/check-retrace-spec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail

TRACKED_COMMIT="e212426be84283876b6bb832630c0de25a2a7bc5"

# tail -n +2 to remove the magic anti-XSSI prefix from the Gitiles JSON response
LATEST_COMMIT=$(curl -sf \
'https://r8.googlesource.com/r8/+log/refs/heads/main/doc/retrace.md?format=JSON' \
| tail -n +2 \
| jq -r '.log[0].commit')

if [ -z "$LATEST_COMMIT" ] || [ "$LATEST_COMMIT" = "null" ]; then
echo "ERROR: Failed to fetch latest commit from Gitiles" >&2
exit 1
fi

echo "Tracked commit: $TRACKED_COMMIT"
echo "Latest commit: $LATEST_COMMIT"

if [ "$LATEST_COMMIT" != "$TRACKED_COMMIT" ]; then
echo "Spec has been updated! Latest: https://r8.googlesource.com/r8/+/${LATEST_COMMIT}/doc/retrace.md"
exit 1
fi

echo "Spec is up to date."
Loading