Disable V8 runtime by default (custom builds can still enable it) and add a truly static binary release for Linux using MUSL.

Building with MUSL required vendoring sqlite-vec and OpenSSL.

Also clean up no-longer-supported TypeScript guest scripts.
This commit is contained in:
Sebastian Jeltsch
2025-10-06 17:12:28 +02:00
parent 06ed63c896
commit 08bcf98e67
14 changed files with 40 additions and 297 deletions

View File

@@ -24,7 +24,7 @@ jobs:
generate_release_notes: true
body_path: ./CHANGELOG-release.md
release-linux:
release-linux-glibc:
needs: changelog
runs-on: ubuntu-latest
steps:
@@ -53,13 +53,13 @@ jobs:
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
cargo build --target x86_64-unknown-linux-gnu --release --bin trail && \
cd ../.. && \
zip -r -j trailbase_${{ github.ref_name }}_x86_64_linux.zip target/x86_64-unknown-linux-gnu/release/trail CHANGELOG.md LICENSE
zip -r -j trailbase_${{ github.ref_name }}_x86_64_linux_glibc.zip target/x86_64-unknown-linux-gnu/release/trail CHANGELOG.md LICENSE
- name: Release binaries
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: trailbase_${{ github.ref_name }}_x86_64_linux.zip
files: trailbase_${{ github.ref_name }}_x86_64_linux_glibc.zip
release-linux-static:
needs: changelog
@@ -71,7 +71,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends curl libssl-dev pkg-config libclang-dev protobuf-compiler libprotobuf-dev zip
sudo apt-get install -y --no-install-recommends curl libssl-dev pkg-config libclang-dev protobuf-compiler libprotobuf-dev zip musl-tools
- uses: pnpm/action-setup@v4
with:
version: 9
@@ -81,22 +81,21 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.90.0
target: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-musl
default: true
- name: Rust Build
# NOTE: static linux builds fail with toolchains >1.86 if run from workspace root?!
run: |
cd crates/cli && \
RUSTFLAGS="-C target-feature=+crt-static" CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
cargo build --target x86_64-unknown-linux-gnu --release --bin trail && \
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
cargo build --target x86_64-unknown-linux-musl --features=vendor-ssl --release --bin trail && \
cd ../.. && \
zip -r -j trailbase_${{ github.ref_name }}_x86_64_linux_static_glibc.zip target/x86_64-unknown-linux-gnu/release/trail CHANGELOG.md LICENSE
zip -r -j trailbase_${{ github.ref_name }}_x86_64_linux.zip target/x86_64-unknown-linux-musl/release/trail CHANGELOG.md LICENSE
- name: Release binaries
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: trailbase_${{ github.ref_name }}_x86_64_linux_static_glibc.zip
files: trailbase_${{ github.ref_name }}_x86_64_linux.zip
release-linux-auth-ui:
needs: changelog