Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android CI #294

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ jobs:
runs-on: ubuntu-22.04
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Set Up Android tools
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
--sdk_root=$ANDROID_SDK_ROOT \
"platform-tools" "platforms;android-27" "build-tools;27.0.3"
- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -106,5 +111,7 @@ jobs:
toolchain: 1.69
- name: Create native dependencies
run: make add-android-targets && make android
- name: Initialize root project
run: mvn install -N
- name: Build android sdk
run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ jobs:
build-aar-library:
runs-on: ubuntu-22.04
steps:
- name: Set Up Android tools
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
--sdk_root=$ANDROID_SDK_ROOT \
"platform-tools" "platforms;android-27" "build-tools;27.0.3"
# Setup rust
- name: Setup Rust
uses: actions-rs/toolchain@v1
Expand All @@ -103,6 +108,8 @@ jobs:
- name: Make android native dependencies
run: make add-android-targets && make android
# Builds and tests the sdk
- name: Initialize root project
run: mvn install -N
- name: Build and test android sdk
run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install
- name: Upload aar
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ git clone https://github.com/Concordium/concordium-java-sdk.git --recurse-submod
2. Set the ANDROID_HOME environment variable to the path to your Android SDK installation.
3. Run `make add-android-targets` from the root of this repository.
4. Run `make android` from the root of this repository.
4. Run `mvn install -N` from the root of the repository.
5. Run `mvn install` from the root of the [concordium-android-sdk](./concordium-android-sdk) folder.

`make add-android-targets` adds the rust targets that the native libraries will be built for.
Expand Down
6 changes: 6 additions & 0 deletions concordium-android-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
<protoSourceRoot>${project.basedir}/../concordium-base/concordium-grpc-api/
</protoSourceRoot>
<checkStaleness>true</checkStaleness>
<excludes>
<exclude>**/google/protobuf/wrappers.proto</exclude>
</excludes>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -115,6 +118,9 @@
</protoSourceRoot>
<attachProtoSources>false</attachProtoSources>
<checkStaleness>true</checkStaleness>
<excludes>
<exclude>**/google/protobuf/wrappers.proto</exclude>
</excludes>
</configuration>
<executions>
<execution>
Expand Down
Loading