From d3fceb9e3f3501ff583a82f6d151d1a16b7d3ef1 Mon Sep 17 00:00:00 2001 From: Sebastian Jeltsch Date: Sat, 28 Dec 2024 19:19:58 +0100 Subject: [PATCH] Add windows pre-built releases in v0.3.3. --- .github/workflows/release.yml | 28 +++++++++++++++++++ CHANGELOG.md | 4 +++ Cargo.toml | 10 ++++++- README.md | 6 ++-- .../getting-started/_getting_trailbase.md | 4 +-- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f40af5e..9c1f90c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -123,3 +123,31 @@ jobs: with: fail_on_unmatched_files: true files: trailbase_${{ github.ref_name }}_x86_64_apple_darwin.zip + + release-windows: + needs: changelog + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: 'true' + - uses: MinoruSekine/setup-scoop@v4.0.1 + with: + buckets: extras + apps: nodejs pnpm protobuf zip + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-pc-windows-msvc + default: true + - name: Rust Build + shell: bash + run: | + cargo build --target x86_64-pc-windows-msvc --release --bin trail && \ + zip -r -j trailbase_${{ github.ref_name }}_x86_64_windows.zip target/x86_64-pc-windows-msvc/release/trail.exe 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_windows.zip diff --git a/CHANGELOG.md b/CHANGELOG.md index d4838fa1..09d5af4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.3.3 + +* Pre-built Windows binary. + ## v0.3.2 * Move record API access query construction to RecordApi construction time. diff --git a/Cargo.toml b/Cargo.toml index e61e05e3..fb6504bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ exclude = [ ] # https://doc.rust-lang.org/cargo/reference/profiles.html -[profile.release] +[profile.release.'cfg(not(windows))'] panic = "unwind" opt-level = 3 # PGO doesn't work with LTO: https://github.com/llvm/llvm-project/issues/57501 @@ -27,6 +27,14 @@ opt-level = 3 lto = true codegen-units = 1 +# Release builds for Windows on GitHub action runners are much slower, thus +# increase the parallel codegen units. +[profile.release.'cfg(windows)'] +panic = "unwind" +opt-level = 3 +lto = true +codegen-units = 16 + # Workaround for https://github.com/gwenn/lemon-rs/issues/78. sqlite3-parser # requires 1+MB stack frames to parse trivial SQL statements, which is larger # than Window's default stack size of 1MB. This is due to the rust compiler not diff --git a/README.md b/README.md index 23a0c34d..9fced445 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ libraries, tests, documentation and examples. Only the [benchmarks](https://github.com/trailbaseio/trailbase-benchmark) are kept separately due to their external dependencies. -Pre-built static binaries are available as [GitHub -releases](https://github.com/trailbaseio/trailbase/releases/) for Linux an -MacOS. +Pre-built static binaries are available as +[GitHub releases](https://github.com/trailbaseio/trailbase/releases/) for +Linux, MacOS and Windows. On Windows the Docker [image](https://hub.docker.com/r/trailbase/trailbase) can be used. diff --git a/docs/src/content/docs/getting-started/_getting_trailbase.md b/docs/src/content/docs/getting-started/_getting_trailbase.md index 2f3cabd8..c7db09a2 100644 --- a/docs/src/content/docs/getting-started/_getting_trailbase.md +++ b/docs/src/content/docs/getting-started/_getting_trailbase.md @@ -1,5 +1,5 @@ -You can download the latest pre-built `trail` binary for Mac and Linux from -[GitHub](https://github.com/trailbaseio/trailbase/releases/). +You can download the latest pre-built `trail` binary for Mac, Windows and Linux +from [GitHub](https://github.com/trailbaseio/trailbase/releases/). Alternatively, you can run TrailBase straight from DockerHub: