Skip to content

Commit 2f6dd7d

Browse files
committed
Remove explicit calls to build-wireguard-go.sh and its --no-docker flag
1 parent df1331c commit 2f6dd7d

File tree

9 files changed

+8
-38
lines changed

9 files changed

+8
-38
lines changed

.github/workflows/android-app.yml

-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ jobs:
195195
UNSTRIPPED_LIB_PATH="$CARGO_TARGET_DIR/${{ matrix.target }}/$BUILD_TYPE/libmullvad_jni.so"
196196
STRIPPED_LIB_PATH="./android/app/build/extraJni/${{ matrix.abi }}/libmullvad_jni.so"
197197
NDK_TOOLCHAIN_STRIP_TOOL="$NDK_TOOLCHAIN_DIR/llvm-strip"
198-
./wireguard/build-wireguard-go.sh --android --no-docker
199198
cargo build --target ${{ matrix.target }} --verbose --package mullvad-jni --features api-override
200199
$NDK_TOOLCHAIN_STRIP_TOOL --strip-debug --strip-unneeded -o "$STRIPPED_LIB_PATH" "$UNSTRIPPED_LIB_PATH"
201200

android/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# -v $GRADLE_CACHE_VOLUME_NAME:/root/.gradle:Z \
99
# -v $ANDROID_CREDENTIALS_DIR:/build/android/credentials:Z \
1010
# -v /path/to/repository_root:/build:Z \
11-
# mullvadvpn-app-build-android ./build-apk.sh --dev-build --no-docker
11+
# mullvadvpn-app-build-android ./build-apk.sh --dev-build
1212
#
1313
# See the base image Dockerfile in the repository root (../../Dockerfile)
1414
# for more information.

android/docs/BuildInstructions.macos.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER="$NDK_TOOLCHAIN_DIR/x86_64-linux
6565
Run the build script in the root of the project to assemble all the native libraries and the app:
6666

6767
```bash
68-
./build-apk.sh --dev-build --no-docker
68+
./build-apk.sh --dev-build
6969
```
7070

7171
Once the build is complete you should receive a message looking similar to this:

build-apk.sh

-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ GRADLE_BUILD_TYPE="release"
1616
GRADLE_TASKS=(createOssProdReleaseDistApk createPlayProdReleaseDistApk)
1717
BUNDLE_TASKS=(createPlayProdReleaseDistBundle)
1818
CARGO_ARGS=( "--release" )
19-
EXTRA_WGGO_ARGS=""
2019
BUILD_BUNDLE="no"
2120
CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-"target"}
2221
SKIP_STRIPPING=${SKIP_STRIPPING:-"no"}
@@ -32,11 +31,8 @@ while [ -n "${1:-""}" ]; do
3231
GRADLE_BUILD_TYPE="fdroid"
3332
GRADLE_TASKS=(createOssProdFdroidDistApk)
3433
BUNDLE_TASKS=(createOssProdFdroidDistBundle)
35-
EXTRA_WGGO_ARGS="--no-docker"
3634
elif [[ "${1:-""}" == "--app-bundle" ]]; then
3735
BUILD_BUNDLE="yes"
38-
elif [[ "${1:-""}" == "--no-docker" ]]; then
39-
EXTRA_WGGO_ARGS="--no-docker"
4036
elif [[ "${1:-""}" == "--skip-stripping" ]]; then
4137
SKIP_STRIPPING="yes"
4238
fi
@@ -80,8 +76,6 @@ $GRADLE_CMD --console plain clean
8076
mkdir -p "app/build/extraJni"
8177
popd
8278

83-
#./wireguard/build-wireguard-go.sh --android $EXTRA_WGGO_ARGS
84-
8579
for ARCHITECTURE in ${ARCHITECTURES:-aarch64 armv7 x86_64 i686}; do
8680
case "$ARCHITECTURE" in
8781
"x86_64")

build.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,6 @@ function build {
218218
# Compile and link all binaries.
219219
################################################################################
220220

221-
if [[ "$(uname -s)" != "MINGW"* ]]; then
222-
log_header "Building wireguard-go$for_target_string"
223-
./wireguard/build-wireguard-go.sh "$current_target"
224-
fi
225-
226221
log_header "Building Rust code in $RUST_BUILD_MODE mode using $RUSTC_VERSION$for_target_string"
227222

228223
local cargo_target_arg=()
@@ -317,6 +312,7 @@ for t in "${TARGETS[@]:-""}"; do
317312
build "$t"
318313
done
319314

315+
320316
################################################################################
321317
# Package app.
322318
################################################################################

building/containerized-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ case $platform in
1818
shift 1
1919
;;
2020
android)
21-
build_command=("./build-apk.sh" "--no-docker")
21+
build_command=("./build-apk.sh")
2222
shift 1
2323
;;
2424
*)

ci/check-rust.sh

-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ set -eux
44

55
export RUSTFLAGS="--deny warnings"
66

7-
# Build WireGuard Go
8-
if [[ "$(uname -s)" != "MINGW"* ]]; then
9-
./wireguard/build-wireguard-go.sh
10-
fi
11-
127
# Build Rust crates
138
source env.sh
149
time cargo build --locked --verbose

wireguard-go-rs/build-wireguard-go.sh

+3-17
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ function is_android_build {
1515
return 1
1616
}
1717

18-
function is_docker_build {
19-
for arg in "$@"
20-
do
21-
case "$arg" in
22-
"--no-docker")
23-
return 1
24-
esac
25-
done
26-
return 0
27-
}
28-
2918
function unix_target_triple {
3019
local platform
3120
platform="$(uname -s)"
@@ -48,6 +37,7 @@ function unix_target_triple {
4837

4938

5039
function build_unix {
40+
# TODO: consider using `log_header` here
5141
echo "Building wireguard-go for $1"
5242

5343
# Flags for cross compiling
@@ -88,13 +78,9 @@ function build_unix {
8878
}
8979

9080
function build_android {
91-
echo "Building for android"
81+
echo "Building wireguard-go for android"
9282

93-
if is_docker_build "$@"; then
94-
../building/container-run.sh android wireguard-go-rs/libwg/build-android.sh
95-
else
96-
./libwg/build-android.sh
97-
fi
83+
./libwg/build-android.sh
9884
}
9985

10086
function build_wireguard_go {

wireguard-go-rs/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313
match target_os.as_str() {
1414
"linux" => {}
1515
"android" => {
16-
cmd.arg("--android").arg("--no-docker");
16+
cmd.arg("--android");
1717
}
1818
_ => unimplemented!("building wireguard-go-rs for {target_os} is not implemented."),
1919
}

0 commit comments

Comments
 (0)