upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-06-03 15:34:11 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-06-03 15:34:41 +0100
commit8b182325ad221e06f20b5778fd4963a4b90622c5 (patch)
treefeaa1a1af9e407eba0de1ebafaf598ad4b2ee506
parente818946e18c3236f8650f79db3f4d4a2f9bd6d5a (diff)
build: fix release binariesv1.7.0
work was done to produce more reslient binaries builds to work across different distros and version b98d2819288f86dd5b316c726cda0f84a1f63eb5 this commit fixes the job runner so they actual get built
-rw-r--r--.github/workflows/release.yml36
-rw-r--r--Cargo.lock10
-rw-r--r--Cargo.toml8
3 files changed, 34 insertions, 20 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2a5303a..c3060b6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -28,7 +28,7 @@ jobs:
28 # x86_64 28 # x86_64
29 # compatibility: Ubuntu 14.04+, Debian 8+, RHEL/CentOS 7+, Fedora 21+, openSUSE, Arch, etc. Any x86-64 distro with glibc ≥ 2.17. (Not Alpine) 29 # compatibility: Ubuntu 14.04+, Debian 8+, RHEL/CentOS 7+, Fedora 21+, openSUSE, Arch, etc. Any x86-64 distro with glibc ≥ 2.17. (Not Alpine)
30 - os: ubuntu-latest 30 - os: ubuntu-latest
31 target: x86_64-unknown-linux-gnu.2.17 # glibc ≥ 2.17 31 target: x86_64-unknown-linux-gnu.2.17
32 build-tool: cargo-zigbuild 32 build-tool: cargo-zigbuild
33 # aarch64 33 # aarch64
34 # compatibility: Ubuntu 20.04+, Debian 11+, Amazon Linux 2, AWS Graviton, Raspberry Pi OS 64-bit, etc. Any aarch64/arm64 distro with glibc ≥ 2.17. 34 # compatibility: Ubuntu 20.04+, Debian 11+, Amazon Linux 2, AWS Graviton, Raspberry Pi OS 64-bit, etc. Any aarch64/arm64 distro with glibc ≥ 2.17.
@@ -40,37 +40,33 @@ jobs:
40 - os: ubuntu-latest 40 - os: ubuntu-latest
41 target: x86_64-unknown-linux-musl 41 target: x86_64-unknown-linux-musl
42 build-tool: cargo-zigbuild 42 build-tool: cargo-zigbuild
43 # windows - faster alternative to native windows toolchain 43 # # windows - faster alternative to native windows toolchain
44 # compatibility: Windows 7 SP1 / Server 2008 R2 and newer, including Windows 11. Requires the “Universal C Runtime” which is already present on Windows 10+ or via the VC++ 2015-2022 redistributable on older systems. No other DLLs needed. 44 # # compatibility: Windows 7 SP1 / Server 2008 R2 and newer, including Windows 11. Requires the “Universal C Runtime” which is already present on Windows 10+ or via the VC++ 2015-2022 redistributable on older systems. No other DLLs needed.
45 - os: ubuntu-latest 45 # - os: ubuntu-latest
46 target: x86_64-pc-windows-msvc 46 # target: x86_64-pc-windows-msvc
47 build-tool: cargo-zigbuild 47 # build-tool: cargo-zigbuild
48 # ---------- macOS (needs real mac runner) ------------- 48 # ---------- macOS (needs real mac runner) -------------
49 # compatibility: macOS 10.13 High Sierra (2017) or newer. Intel + Apple Silicon. 49 # compatibility: macOS 10.13 High Sierra (2017) or newer. Intel + Apple Silicon.
50 - os: macos-14 50 - os: macos-14
51 target: universal-apple-darwin # universal = x86_64 + arm64 51 target: universal-apple-darwin
52 build-tool: cargo # native cargo is fastest 52 build-tool: cargo
53 # ---------- native Windows toolchain ------------------ 53 # ---------- native Windows toolchain ------------------
54 # switch to this if issues are reported with the zig build 54 # switch to this if issues are reported with the zig build
55 # - os: windows-latest 55 - os: windows-latest
56 # target: x86_64-pc-windows-msvc 56 target: x86_64-pc-windows-msvc
57 # build-tool: cargo 57 build-tool: cargo
58 runs-on: ${{ matrix.os }} 58 runs-on: ${{ matrix.os }}
59 env:
60 # make openssl + libgit2 static so the binaries work on old distros
61 OPENSSL_STATIC: 1
62 # enable Rust LTO + stripping (you can also move this into Cargo.toml)
63 CARGO_PROFILE_RELEASE_LTO: true
64 CARGO_PROFILE_RELEASE_STRIP: symbols
65
66 steps: 59 steps:
67 - uses: actions/checkout@v3 60 - uses: actions/checkout@v3
68 # (optional) cache build artefacts; speeds up repeated releases 61 - uses: dtolnay/rust-toolchain@stable
69 - uses: Swatinem/rust-cache@v2 62 - name: Install cargo-zigbuild using Homebrew for macOS
63 if: runner.os == 'macOS' && matrix.build-tool == 'cargo-zigbuild'
64 run: brew install cargo-zigbuild
70 - uses: taiki-e/upload-rust-binary-action@v1 65 - uses: taiki-e/upload-rust-binary-action@v1
71 with: 66 with:
72 bin: ngit,git-remote-nostr 67 bin: ngit,git-remote-nostr
73 target: ${{ matrix.target }} 68 target: ${{ matrix.target }}
69 features: vendored-openssl
74 build-tool: ${{ matrix.build-tool }} 70 build-tool: ${{ matrix.build-tool }}
75 # final file name: ngit-v1.6.3-x86_64-unknown-linux-gnu.tar.gz … 71 # final file name: ngit-v1.6.3-x86_64-unknown-linux-gnu.tar.gz …
76 archive: ngit-$tag-${{ matrix.target }} 72 archive: ngit-$tag-${{ matrix.target }}
diff --git a/Cargo.lock b/Cargo.lock
index fa3a485..1d1086f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1590,6 +1590,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1590checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1590checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
1591 1591
1592[[package]] 1592[[package]]
1593name = "openssl-src"
1594version = "300.5.0+3.5.0"
1595source = "registry+https://github.com/rust-lang/crates.io-index"
1596checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f"
1597dependencies = [
1598 "cc",
1599]
1600
1601[[package]]
1593name = "openssl-sys" 1602name = "openssl-sys"
1594version = "0.9.108" 1603version = "0.9.108"
1595source = "registry+https://github.com/rust-lang/crates.io-index" 1604source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1597,6 +1606,7 @@ checksum = "e145e1651e858e820e4860f7b9c5e169bc1d8ce1c86043be79fa7b7634821847"
1597dependencies = [ 1606dependencies = [
1598 "cc", 1607 "cc",
1599 "libc", 1608 "libc",
1609 "openssl-src",
1600 "pkg-config", 1610 "pkg-config",
1601 "vcpkg", 1611 "vcpkg",
1602] 1612]
diff --git a/Cargo.toml b/Cargo.toml
index 67e3d4d..a4fbdee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -55,6 +55,10 @@ members = [
55name = "ngit" 55name = "ngit"
56path = "src/lib/mod.rs" 56path = "src/lib/mod.rs"
57 57
58[features]
59default = []
60vendored-openssl = ["git2/vendored-openssl"]
61
58[[bin]] 62[[bin]]
59name = "ngit" 63name = "ngit"
60path = "src/bin/ngit/main.rs" 64path = "src/bin/ngit/main.rs"
@@ -62,3 +66,7 @@ path = "src/bin/ngit/main.rs"
62[[bin]] 66[[bin]]
63name = "git-remote-nostr" 67name = "git-remote-nostr"
64path = "src/bin/git_remote_nostr/main.rs" 68path = "src/bin/git_remote_nostr/main.rs"
69
70[profile.release]
71lto = true
72strip = "symbols" \ No newline at end of file