Skip to content

Commit 7795251

Browse files
committed
Fix CI: split slipstream build into linux/windows native runners
1 parent 5731da1 commit 7795251

1 file changed

Lines changed: 36 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,8 @@ jobs:
5050
name: findns-${{ matrix.suffix }}
5151
path: findns-${{ matrix.suffix }}
5252

53-
build-slipstream:
53+
build-slipstream-linux:
5454
runs-on: ubuntu-latest
55-
strategy:
56-
matrix:
57-
include:
58-
- target: x86_64-unknown-linux-gnu
59-
suffix: slipstream-client-linux-amd64
60-
deps: libssl-dev
61-
- target: x86_64-pc-windows-gnu
62-
suffix: slipstream-client-windows-amd64.exe
63-
deps: gcc-mingw-w64-x86-64
64-
6555
steps:
6656
- name: Checkout slipstream-rust
6757
uses: actions/checkout@v4
@@ -72,35 +62,55 @@ jobs:
7262

7363
- name: Install Rust
7464
uses: dtolnay/rust-toolchain@stable
75-
with:
76-
targets: ${{ matrix.target }}
7765

78-
- name: Install cross-compile deps
66+
- name: Install deps
7967
run: |
8068
sudo apt-get update -q
81-
sudo apt-get install -y cmake ${{ matrix.deps }}
69+
sudo apt-get install -y cmake libssl-dev
70+
71+
- name: Build
72+
working-directory: slipstream-rust
73+
env:
74+
PICOQUIC_AUTO_BUILD: '1'
75+
run: |
76+
cargo build --release -p slipstream-client --features slipstream-ffi/openssl-vendored
77+
cp target/release/slipstream-client ../slipstream-client-linux-amd64
8278
83-
- name: Build slipstream-client
79+
- name: Upload artifact
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: slipstream-client-linux-amd64
83+
path: slipstream-client-linux-amd64
84+
85+
build-slipstream-windows:
86+
runs-on: windows-latest
87+
steps:
88+
- name: Checkout slipstream-rust
89+
uses: actions/checkout@v4
90+
with:
91+
repository: Mygod/slipstream-rust
92+
path: slipstream-rust
93+
submodules: recursive
94+
95+
- name: Install Rust
96+
uses: dtolnay/rust-toolchain@stable
97+
98+
- name: Build
8499
working-directory: slipstream-rust
85100
env:
86101
PICOQUIC_AUTO_BUILD: '1'
87-
OPENSSL_STATIC: '1'
88-
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc
89-
PKG_CONFIG_ALLOW_CROSS: '1'
90102
run: |
91-
cargo build --release --target ${{ matrix.target }} -p slipstream-client --features slipstream-ffi/openssl-vendored
92-
BIN=target/${{ matrix.target }}/release/slipstream-client
93-
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
94-
cp "$BIN" ../${{ matrix.suffix }}
103+
cargo build --release -p slipstream-client --features slipstream-ffi/openssl-vendored
104+
copy target\release\slipstream-client.exe ..\slipstream-client-windows-amd64.exe
95105
96106
- name: Upload artifact
97107
uses: actions/upload-artifact@v4
98108
with:
99-
name: ${{ matrix.suffix }}
100-
path: ${{ matrix.suffix }}
109+
name: slipstream-client-windows-amd64.exe
110+
path: slipstream-client-windows-amd64.exe
101111

102112
release:
103-
needs: [build, build-slipstream]
113+
needs: [build, build-slipstream-linux, build-slipstream-windows]
104114
runs-on: ubuntu-latest
105115
steps:
106116
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)