Skip to content

Commit 8daf968

Browse files
committed
Add container wrapper android build workflow
1 parent 6c61ed5 commit 8daf968

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Android - Wrapper build
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
permissions: {}
8+
9+
jobs:
10+
build-app:
11+
name: Build app (using wrapper)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
submodules: true
18+
19+
- name: Checkout wireguard-go-rs recursively
20+
run: |
21+
git config --global --add safe.directory '*'
22+
git submodule update --init --recursive --depth=1 wireguard-go-rs
23+
24+
- name: Install podman
25+
shell: bash
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install podman
29+
30+
- name: Run build script
31+
shell: bash
32+
run: ./building/containerized-build.sh android --dev-build

build-apk.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ mkdir -p "app/build/extraAssets"
7777
mkdir -p "app/build/extraJni"
7878
popd
7979

80-
for ARCHITECTURE in ${ARCHITECTURES:-aarch64 armv7 x86_64 i686}; do
80+
for ARCHITECTURE in ${ARCHITECTURES:-x86_64}; do
8181
case "$ARCHITECTURE" in
8282
"x86_64")
8383
TARGET="x86_64-linux-android"
@@ -111,6 +111,8 @@ for ARCHITECTURE in ${ARCHITECTURES:-aarch64 armv7 x86_64 i686}; do
111111
fi
112112
done
113113

114+
exit 0
115+
114116
echo "Updating relays.json..."
115117
cargo run --bin relay_list "${CARGO_ARGS[@]}" > android/app/build/extraAssets/relays.json
116118

building/container-run.sh

-4
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,4 @@ fi
5555
set -x
5656
exec "$CONTAINER_RUNNER" run --rm -it \
5757
-v "$REPO_DIR:$REPO_MOUNT_TARGET:Z" \
58-
-v "$CARGO_TARGET_VOLUME_NAME:/cargo-target:Z" \
59-
-v "$CARGO_REGISTRY_VOLUME_NAME:/root/.cargo/registry:Z" \
60-
"${optional_gradle_cache_volume[@]}" \
61-
"${optional_android_credentials_volume[@]}" \
6258
"$container_image_name" bash -c "$optional_mold $*"

0 commit comments

Comments
 (0)