Skip to content

mirror: ryu-predict source @ 64de1cea1 #13

mirror: ryu-predict source @ 64de1cea1

mirror: ryu-predict source @ 64de1cea1 #13

Workflow file for this run

# GENERATED by tools/mirror-satellites.sh — edit there, not here.
name: canary
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: canary
cancel-in-progress: true
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Reset the rolling canary prerelease
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
gh release delete canary --yes --cleanup-tag || true
{
printf '## Canary build `%s`\n\n' "${GITHUB_SHA:0:7}"
printf 'Rolling **canary** build of `ryu-predict` from `main` — not a stable release.\n\n'
printf 'Built from commit %s.\n\n' "${GITHUB_SHA}"
printf 'Installed Ryu nodes never auto-update onto rolling builds; the updater only\n'
printf 'tracks the latest tagged v* release. Use the tagged releases for anything real.\n'
} > notes.md
gh release create canary --prerelease --target "$GITHUB_SHA" \
--title "Canary (${GITHUB_SHA:0:7})" --notes-file notes.md
build:
needs: prepare
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: dtolnay/rust-toolchain@4cda84d5c5c54efe2404f9d843567869ab1699d4 # stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: .
- name: Linux build deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
# The app's unit/integration tests ship WITH the satellite (colocated in
# backend/src + backend/tests), so the satellite gates its own artifact.
# --release reuses the build step's profile so the cache serves both.
- name: Test
run: cargo test --release --manifest-path Cargo.toml
- name: Build
run: cargo build --release --manifest-path Cargo.toml
- name: Package
shell: bash
run: |
set -euo pipefail
ext=""; [ "${{ runner.os }}" = "Windows" ] && ext=".exe"
case "${{ runner.os }}" in
Linux) plat="linux-x86_64" ;;
macOS) plat="macos-aarch64" ;;
Windows) plat="windows-x86_64" ;;
esac
mkdir -p dist
cp "target/release/ryu-predict${ext}" "dist/ryu-predict-${plat}${ext}"
( cd dist
if command -v sha256sum >/dev/null 2>&1; then sha256sum "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"
elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"; fi )
# gh release upload, NOT softprops: softprops PATCHes the release even
# when it is only ADDING assets, and that PATCH is refused for the App
# token ("Resource not accessible by integration") despite Contents:
# write. The assets endpoint on its own is permitted.
- name: Upload to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: canary
shell: bash
run: |
set -euo pipefail
shopt -s nullglob
files=(dist/*)
if [ ${#files[@]} -eq 0 ]; then
echo "no files matched" >&2; exit 1
fi
gh release upload "$TAG" "${files[@]}" --clobber