Files
herdrdev__herdr/.github/workflows/build-artifacts-manual.yml
dependabot[bot] c5e1a20ad3 chore(deps): bump the github-actions group with 7 updates (#184)
Bumps the github-actions group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4` | `6` |
| [actions/github-script](https://github.com/actions/github-script) | `7` | `9` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4` | `7` |
| [extractions/setup-just](https://github.com/extractions/setup-just) | `3` | `4` |
| [taiki-e/install-action](https://github.com/taiki-e/install-action) | `2.75.19` | `2.79.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `4` | `8` |
| [softprops/action-gh-release](https://github.com/softprops/action-gh-release) | `2` | `3` |


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

Updates `actions/github-script` from 7 to 9
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v9)

Updates `actions/upload-artifact` from 4 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v7)

Updates `extractions/setup-just` from 3 to 4
- [Release notes](https://github.com/extractions/setup-just/releases)
- [Commits](https://github.com/extractions/setup-just/compare/v3...v4)

Updates `taiki-e/install-action` from 2.75.19 to 2.79.1
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/5f57d6cb7cd20b14a8a27f522884c4bc8a187458...b550161ef8a7bc4f2a671c0b03a18ac9ccedea1e)

Updates `actions/download-artifact` from 4 to 8
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v8)

Updates `softprops/action-gh-release` from 2 to 3
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: extractions/setup-just
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: taiki-e/install-action
  dependency-version: 2.79.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 04:58:27 +03:00

182 lines
5.9 KiB
YAML

name: Build artifacts (manual)
on:
workflow_dispatch:
inputs:
build_group:
description: which artifacts to build
required: true
default: linux
type: choice
options:
- linux
- macos
- all
libghostty_optimize:
description: libghostty-vt optimize mode for this build
required: true
default: ReleaseSafe
type: choice
options:
- ReleaseSafe
- ReleaseFast
- ReleaseSmall
- Debug
libghostty_simd:
description: build libghostty-vt with SIMD-accelerated code paths
required: true
default: 'false'
type: choice
options:
- 'false'
- 'true'
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build-linux:
if: ${{ inputs.build_group == 'linux' || inputs.build_group == 'all' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
name: herdr-linux-x86_64
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
name: herdr-linux-aarch64
env:
LIBGHOSTTY_VT_OPTIMIZE: ${{ inputs.libghostty_optimize }}
LIBGHOSTTY_VT_SIMD: ${{ inputs.libghostty_simd }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.15.2
- name: Prefer official Ubuntu mirrors over Azure
run: |
if [ -f /etc/apt/apt-mirrors.txt ]; then
sudo sed -i '/azure.archive.ubuntu.com/d' /etc/apt/apt-mirrors.txt
echo "Using apt mirrors:"
cat /etc/apt/apt-mirrors.txt
fi
- name: Install Linux build tools
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build musl-tools gcc-aarch64-linux-gnu crossbuild-essential-arm64
- name: Set Linux aarch64 linker
if: matrix.target == 'aarch64-unknown-linux-musl'
run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Remove Zig caches
run: rm -rf .zig-cache vendor/libghostty-vt/.zig-cache vendor/libghostty-vt/zig-out
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package artifact
run: |
cp target/${{ matrix.target }}/release/herdr ${{ matrix.name }}
file ${{ matrix.name }} > BUILD_INFO.txt
ldd ${{ matrix.name }} 2>&1 | tee -a BUILD_INFO.txt
grep -q "statically linked" BUILD_INFO.txt
if nm -u ${{ matrix.name }} 2>/dev/null | grep -E '(__cxa|GLIBCXX|CXXABI|_ZSt)'; then
echo "error: Linux artifact has unresolved C++ runtime symbols" >&2
exit 1
fi
{
echo "commit=$GITHUB_SHA"
echo "target=${{ matrix.target }}"
echo "libghostty_vt_optimize=$LIBGHOSTTY_VT_OPTIMIZE"
echo "libghostty_vt_simd=$LIBGHOSTTY_VT_SIMD"
} >> BUILD_INFO.txt
python3 -c "import hashlib, pathlib; artifact = pathlib.Path('${{ matrix.name }}'); print(f'sha256={hashlib.sha256(artifact.read_bytes()).hexdigest()} {artifact.name}')" >> BUILD_INFO.txt
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.name }}-${{ inputs.libghostty_optimize }}-simd-${{ inputs.libghostty_simd }}
path: |
${{ matrix.name }}
BUILD_INFO.txt
retention-days: 7
build-macos:
if: ${{ inputs.build_group == 'macos' || inputs.build_group == 'all' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
name: herdr-macos-x86_64
- target: aarch64-apple-darwin
os: macos-latest
name: herdr-macos-aarch64
env:
LIBGHOSTTY_VT_OPTIMIZE: ${{ inputs.libghostty_optimize }}
LIBGHOSTTY_VT_SIMD: ${{ inputs.libghostty_simd }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.15.2
- name: Install macOS build tools
run: brew install cmake ninja
- name: Remove Zig caches
run: rm -rf .zig-cache vendor/libghostty-vt/.zig-cache vendor/libghostty-vt/zig-out
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package artifact
run: |
cp target/${{ matrix.target }}/release/herdr ${{ matrix.name }}
file ${{ matrix.name }} > BUILD_INFO.txt
{
echo "commit=$GITHUB_SHA"
echo "target=${{ matrix.target }}"
echo "libghostty_vt_optimize=$LIBGHOSTTY_VT_OPTIMIZE"
echo "libghostty_vt_simd=$LIBGHOSTTY_VT_SIMD"
} >> BUILD_INFO.txt
python3 -c "import hashlib, pathlib; artifact = pathlib.Path('${{ matrix.name }}'); print(f'sha256={hashlib.sha256(artifact.read_bytes()).hexdigest()} {artifact.name}')" >> BUILD_INFO.txt
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.name }}-${{ inputs.libghostty_optimize }}-simd-${{ inputs.libghostty_simd }}
path: |
${{ matrix.name }}
BUILD_INFO.txt
retention-days: 7