Skip to content

chore(report): ratchet baseline, close sweep #1339

chore(report): ratchet baseline, close sweep

chore(report): ratchet baseline, close sweep #1339

Workflow file for this run

name: Compat Report
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
paths:
- ".github/workflows/compat-report.yml"
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
CARGO_INCREMENTAL: "0"
SCCACHE_DIR: /home/runner/.cache/sccache
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 1
persist-credentials: false
- name: Initialize optional corpora
run: git submodule update --init --depth 1 styles-legacy tests/csl-test-suite
- name: Set up Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Install mold linker and sccache
run: sudo apt-get update && sudo apt-get install -y mold sccache
- name: Install cargo-nextest
uses: taiki-e/install-action@0fd46367812ee04360509b4169d9f659d6892bb2 # v2
with:
tool: cargo-nextest
- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: "22"
- name: Cache Rust (dependencies + sccache)
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
shared-key: "citum-core-rust"
cache-workspace-crates: true
cache-directories: /home/runner/.cache/sccache
# Restored target caches can contain v8 build metadata without the
# downloaded native archive; rebuild only this package's artifacts.
- name: Invalidate cached rusty_v8 build artifacts
run: cargo clean -p v8
- name: Configure environment
run: |
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
sccache --start-server
- name: Install Node dependencies
run: npm install --prefix scripts
- name: Build documentation guides
run: |
npm run build:pages --prefix scripts
npm run build:layout --prefix scripts
npm run build:docs --prefix scripts
- name: Generate compatibility report
run: node scripts/report-core.js --all-features --output-html docs/compat.html > /tmp/core-report.json
- name: Generate behavior coverage report
run: |
./scripts/test-report.sh
cp target/test-report.html docs/behavior-report.html
./scripts/migration-test-report.sh
cp target/migration-behavior-report.html docs/migration-behavior-report.html
- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: ./docs
- name: Display sccache stats
run: sccache --show-stats
deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment1.outputs.page_url || steps.deployment2.outputs.page_url || steps.deployment3.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
# actions/deploy-pages intermittently fails with a transient "Deployment
# failed, try again later" GitHub Pages API error. Wandalen/wretry.action
# can't wrap it here: it re-invokes itself via a version tag
# (Wandalen/wretry.action@<tag>_js_action) rather than a SHA, which this
# org's SHA-pin policy rejects. Retry manually instead.
- name: Deploy to GitHub Pages (attempt 1)
id: deployment1
continue-on-error: true
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
- name: Wait before retry
if: steps.deployment1.outcome == 'failure'
run: sleep 30
- name: Deploy to GitHub Pages (attempt 2)
id: deployment2
if: steps.deployment1.outcome == 'failure'
continue-on-error: true
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
- name: Wait before retry
if: steps.deployment1.outcome == 'failure' && steps.deployment2.outcome == 'failure'
run: sleep 30
- name: Deploy to GitHub Pages (attempt 3)
id: deployment3
if: steps.deployment1.outcome == 'failure' && steps.deployment2.outcome == 'failure'
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4