Skip to content

chore(release): cargo-rail v0.5.2 #153

chore(release): cargo-rail v0.5.2

chore(release): cargo-rail v0.5.2 #153

Workflow file for this run

name: Commit
on:
push:
branches:
- "**"
# Allow manual trigger
workflow_dispatch:
# Cancel in-progress runs for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_RAIL_TEST_MODE: commit
CARGO_INCREMENTAL: 0
# Lock down permissions to read-only by default
permissions:
contents: read
checks: write # Required for publishing test reports
pull-requests: write # Required for PR comments on test results
jobs:
# ==========================================================================
# Job 1: Detect what changed (dogfooding cargo-rail-action)
# ==========================================================================
detect:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.affected.outputs.docs-only }}
rebuild-all: ${{ steps.affected.outputs.rebuild-all }}
count: ${{ steps.affected.outputs.count }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0 # Required for change detection
persist-credentials: false
- name: Detect affected crates
id: affected
uses: loadingalias/cargo-rail-action@88618d12427cee84efbe1ef556dd9f8445acad95 # v1.0.2
with:
since: ${{ github.event.before }}
# ==========================================================================
# Job 2: CI (skipped if docs-only)
# ==========================================================================
ci:
name: CI (${{ matrix.target.name }})
needs: detect
if: needs.detect.outputs.docs-only != 'true'
runs-on: ${{ matrix.target.runner }}
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
target:
# Linux x86-64 (GitHub Free)
- name: x86_64-unknown-linux-gnu
runner: ubuntu-latest
cache-key: commit-linux-x64
# Linux ARM64 (GitHub Teams/Enterprise)
- name: aarch64-unknown-linux-gnu
runner: ubuntu-24.04-arm
cache-key: commit-linux-arm64
# Windows x86-64 (GitHub Free)
- name: x86_64-pc-windows-msvc
runner: windows-latest
cache-key: commit-windows-x64
# Windows ARM64 (GitHub Free in public repos)
- name: aarch64-pc-windows-msvc
runner: windows-11-arm
cache-key: commit-windows-arm64
# macOS tested locally (not in CI)
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup
uses: ./.github/actions/setup
with:
cache-key: ${{ matrix.target.cache-key }}
- name: Quality Checks
run: just ci-check
- name: Build
run: just build
- name: Tests
run: just test
- name: Upload JUnit Test Report
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: junit-report-${{ matrix.target.name }}
path: target/nextest/commit/junit.xml
retention-days: 7
if-no-files-found: ignore
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@e08919a3b1fb83a78393dfb775a9c37f17d8eea6 # v6.0.1
with:
report_paths: 'target/nextest/commit/junit.xml'
check_name: 'Test Results (${{ matrix.target.name }})'
detailed_summary: true
include_passed: false
fail_on_failure: true
require_tests: true
annotate_only: false
summary: true
- name: Upload Nextest Results (on failure)
if: failure()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: nextest-results-${{ matrix.target.name }}
path: target/nextest/
retention-days: 7
if-no-files-found: ignore