Files
bherbruck e11055b6e3 CI and release: every Linux and Windows job runs on Blacksmith (#16323)
* CI and release: every Linux and Windows job runs on Blacksmith

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release: macOS builds on Blacksmith's macOS 15 runners too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Release on Blacksmith: fix the FreeBSD, Flatpak and Snap jobs, drop the icons job

- FreeBSD: the VM action syncs $HOME/work and cds into $GITHUB_WORKSPACE,
  which only works where the checkout lives under $HOME/work (GitHub's
  runners; Blacksmith's is under $HOME/_work). The action now only starts
  the VM (sync: no); rsync copies the source in and dist/release out. The
  VM is sized from the runner, on a 16 vCPU runner.
- Flatpak: the AppArmor user-namespace sysctl is only set where it exists.
- Snap: installing snapcraft retries Snap Store timeouts (HTTP 408).
- The icons job goes: make_icons only copies the committed icon files and
  package.ps1 falls back to the same committed solidcraft.ico, so Windows
  no longer waits for it.
- actionlint knows the new runner labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:22:37 +00:00

100 lines
3.7 KiB
YAML

# The documentation site on GitHub Pages: the book (docs/book) at https://docs.solidcraft.io/
# and the web app at /app/ (the latest release), /app-rc/ (the newest release candidate) and
# /app-edge/ (this commit). Needs Settings → Pages → Source = GitHub Actions; skipped while the
# repository is private.
name: Pages
on:
push:
branches: [main]
# The site is the book and the web app: test data and the GitHub bots' scripts change neither.
paths-ignore: ["tests/**", "scripts/claim/**", "scripts/triage/**"]
workflow_dispatch:
inputs:
release_tag:
description: "Published release for Flatpak (empty: latest stable release)"
type: string
required: false
default: ""
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
env:
CARGO_TERM_COLOR: always
MDBOOK_VERSION: v0.5.4
TRUNK_VERSION: v0.21.14
jobs:
build:
if: ${{ !github.event.repository.private }}
# Blacksmith, as CI: the web app's release build outgrew 60 minutes on GitHub's 4-core runner.
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 120
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@1.99.1
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Install mdbook and trunk
run: |
mkdir -p "$HOME/.local/bin"
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xz -C "$HOME/.local/bin"
curl -sSL "https://github.com/trunk-rs/trunk/releases/download/${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz" | tar -xz -C "$HOME/.local/bin"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install a software Vulkan driver (lavapipe)
# The book's pictures are `solidcraft-cli snapshot`s, drawn on the GPU; the runner has none.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mesa-vulkan-drivers libvulkan1
- name: Build the book
env:
SOLIDCRAFT_GPU: software
run: cargo xtask book
- name: Build the web app
working-directory: apps/solidcraft-web
run: trunk build --release --public-url ./
- name: Test the web app offline and across an update (headless Chrome)
run: cargo xtask web-offline-test --site dist/web
- name: Assemble the site
run: |
mkdir -p site
cp -r target/book/. site/
bash docs/book/seo.sh site # canonical links, robots.txt, sitemap.xml
- name: Add the web app channels (stable and release candidate from their releases, edge from this build)
env:
GH_TOKEN: ${{ github.token }}
run: bash packaging/web-channels.sh site dist/web
- uses: actions/configure-pages@v5
id: pages
- name: Install Flatpak repository tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends flatpak ostree
- name: Include the published Flatpak repository
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release_tag || '' }}
PAGES_BASE_URL: ${{ steps.pages.outputs.base_url }}
run: bash packaging/flatpak-site.sh site
- uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
needs: build
runs-on: blacksmith-2vcpu-ubuntu-2404
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4