mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-24 10:10:05 -06:00
CI: run the gate through craft-common-actions' shared gate.yml; FreeBSD nightly and on release (#2937)
ci.yml calls the shared workflow (cached apt packages, nextest, main-only cache saves, Cargo.lock check). FreeBSD and Windows ARM64 run nightly and on pushes to release instead of on pull requests. Depends on storytold/craft-common-actions#69.
This commit is contained in:
+14
-58
@@ -1,10 +1,7 @@
|
|||||||
# The CLAUDE.md quality gate (`cargo xtask ci`: fmt, clippy -D warnings, tests, layers, assets,
|
|
||||||
# wasm) on every pull request and every push to main. Today only path-filtered workflows run on
|
|
||||||
# pull requests, so most PRs land with no test run at all.
|
|
||||||
#
|
|
||||||
# Ported from wordcraft#800. Linux only; standard GitHub-hosted runner, no secrets.
|
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
|
# Quality gates for every push to main and every pull request (`cargo xtask ci`), through the
|
||||||
|
# suite's shared gate workflow in craft-common-actions.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
@@ -14,61 +11,20 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
# A newer push to a PR branch cancels its older run; every push to main runs to the end.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.ref }}
|
group: ci-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
env:
|
|
||||||
# Same craft-fonts commit as release.yml, so the font tests see what a release build embeds.
|
|
||||||
CRAFT_FONTS_REF: abb83316d96aa59c1cf64784289e378fe9fa5695
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
gate:
|
gate:
|
||||||
name: cargo xtask ci
|
# Tracks @main so suite-wide CI fixes reach every app without a PR in each repository.
|
||||||
runs-on: ubuntu-24.04
|
uses: storytold/craft-common-actions/.github/workflows/gate.yml@main
|
||||||
timeout-minutes: 120
|
with:
|
||||||
env:
|
# Same craft-fonts commit as release.yml.
|
||||||
CARGO_TERM_COLOR: always
|
craft-fonts-ref: abb83316d96aa59c1cf64784289e378fe9fa5695
|
||||||
CARGO_INCREMENTAL: "0"
|
timeout-minutes: 120
|
||||||
RUST_BACKTRACE: "1"
|
packages: >-
|
||||||
steps:
|
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers
|
||||||
with:
|
libasound2-dev
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Check out craft-fonts
|
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
repository: storytold/craft-fonts
|
|
||||||
ref: ${{ env.CRAFT_FONTS_REF }}
|
|
||||||
path: craft-fonts
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
# libasound2-dev is for cpal (audio playback).
|
|
||||||
- name: Install Linux build dependencies
|
|
||||||
uses: storytold/craft-common-actions/actions/install-apt-packages@main
|
|
||||||
with:
|
|
||||||
packages: >-
|
|
||||||
pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev
|
|
||||||
libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers
|
|
||||||
libasound2-dev
|
|
||||||
|
|
||||||
- name: Install Rust (stable + clippy, rustfmt, wasm32)
|
|
||||||
run: |
|
|
||||||
rustup toolchain install stable --profile minimal --component clippy,rustfmt \
|
|
||||||
--target wasm32-unknown-unknown
|
|
||||||
rustup default stable
|
|
||||||
|
|
||||||
# `xtask ci` runs the tests with nextest when it is installed.
|
|
||||||
- uses: taiki-e/install-action@a4d3f3f761dcd95cce1b72cb61cb6d1963438177 # v2.87.30
|
|
||||||
with:
|
|
||||||
tool: cargo-nextest
|
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
|
|
||||||
with:
|
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
||||||
|
|
||||||
- name: Quality gate
|
|
||||||
env:
|
|
||||||
CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts
|
|
||||||
run: cargo xtask ci
|
|
||||||
|
|||||||
@@ -5,17 +5,19 @@
|
|||||||
# golden-image tests need tools and a GPU the VM doesn't have.)
|
# golden-image tests need tools and a GPU the VM doesn't have.)
|
||||||
name: FreeBSD
|
name: FreeBSD
|
||||||
|
|
||||||
# The VM build takes an hour or more, so it runs nightly on main rather than on every push or
|
# The VM build is slow, so it runs nightly on main and on pushes to `release`, not on every pull
|
||||||
# dependency change: a drifted dependency still shows up within a day. PRs that change the
|
# request: a drifted dependency still shows up within a day, and always before a release ships.
|
||||||
# FreeBSD packaging itself still run it.
|
# PRs that change the FreeBSD workflow or packaging itself still run it.
|
||||||
on:
|
on:
|
||||||
schedule:
|
push:
|
||||||
- cron: "37 2 * * *"
|
branches: [release]
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- .github/workflows/freebsd.yml
|
- .github/workflows/freebsd.yml
|
||||||
- packaging/freebsd/**
|
- packaging/freebsd/**
|
||||||
- packaging/env.sh
|
- packaging/env.sh
|
||||||
|
schedule:
|
||||||
|
- cron: "37 2 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|||||||
Reference in New Issue
Block a user