1717 default : true
1818
1919jobs :
20- # Build slipstream-client for each platform first
21- build-slipstream :
22- strategy :
23- fail-fast : false
24- matrix :
25- include :
26- - target : x86_64-pc-windows-msvc
27- suffix : windows-amd64
28- ext : .exe
29- os : windows-latest
30- - target : x86_64-unknown-linux-gnu
31- suffix : linux-amd64
32- os : ubuntu-latest
33- - target : aarch64-unknown-linux-gnu
34- suffix : linux-arm64
35- os : ubuntu-latest
36- cross : true
37- cc : aarch64-linux-gnu-gcc
38- ar : aarch64-linux-gnu-ar
39- - target : x86_64-apple-darwin
40- suffix : darwin-amd64
41- os : macos-15
42- cmake_osx_arch : x86_64
43- - target : aarch64-apple-darwin
44- suffix : darwin-arm64
45- os : macos-15
46-
47- runs-on : ${{ matrix.os }}
48-
49- steps :
50- - name : Checkout repository
51- uses : actions/checkout@v4
52- with :
53- submodules : recursive
54- token : ${{ secrets.SUBMODULE_TOKEN }}
55-
56- - name : Install Rust toolchain
57- uses : dtolnay/rust-toolchain@stable
58- with :
59- targets : ${{ matrix.target }}
60-
61- - name : Install cross-compilation tools (Linux ARM64)
62- if : matrix.cross
63- run : |
64- sudo apt-get update
65- sudo apt-get install -y gcc-aarch64-linux-gnu
66-
67- - name : Install Windows build dependencies (Perl, pkg-config)
68- if : runner.os == 'Windows'
69- run : choco install strawberryperl pkgconfiglite -y
70-
71- - name : Build slipstream-client
72- working-directory : app/src/main/rust/slipstream-rust
73- shell : bash
74- env :
75- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : aarch64-linux-gnu-gcc
76- CC : ${{ matrix.cc || '' }}
77- AR : ${{ matrix.ar || '' }}
78- CMAKE_OSX_ARCHITECTURES : ${{ matrix.cmake_osx_arch || '' }}
79- CONFIG_ENCRYPTION_KEY : ${{ secrets.CONFIG_ENCRYPTION_KEY }}
80- run : |
81- # On Windows, prefer Strawberry Perl over Git Bash perl for OpenSSL
82- if [ -d "/c/Strawberry/perl/bin" ]; then
83- export PATH="/c/Strawberry/perl/bin:$PATH"
84- fi
85- # Unset CC/AR if empty so the build system uses its defaults
86- [ -z "$CC" ] && unset CC
87- [ -z "$AR" ] && unset AR
88- # macOS x86_64 cross-compilation from ARM64 runner
89- if [ -n "${CMAKE_OSX_ARCHITECTURES:-}" ]; then
90- export CFLAGS="-arch ${CMAKE_OSX_ARCHITECTURES}"
91- export CXXFLAGS="-arch ${CMAKE_OSX_ARCHITECTURES}"
92- fi
93- cargo build --release --bin slipstream-client \
94- --target ${{ matrix.target }} \
95- --features openssl-vendored,picoquic-minimal-build
96-
97- - name : Upload slipstream binary
98- uses : actions/upload-artifact@v4
99- with :
100- name : slipstream-${{ matrix.suffix }}
101- path : app/src/main/rust/slipstream-rust/target/${{ matrix.target }}/release/slipstream-client${{ matrix.ext }}
102-
103- # Build Go CLI with embedded slipstream binary
10420 build-cli :
105- needs : build-slipstream
10621 strategy :
22+ fail-fast : false
10723 matrix :
10824 include :
10925 - goos : darwin
11026 goarch : amd64
11127 suffix : darwin-amd64
112- slipstream_suffix : darwin-amd64
11328 - goos : darwin
11429 goarch : arm64
11530 suffix : darwin-arm64
116- slipstream_suffix : darwin-arm64
11731 - goos : linux
11832 goarch : amd64
11933 suffix : linux-amd64
120- slipstream_suffix : linux-amd64
12134 - goos : linux
12235 goarch : arm64
12336 suffix : linux-arm64
124- slipstream_suffix : linux-arm64
12537 - goos : windows
12638 goarch : amd64
12739 suffix : windows-amd64
128- slipstream_suffix : windows-amd64
12940 ext : .exe
130- slipstream_ext : .exe
13141
13242 runs-on : ubuntu-latest
13343
@@ -143,16 +53,6 @@ jobs:
14353 with :
14454 go-version-file : cli/go.mod
14555
146- - name : Download slipstream binary
147- uses : actions/download-artifact@v4
148- with :
149- name : slipstream-${{ matrix.slipstream_suffix }}
150- path : ./slipstream-download
151-
152- - name : Embed slipstream binary
153- run : |
154- cp ./slipstream-download/slipstream-client${{ matrix.slipstream_ext }} cli/embedded/slipstream-client
155-
15656 - name : Build
15757 working-directory : cli
15858 env :
16565 if [ -n "${{ secrets.CONFIG_ENCRYPTION_KEY }}" ]; then
16666 LDFLAGS="${LDFLAGS} -X main.configKey=${{ secrets.CONFIG_ENCRYPTION_KEY }}"
16767 fi
168- go build -tags embed_slipstream - trimpath -ldflags="${LDFLAGS}" -o ../slipnet-${{ matrix.suffix }}${{ matrix.ext }} .
68+ go build -trimpath -ldflags="${LDFLAGS}" -o ../slipnet-${{ matrix.suffix }}${{ matrix.ext }} .
16969
17070 - name : Compress with UPX (Linux/macOS only)
17171 if : matrix.goos != 'windows'
0 commit comments