Skip to content

Commit 4b4c5fc

Browse files
committed
chore: setup CI
1 parent 7d589ad commit 4b4c5fc

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Continuous Integration (CI)
2+
on: [push]
3+
4+
concurrency:
5+
group: "ci-${{ github.ref_name }}"
6+
cancel-in-progress: true
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
arch:
15+
- target: x86_64-unknown-linux-gnu
16+
name: amd64
17+
- target: aarch64-unknown-linux-gnu
18+
name: aarch64
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Install Rust with Cross
23+
shell: bash
24+
run: |
25+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
26+
rustup toolchain install stable --profile minimal
27+
rustup target add ${{ matrix.arch.target }}
28+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
29+
cargo binstall --no-confirm cross
30+
- uses: Swatinem/rust-cache@v2
31+
with:
32+
key: ${{ matrix.arch.target }}
33+
cache-on-failure: true
34+
- name: Build Binary
35+
run: |
36+
cross build --verbose --locked --release --target ${{ matrix.arch.target }}
37+
mv target/${{ matrix.arch.target }}/release/wg-multizone target/${{ matrix.arch.target }}/release/wg-multizone-${{ matrix.arch.name }}
38+
- name: publish artifacts
39+
if: startsWith(github.ref, 'refs/tags/')
40+
uses: softprops/action-gh-release@v2
41+
with:
42+
files: |
43+
target/${{ matrix.arch.target }}/release/wg-multizone-${{ matrix.arch.name }}

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ opt-level = 3
1717
anyhow = "1.0.95"
1818
base64 = "0.22.1"
1919
hex = "^0.4.3"
20+
openssl = { version = "0.10.68", features = ["vendored"] }
2021
reqwest = { version = "0.12.10", features = ["json"] }
2122
serde = { version = "1.0.216", features = ["derive"] }
2223
serde_json = "^1.0.134"

0 commit comments

Comments
 (0)