Skip to content

Commit 255fe1a

Browse files
Update Github actions to use wireguard-go as a submodule
1 parent ea7d11f commit 255fe1a

11 files changed

+80
-24
lines changed

.github/workflows/android-app.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ jobs:
118118
- name: Checkout repository
119119
if: steps.cache-relay-list.outputs.cache-hit != 'true'
120120
uses: actions/checkout@v4
121+
with:
122+
submodules: true
121123

122124
- name: Generate
123125
if: steps.cache-relay-list.outputs.cache-hit != 'true'
@@ -164,6 +166,8 @@ jobs:
164166

165167
- name: Checkout repository
166168
uses: actions/checkout@v4
169+
with:
170+
submodules: true
167171

168172
- name: Calculate native lib cache hash
169173
id: native-lib-cache-hash
@@ -195,7 +199,6 @@ jobs:
195199
UNSTRIPPED_LIB_PATH="$CARGO_TARGET_DIR/${{ matrix.target }}/$BUILD_TYPE/libmullvad_jni.so"
196200
STRIPPED_LIB_PATH="./android/app/build/extraJni/${{ matrix.abi }}/libmullvad_jni.so"
197201
NDK_TOOLCHAIN_STRIP_TOOL="$NDK_TOOLCHAIN_DIR/llvm-strip"
198-
./wireguard/build-wireguard-go.sh --android --no-docker
199202
cargo build --target ${{ matrix.target }} --verbose --package mullvad-jni --features api-override
200203
$NDK_TOOLCHAIN_STRIP_TOOL --strip-debug --strip-unneeded -o "$STRIPPED_LIB_PATH" "$UNSTRIPPED_LIB_PATH"
201204
@@ -233,6 +236,8 @@ jobs:
233236

234237
- name: Checkout repository
235238
uses: actions/checkout@v4
239+
with:
240+
submodules: true
236241

237242
- name: Run gradle task
238243
uses: burrunan/gradle-cache-action@v1
@@ -260,6 +265,8 @@ jobs:
260265

261266
- name: Checkout repository
262267
uses: actions/checkout@v4
268+
with:
269+
submodules: true
263270

264271
- uses: actions/download-artifact@v4
265272
with:
@@ -364,6 +371,8 @@ jobs:
364371

365372
- name: Checkout repository
366373
uses: actions/checkout@v4
374+
with:
375+
submodules: true
367376

368377
- uses: actions/download-artifact@v4
369378
with:

.github/workflows/cargo-vendor.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: true
2022

2123
- name: Install Rust
2224
uses: actions-rs/toolchain@v1.0.6

.github/workflows/clippy.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
with:
4444
repo-token: ${{ secrets.GITHUB_TOKEN }}
4545

46-
- name: Checkout binaries submodule
47-
run: git submodule update --init --depth=1 dist-assets/binaries
46+
- name: Checkout submodules
47+
run: |
48+
git submodule update --init --depth=1 dist-assets/binaries
49+
git submodule update --init --recursive --depth=1 wireguard-go-rs/libwg/wireguard-go
4850
4951
- uses: actions-rs/toolchain@v1.0.6
5052
with:
@@ -58,6 +60,12 @@ jobs:
5860
sudo apt-get update
5961
sudo apt-get install libdbus-1-dev
6062
63+
- name: Install Go
64+
if: matrix.os == 'linux-latest' || matrix.os == 'macos-latest'
65+
uses: actions/setup-go@v5
66+
with:
67+
go-version: 1.21.3
68+
6169
- name: Clippy check
6270
shell: bash
6371
env:
@@ -83,6 +91,11 @@ jobs:
8391
- name: Checkout repository
8492
uses: actions/checkout@v3
8593

94+
- name: Checkout wireguard-go submodule
95+
run: |
96+
git config --global --add safe.directory '*'
97+
git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
98+
8699
- name: Clippy check
87100
env:
88101
RUSTFLAGS: --deny warnings

.github/workflows/daemon.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
- name: Checkout repository
6969
uses: actions/checkout@v3
7070

71-
- name: Checkout binaries submodule
71+
- name: Checkout submodules
7272
run: |
7373
git config --global --add safe.directory '*'
74-
git submodule update --init --depth=1 dist-assets/binaries
74+
git submodule update --init --depth=1 dist-assets/binaries wireguard-go-rs/libwg/wireguard-go
7575
7676
# The container image already has rustup and Rust, but only the stable toolchain
7777
- name: Install Rust toolchain
@@ -86,6 +86,11 @@ jobs:
8686
- name: Checkout repository
8787
uses: actions/checkout@v2
8888

89+
- name: Checkout wireguard-go submodule
90+
run: |
91+
git config --global --add safe.directory '*'
92+
git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
93+
8994
- name: Install Protoc
9095
uses: arduino/setup-protoc@v3
9196
with:

.github/workflows/desktop-e2e.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ jobs:
103103
run: echo "HOME=/root" >> $GITHUB_ENV
104104
- name: Checkout repository
105105
uses: actions/checkout@v3
106-
- name: Checkout binaries submodule
106+
- name: Checkout submodules
107107
run: |
108108
git config --global --add safe.directory '*'
109-
git submodule update --init --depth=1 dist-assets/binaries
109+
git submodule update --init --depth=1 dist-assets/binaries wireguard-go-rs/libwg/wireguard-go
110110
- name: Build app
111111
env:
112112
USE_MOLD: false
@@ -159,9 +159,9 @@ jobs:
159159
runs-on: windows-latest
160160
steps:
161161
- name: Checkout repository
162-
uses: actions/checkout@v2
163-
- name: Checkout submodules
164-
run: git submodule update --init --depth=1
162+
uses: actions/checkout@v4
163+
with:
164+
submodules: true
165165
- name: Install Protoc
166166
uses: arduino/setup-protoc@v3
167167
with:
@@ -231,9 +231,9 @@ jobs:
231231
runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm
232232
steps:
233233
- name: Checkout repository
234-
uses: actions/checkout@v2
235-
- name: Checkout submodules
236-
run: git submodule update --init --depth=1
234+
uses: actions/checkout@v4
235+
with:
236+
submodules: true
237237
- name: Install Go
238238
uses: actions/setup-go@v3
239239
with:

.github/workflows/frontend.yml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@v3
2121

22+
- name: Checkout wireguard-go submodule
23+
run: git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
24+
2225
- name: Install Rust
2326
uses: actions-rs/toolchain@v1.0.6
2427
with:

.github/workflows/rust-supply-chain.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v3
1818

19+
- name: Checkout wireguard-go submodule
20+
run: git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
21+
1922
- name: Run cargo deny
2023
uses: EmbarkStudios/cargo-deny-action@v1
2124
with:

.github/workflows/rust-unused-dependencies.yml

+24-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111
env:
1212
# Pinning nightly just to avoid random breakage. It's fine to bump this at any time
13-
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-02-06
13+
RUST_NIGHTLY_TOOLCHAIN: nightly-2024-05-07
1414
jobs:
1515
prepare-containers:
1616
runs-on: ubuntu-latest
@@ -41,17 +41,17 @@ jobs:
4141
- name: Checkout repository
4242
uses: actions/checkout@v3
4343

44-
- name: Checkout binaries submodule
44+
- name: Checkout submodules
4545
run: |
4646
git config --global --add safe.directory '*'
47-
git submodule update --init --depth=1 dist-assets/binaries
47+
git submodule update --init --depth=1 dist-assets/binaries wireguard-go-rs/libwg/wireguard-go
4848
4949
- name: Install nightly Rust toolchain
5050
run: rustup default $RUST_NIGHTLY_TOOLCHAIN
5151

5252
- uses: taiki-e/install-action@v2
5353
with:
54-
tool: cargo-udeps
54+
tool: cargo-udeps@0.1.48
5555

5656
- name: Check for unused dependencies
5757
shell: bash
@@ -72,27 +72,36 @@ jobs:
7272
- name: Checkout repository
7373
uses: actions/checkout@v3
7474

75+
- name: Checkout wireguard-go submodule
76+
run: |
77+
git config --global --add safe.directory '*'
78+
git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
79+
7580
- name: Install nightly Rust toolchain
7681
run: |
7782
rustup default $RUST_NIGHTLY_TOOLCHAIN
7883
rustup target add aarch64-linux-android
7984
8085
- uses: taiki-e/install-action@v2
8186
with:
82-
tool: cargo-udeps
87+
tool: cargo-udeps@0.1.48
8388

8489
- name: Check for unused dependencies
8590
run: cargo udeps --target aarch64-linux-android --package mullvad-jni
8691

92+
cargo-udeps-windows:
93+
runs-on: windows-latest
94+
8795
cargo-udeps:
8896
strategy:
8997
matrix:
90-
os: [macos-latest, windows-latest]
98+
os: [windows-latest, macos-latest]
9199
runs-on: ${{ matrix.os }}
92-
93100
steps:
94101
- name: Checkout repository
95-
uses: actions/checkout@v3
102+
uses: actions/checkout@v4
103+
with:
104+
submodules: true
96105

97106
- name: Install Protoc
98107
uses: arduino/setup-protoc@v3
@@ -108,7 +117,13 @@ jobs:
108117

109118
- uses: taiki-e/install-action@v2
110119
with:
111-
tool: cargo-udeps
120+
tool: cargo-udeps@0.1.48
121+
122+
- name: Install Go
123+
if: matrix.os == 'macos-latest'
124+
uses: actions/setup-go@v3
125+
with:
126+
go-version: 1.21.3
112127

113128
- name: Check for unused dependencies
114129
shell: bash

.github/workflows/rustfmt.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v3
1616

17+
- name: Checkout wireguard-go submodule
18+
run: git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
19+
1720
- name: Install nightly Rust
1821
uses: actions-rs/toolchain@v1.0.6
1922
with:

.github/workflows/translations.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v2
1818

19+
- name: Checkout wireguard-go submodule
20+
run: git submodule update --init --depth=1 wireguard-go-rs/libwg/wireguard-go
21+
1922
- name: Read volta info
2023
id: volta
2124
uses: zoexx/github-action-json-file-properties@1.0.6

.github/workflows/unicode-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
uses: actions/checkout@v3
1010

1111
- name: Checkout submodules
12-
run: git submodule update --init
12+
run: git submodule update --init --depth=1 dist-assets/binaries wireguard-go-rs/libwg/wireguard-go
1313

1414
- name: Scan for code points
1515
run: ./ci/check-trojan-source.sh .

0 commit comments

Comments
 (0)