From ee58739bfe36b43346ce2282515ef6960cda2b2e Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 16:25:37 +0100 Subject: [PATCH 1/7] fix: disable superflous warnings in the NDK build --- cmake/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 68fd086..7b43eb2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -97,6 +97,7 @@ add_library(unwindstack STATIC ) target_link_libraries(unwindstack log) set_property(TARGET unwindstack PROPERTY CXX_STANDARD 17) +target_compile_options(unwindstack PRIVATE -Wno-c99-designator -Wno-reorder-init-list) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_options(unwindstack PRIVATE $) From 85a6f64cdd1aab245354fad3f44bdc23af9bdb5d Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 16:37:58 +0100 Subject: [PATCH 2/7] Try to fix the android sdk ci horrors by using the setup-android action --- .github/workflows/build.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 735f44e..91345bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,17 +19,28 @@ jobs: ANDROID_API: 30 ANDROID_NDK: 22.1.7171670 - runs-on: macos-latest + runs-on: ubuntu-latest env: ANDROID_API: ${{ matrix.ANDROID_API }} ANDROID_NDK: ${{ matrix.ANDROID_NDK }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: "recursive" + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Android SDK + uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 + with: + packages: 'sdkmanager tools platform-tools' + - name: Installing Android SDK Dependencies run: | echo "Downloading ndk;$ANDROID_NDK" From 55bdd21cb6f5ba731811bdad9ce99eb12d0b0652 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 16:40:22 +0100 Subject: [PATCH 3/7] don't install sdkmanager via action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 91345bd..f000e77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 with: - packages: 'sdkmanager tools platform-tools' + packages: 'tools platform-tools' - name: Installing Android SDK Dependencies run: | From 9aa3630757cf52fabe80416bbd4df1d54d400928 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 17:30:16 +0100 Subject: [PATCH 4/7] execute sdkmanager from cmdline-tools --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f000e77..b3cd2e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: - name: Installing Android SDK Dependencies run: | echo "Downloading ndk;$ANDROID_NDK" - echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install \ + echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install \ "ndk;$ANDROID_NDK" | \ grep -v "\[=" || true # suppress the progress bar, so we get meaningful logs From 2567c97e75af4c90ddba8d3f2bd0269983029a91 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 17:37:33 +0100 Subject: [PATCH 5/7] update api+ndk upper bound --- .github/workflows/build.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3cd2e3..4983d01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,9 @@ jobs: - name: Android (API 16, NDK 20) ANDROID_API: 16 ANDROID_NDK: 20.1.5948944 - - name: Android (API 30, NDK 22) - ANDROID_API: 30 - ANDROID_NDK: 22.1.7171670 + - name: Android (API 35, NDK 27) + ANDROID_API: 35 + ANDROID_NDK: 27.0.12077973 runs-on: ubuntu-latest @@ -48,6 +48,15 @@ jobs: "ndk;$ANDROID_NDK" | \ grep -v "\[=" || true # suppress the progress bar, so we get meaningful logs + - name: Build x86 + run: | + rm -rf build + cmake -B build -S cmake \ + -D CMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/$ANDROID_NDK/build/cmake/android.toolchain.cmake \ + -D ANDROID_NATIVE_API_LEVEL=$ANDROID_API \ + -D ANDROID_ABI=x86 + cmake --build build --parallel + - name: Build x86_64 run: | cmake -B build -S cmake \ @@ -56,6 +65,15 @@ jobs: -D ANDROID_ABI=x86_64 cmake --build build --parallel + - name: Build armeabi-v7a + run: | + rm -rf build + cmake -B build -S cmake \ + -D CMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/$ANDROID_NDK/build/cmake/android.toolchain.cmake \ + -D ANDROID_NATIVE_API_LEVEL=$ANDROID_API \ + -D ANDROID_ABI=armeabi-v7a + cmake --build build --parallel + - name: Build arm64-v8a run: | rm -rf build From c7a5579af3888bc1f0000713b66fee11255e6514 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 17:40:55 +0100 Subject: [PATCH 6/7] ignore unknown warnings --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7b43eb2..4e57571 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -97,7 +97,7 @@ add_library(unwindstack STATIC ) target_link_libraries(unwindstack log) set_property(TARGET unwindstack PROPERTY CXX_STANDARD 17) -target_compile_options(unwindstack PRIVATE -Wno-c99-designator -Wno-reorder-init-list) +target_compile_options(unwindstack PRIVATE -Wunknown-warning-option -Wno-c99-designator -Wno-reorder-init-list) if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_options(unwindstack PRIVATE $) From 4a78d8d8eacb4ad6bb5df30cec1d4007243d0df8 Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Wed, 20 Nov 2024 17:44:19 +0100 Subject: [PATCH 7/7] bump setup-java to v4 (major-spec only allowed because part of actions org) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4983d01..d5245ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: submodules: "recursive" - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin'