a28667923a
With --bin flags, cargo builds only the named binaries of every selected package, so -p horizon-prepare built nothing and the import checks failed on target/release/horizon-prepare (every run since #92). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.7 KiB
YAML
58 lines
2.7 KiB
YAML
name: release builds
|
|
# Started by hand: gh workflow run release.yml --ref <branch>
|
|
# Builds the Windows x64 and Linux x86_64 clients (with horizon-ctl and horizon-prepare) and uploads the playable folders
|
|
# as artifacts.
|
|
# macOS builds are made on the development machines. Linux is built here, on an older Ubuntu,
|
|
# so the binary uses the standard loader and runs on any recent distribution (and on NixOS
|
|
# through nix-ld): a build made on NixOS asks for a /nix/store loader no other system has.
|
|
on:
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
run: rustup toolchain install stable --profile minimal
|
|
- name: Build the client
|
|
# The C runtime linked in, so the game runs without the Visual C++ redistributable.
|
|
env:
|
|
RUSTFLAGS: -C target-feature=+crt-static
|
|
run: cargo +stable build --release --locked -p horizon-client --bin horizon-client --bin horizon-ctl -p horizon-prepare --bin horizon-prepare
|
|
- name: Only system DLLs
|
|
# Vulkan and the rest are loaded at run time; a linked non-system DLL is a
|
|
# "DLL not found" dialog on some players' machines.
|
|
run: |
|
|
python tools/check_imports.py target/release/horizon-client.exe
|
|
python tools/check_imports.py target/release/horizon-ctl.exe
|
|
python tools/check_imports.py target/release/horizon-prepare.exe
|
|
- name: Package
|
|
run: cargo +stable run --locked -p xtask -- package target/release/horizon-client.exe dist/horizon-windows-x64
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: horizon-windows-x64
|
|
path: dist/horizon-windows-x64
|
|
linux:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
run: rustup toolchain install stable --profile minimal
|
|
- name: ALSA headers
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev
|
|
- name: Build the client
|
|
run: cargo +stable build --release --locked -p horizon-client --bin horizon-client --bin horizon-ctl -p horizon-prepare --bin horizon-prepare
|
|
- name: Standard loader and libraries only
|
|
run: |
|
|
python3 tools/check_imports.py target/release/horizon-client
|
|
python3 tools/check_imports.py target/release/horizon-ctl
|
|
python3 tools/check_imports.py target/release/horizon-prepare
|
|
- name: Package
|
|
run: cargo +stable run --locked -p xtask -- package target/release/horizon-client dist/horizon-linux-x86_64
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: horizon-linux-x86_64
|
|
path: dist/horizon-linux-x86_64
|