Skip to content

Commit

Permalink
Add container wrapper android build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-mullvad committed Sep 4, 2024
1 parent 6c61ed5 commit 8daf968
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/android-app-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Android - Wrapper build
on:

Check warning on line 3 in .github/workflows/android-app-wrapper.yml

View workflow job for this annotation

GitHub Actions / check-formatting

3:1 [truthy] truthy value should be one of [false, true]
workflow_dispatch:
pull_request:

permissions: {}

jobs:
build-app:
name: Build app (using wrapper)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

- name: Checkout wireguard-go-rs recursively
run: |
git config --global --add safe.directory '*'
git submodule update --init --recursive --depth=1 wireguard-go-rs
- name: Install podman
shell: bash
run: |
sudo apt-get update
sudo apt-get install podman
- name: Run build script
shell: bash
run: ./building/containerized-build.sh android --dev-build
4 changes: 3 additions & 1 deletion build-apk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mkdir -p "app/build/extraAssets"
mkdir -p "app/build/extraJni"
popd

for ARCHITECTURE in ${ARCHITECTURES:-aarch64 armv7 x86_64 i686}; do
for ARCHITECTURE in ${ARCHITECTURES:-x86_64}; do
case "$ARCHITECTURE" in
"x86_64")
TARGET="x86_64-linux-android"
Expand Down Expand Up @@ -111,6 +111,8 @@ for ARCHITECTURE in ${ARCHITECTURES:-aarch64 armv7 x86_64 i686}; do
fi
done

exit 0

echo "Updating relays.json..."
cargo run --bin relay_list "${CARGO_ARGS[@]}" > android/app/build/extraAssets/relays.json

Expand Down
4 changes: 0 additions & 4 deletions building/container-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,4 @@ fi
set -x
exec "$CONTAINER_RUNNER" run --rm -it \
-v "$REPO_DIR:$REPO_MOUNT_TARGET:Z" \
-v "$CARGO_TARGET_VOLUME_NAME:/cargo-target:Z" \
-v "$CARGO_REGISTRY_VOLUME_NAME:/root/.cargo/registry:Z" \
"${optional_gradle_cache_volume[@]}" \
"${optional_android_credentials_volume[@]}" \
"$container_image_name" bash -c "$optional_mold $*"

0 comments on commit 8daf968

Please sign in to comment.