Skip to content

Commit 538368e

Browse files
committed
Add slipstream-client to CI: build linux-amd64, linux-arm64, windows-amd64
1 parent eec3413 commit 538368e

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,51 @@ jobs:
5050
name: findns-${{ matrix.suffix }}
5151
path: findns-${{ matrix.suffix }}
5252

53+
build-slipstream:
54+
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
include:
58+
- target: x86_64-unknown-linux-musl
59+
suffix: slipstream-client-linux-amd64
60+
- target: aarch64-unknown-linux-musl
61+
suffix: slipstream-client-linux-arm64
62+
- target: x86_64-pc-windows-gnu
63+
suffix: slipstream-client-windows-amd64.exe
64+
65+
steps:
66+
- name: Checkout slipstream-rust
67+
uses: actions/checkout@v4
68+
with:
69+
repository: Mygod/slipstream-rust
70+
path: slipstream-rust
71+
72+
- name: Install Rust
73+
uses: dtolnay/rust-toolchain@stable
74+
with:
75+
targets: ${{ matrix.target }}
76+
77+
- name: Install cross-compile deps
78+
run: |
79+
sudo apt-get update -q
80+
sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu gcc-mingw-w64-x86-64
81+
82+
- name: Build slipstream-client
83+
working-directory: slipstream-rust
84+
run: |
85+
cargo build --release --target ${{ matrix.target }} -p slipstream-client
86+
BIN=target/${{ matrix.target }}/release/slipstream-client
87+
[ -f "${BIN}.exe" ] && BIN="${BIN}.exe"
88+
cp "$BIN" ../${{ matrix.suffix }}
89+
90+
- name: Upload artifact
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: ${{ matrix.suffix }}
94+
path: ${{ matrix.suffix }}
95+
5396
release:
54-
needs: build
97+
needs: [build, build-slipstream]
5598
runs-on: ubuntu-latest
5699
steps:
57100
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)