Skip to content

Commit

Permalink
ci: fix android build
Browse files Browse the repository at this point in the history
  - set -lunwind to LDFLAGS
  - update NDK to 25b and API 30
  - update Gnuradio3.10 to maint-3.10
  - update to jdk17, gradle7.2
  - update boost to 1.82
  - update libiio to v0.25
  - update glib, spdlog, Boost-for-Android
  - update androiddeployqt

Signed-off-by: Bindea Cristian <[email protected]>
  • Loading branch information
bindea-cristian authored and adisuciu committed Nov 15, 2023
1 parent d0dba6f commit d9b410e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Pull the Docker Image
run: docker pull analogdevices/scopy-build:1.4.1-android
run: docker pull cristianbindea/scopy-android:latest
- name: Run Docker Image
run: |
$GITHUB_WORKSPACE/CI/appveyor/gen_ci_envs.sh > $GITHUB_WORKSPACE/CI/appveyor/gh-actions.envs
docker run --privileged --net=host \
-v `pwd`:$GITHUB_WORKSPACE:rw \
-v $(pwd):$GITHUB_WORKSPACE:rw \
-e "BRANCH=${GITHUB_REF#refs/heads/}" \
--env-file $GITHUB_WORKSPACE/CI/appveyor/gh-actions.envs \
analogdevices/scopy-build:1.4.1-android /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/build_scopy_apk.sh
- uses: actions/upload-artifact@v2
cristianbindea/scopy-android:latest /bin/bash -xe $GITHUB_WORKSPACE/CI/appveyor/build_scopy_apk.sh
- uses: actions/upload-artifact@v3
with:
name: scopy-android
path: |
Expand Down
20 changes: 1 addition & 19 deletions CI/appveyor/build_scopy_apk.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash
set -xe
source ./android_toolchain.sh $1 $2

source ./android_toolchain.sh
ARTIFACT_LOCATION=$GITHUB_WORKSPACE


clone_scopy() {
git clone $REPO_URL
pushd scopy
Expand All @@ -15,7 +13,6 @@ clone_scopy() {
popd
}


#cp libs
cp_scripts() {
pushd scopy
Expand All @@ -26,7 +23,6 @@ cp_scripts() {
}

make_apk_aab() {
source ./android_toolchain.sh arm
pushd scopy
rm -rf build*

Expand All @@ -38,25 +34,11 @@ make_apk_aab() {
./android_deploy_libs.sh
./android_deploy_qt.sh apk

pushd ../
source ./android_toolchain.sh aarch64
popd

./android_cmake.sh .
cd $BUILDDIR
make -j$JOBS iio-emu
make -j$JOBS scopy
cd ..
./android_deploy_libs.sh
./android_deploy_qt.sh apk #sign

./android_deploy_qt.sh aab #sign
./android_get_symbols.sh
popd
}



move_artifact() {
pushd scopy
sudo cp *.apk $ARTIFACT_LOCATION
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ target_compile_options(${PROJECT_NAME} PUBLIC
)

set_target_properties(${PROJECT_NAME} PROPERTIES
CXX_STANDARD 11
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
Expand Down
9 changes: 5 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'com.android.tools.build:gradle:7.0.0'
//https://central.sonatype.com/artifact/com.github.hazendaz.gradle/gradle/7.5
}
}

repositories {
google()
jcenter()
mavenCentral()
}

apply plugin: 'com.android.application'
Expand All @@ -36,7 +37,7 @@ android {

compileSdkVersion androidCompileSdkVersion.toInteger()

buildToolsVersion '28.0.3'
buildToolsVersion '33.0.1'

sourceSets {
main {
Expand Down
7 changes: 6 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
org.gradle.jvmargs=-Xmx2048m \
--add-exports java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED \
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens java.base/java.io=ALL-UNNAMED \
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED

# Gradle caching allows reusing the build artifacts from a previous
# build with the same inputs. However, over time, the cache size will
Expand Down
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
#distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit d9b410e

Please sign in to comment.