Skip to content

Commit

Permalink
Github flow improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Dec 10, 2024
1 parent 481361f commit da70d0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/android-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ jobs:
env:
RUSTFLAGS: --deny warnings
run: |
mkdir -p android/app/build/extraAssets
cargo run --bin relay_list > android/app/build/extraAssets/relays.json
mkdir -p android/app/src/main/assets
cargo run --bin relay_list > android/app/src/main/assets/relays.json
- name: Upload
uses: actions/upload-artifact@v4
with:
name: relay-list
path: android/app/build/extraAssets/relays.json
path: android/app/src/main/assets/relays.json
if-no-files-found: error
retention-days: 7

Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
env:
cache_hash: ${{ steps.native-lib-cache-hash.outputs.native_lib_hash }}
with:
path: ./android/app/build/extraJni
path: ./android/app/build/rustJniLibs
key: android-native-libs-${{ runner.os }}-${{ matrix.abi }}-${{ env.cache_hash }}

- name: Build native libraries
Expand All @@ -208,7 +208,7 @@ jobs:
run: |
ARCHITECTURES="${{ matrix.abi }}"
UNSTRIPPED_LIB_PATH="$CARGO_TARGET_DIR/${{ matrix.target }}/$BUILD_TYPE/libmullvad_jni.so"
STRIPPED_LIB_PATH="./android/app/build/extraJni/${{ matrix.abi }}/libmullvad_jni.so"
STRIPPED_LIB_PATH="./android/app/build/rustJniLibs/${{ matrix.abi }}/libmullvad_jni.so"
NDK_TOOLCHAIN_STRIP_TOOL="$NDK_TOOLCHAIN_DIR/llvm-strip"
cargo build --target ${{ matrix.target }} --verbose --package mullvad-jni --features api-override
$NDK_TOOLCHAIN_STRIP_TOOL --strip-debug --strip-unneeded -o "$STRIPPED_LIB_PATH" "$UNSTRIPPED_LIB_PATH"
Expand All @@ -217,7 +217,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: native-libs-${{ matrix.arch }}
path: android/app/build/extraJni
path: android/app/build/rustJniLibs
if-no-files-found: error
retention-days: 7

Expand Down Expand Up @@ -316,16 +316,16 @@ jobs:
- uses: actions/download-artifact@v4
with:
pattern: native-libs-*
path: android/app/build/extraJni
path: android/app/build/rustJniLibs
merge-multiple: true

- uses: actions/download-artifact@v4
with:
name: relay-list
path: android/app/build/extraAssets
path: android/app/src/main/assets

- name: Copy maybenot machines to asset directory
run: cp dist-assets/maybenot_machines android/app/build/extraAssets/
run: cp dist-assets/maybenot_machines android/app/src/main/assets/

- name: Build app
uses: burrunan/gradle-cache-action@v1
Expand Down
1 change: 1 addition & 0 deletions android/scripts/update-lockfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ GRADLE_TASKS=(
)
EXCLUDED_GRADLE_TASKS=(
"-xgenerateRelayList"
"-xcargoBuild"
)

export GRADLE_OPTS
Expand Down

0 comments on commit da70d0f

Please sign in to comment.