From d3119a21530a7864f5b89fa62dbb770bcccaf581 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 11:58:31 +0200 Subject: [PATCH 1/8] Add buiding of volk_gnsssdr on Android --- .github/workflows/volk_android.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/volk_android.yml diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml new file mode 100644 index 000000000..dbec9dd9d --- /dev/null +++ b/.github/workflows/volk_android.yml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades +on: + push: + paths: + - CITATION.cff + workflow_dispatch: + pull_request: + paths: + - CITATION.cff + workflow_dispatch: + +name: CITATION.cff +jobs: + Validate-CITATION-cff: + runs-on: ubuntu-latest + name: Validate CITATION.cff + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" + + steps: + - name: Checkout + uses: actions/checkout@v2 + + # This is needed for workflows running on + # ubuntu-20.04 or later + - name: Install V8 + if: runner.os == 'Linux' + run: | + sudo apt-get install -y libv8-dev + - name: Validate CITATION.cff + uses: dieghernan/cff-validator@main + + # Upload artifact + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: citation-cff-errors + path: citation_cff_errors.md From 75c71e53ee091e9af45acad66a7e7447b05a230c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 12:02:21 +0200 Subject: [PATCH 2/8] Add buiding of volk_gnsssdr on Android --- .github/workflows/volk_android.yml | 64 +++++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml index dbec9dd9d..970d505a4 100644 --- a/.github/workflows/volk_android.yml +++ b/.github/workflows/volk_android.yml @@ -3,38 +3,54 @@ on: push: paths: - - CITATION.cff + - src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr workflow_dispatch: pull_request: paths: - - CITATION.cff + - src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr workflow_dispatch: -name: CITATION.cff +name: Build on Android NDK jobs: - Validate-CITATION-cff: + build: + name: Build on Android NDK ${{ matrix.arch.name }} + + strategy: + fail-fast: false + matrix: + arch: + - { name: armeabi-v7a, allow_fail: false } + - { name: arm64-v8a, allow_fail: false } + - { name: x86, allow_fail: false } + - { name: x86_64, allow_fail: false } + runs-on: ubuntu-latest - name: Validate CITATION.cff - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3.0.0 - # This is needed for workflows running on - # ubuntu-20.04 or later - - name: Install V8 - if: runner.os == 'Linux' - run: | - sudo apt-get install -y libv8-dev - - name: Validate CITATION.cff - uses: dieghernan/cff-validator@main + - name: Update repositories + run: sudo apt update - # Upload artifact - - uses: actions/upload-artifact@v2 - if: failure() - with: - name: citation-cff-errors - path: citation_cff_errors.md + # All dependencies + - name: Install dependencies + run: sudo apt install -y cmake openjdk-11-jre-headless wget unzip make python3-mako + + # Setup Android SDK, and auto-accept licenses + - name: Install Android SDK + run: wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && mkdir android-sdk-linux && unzip -qq android-sdk.zip -d android-sdk-linux && export ANDROID_HOME=./android-sdk-linux && echo y | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --update && (echo y; echo y; echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-linux --licenses + + # Call SDKManager to install the Android NDK + - name: Install Android NDK + run: $GITHUB_WORKSPACE/android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=$GITHUB_WORKSPACE/android-sdk-linux --install "ndk;24.0.8215888" --channel=3 + + # Setup build directory + - name: Setup ${{ matrix.arch.name }} + shell: bash + run: cd $GITHUB_WORKSPACE/ && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-23 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + + # Build + - name: Build ${{ matrix.arch.name }} + shell: bash + run: cd $GITHUB_WORKSPACE/build && make + continue-on-error: ${{ matrix.arch.allow_fail }} From ea7a4ff5d1ae38fe44066288beda356bfcdd1ab1 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 12:16:01 +0200 Subject: [PATCH 3/8] Add buiding of volk_gnsssdr on Android --- .github/workflows/volk_android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml index 970d505a4..b45702719 100644 --- a/.github/workflows/volk_android.yml +++ b/.github/workflows/volk_android.yml @@ -3,11 +3,11 @@ on: push: paths: - - src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + - 'src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**' workflow_dispatch: pull_request: paths: - - src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + - 'src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**' workflow_dispatch: name: Build on Android NDK From 68983ba77722d6c43a06af2d6fb408af515127e5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 12:18:33 +0200 Subject: [PATCH 4/8] Add buiding of volk_gnsssdr on Android --- .github/workflows/volk_android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml index b45702719..73e783bb1 100644 --- a/.github/workflows/volk_android.yml +++ b/.github/workflows/volk_android.yml @@ -47,7 +47,7 @@ jobs: # Setup build directory - name: Setup ${{ matrix.arch.name }} shell: bash - run: cd $GITHUB_WORKSPACE/ && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-23 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + run: cd $GITHUB_WORKSPACE/ && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-23 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr # Build - name: Build ${{ matrix.arch.name }} From ea386ece93f1ac592a7ecd4ca0fc55259285fa97 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 12:30:12 +0200 Subject: [PATCH 5/8] Add include for cpowf --- ...volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h index 0af2194e2..6ff4c396c 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h @@ -61,6 +61,7 @@ #include #include #include +#include #ifdef LV_HAVE_GENERIC From e509354751608560fc03912c05723ad997f406ea Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 12:55:07 +0200 Subject: [PATCH 6/8] Fix for Android --- .github/workflows/volk_android.yml | 2 +- ..._gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml index 73e783bb1..a4fa6f8a5 100644 --- a/.github/workflows/volk_android.yml +++ b/.github/workflows/volk_android.yml @@ -10,7 +10,7 @@ on: - 'src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**' workflow_dispatch: -name: Build on Android NDK +name: Build volk-gnssdr on Android NDK jobs: build: name: Build on Android NDK ${{ matrix.arch.name }} diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h index 6ff4c396c..ed6bb85de 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/kernels/volk_gnsssdr/volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn.h @@ -61,7 +61,6 @@ #include #include #include -#include #ifdef LV_HAVE_GENERIC @@ -73,7 +72,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g lv_32fc_t phase_doppler = (*phase); int n_vec; unsigned int n; -#if _WIN32 +#if _WIN32 || __ANDROID_API__ const float arga = cargf(phase_inc_rate); #endif for (n_vec = 0; n_vec < num_a_vectors; n_vec++) @@ -93,7 +92,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g } tmp32_1 = *in_common++ * (*phase); phase_doppler *= phase_inc; -#if _WIN32 +#if _WIN32 || __ANDROID_API__ const float theta = (float)(n * n) * arga; phase_doppler_rate = lv_cmake(cosf(theta), sinf(theta)); #else From a14970bf1a725b4892cd58d2d6e17692f1193835 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 13:07:51 +0200 Subject: [PATCH 7/8] Raise Android minSdkVersion to 24 --- .github/workflows/volk_android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/volk_android.yml b/.github/workflows/volk_android.yml index a4fa6f8a5..ebdf9fc9d 100644 --- a/.github/workflows/volk_android.yml +++ b/.github/workflows/volk_android.yml @@ -47,7 +47,7 @@ jobs: # Setup build directory - name: Setup ${{ matrix.arch.name }} shell: bash - run: cd $GITHUB_WORKSPACE/ && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-23 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr + run: cd $GITHUB_WORKSPACE/ && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/android-sdk-linux/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.arch.name }} -DANDROID_PLATFORM=android-24 ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr # Build - name: Build ${{ matrix.arch.name }} From dc297f86779f1775697c6e62bf2230d9fe4f5885 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Sep 2022 14:05:32 +0200 Subject: [PATCH 8/8] Raise volk_gnsssdr VERSION_INFO_MAINT_VERSION to 17.git --- .../libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt index d3446b11b..8bd243f85 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/CMakeLists.txt @@ -209,7 +209,7 @@ message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.") set(VERSION_INFO_MAJOR_VERSION 0) set(VERSION_INFO_MINOR_VERSION 0) -set(VERSION_INFO_MAINT_VERSION 17) +set(VERSION_INFO_MAINT_VERSION 17.git) include(VolkGnsssdrVersion) # setup version info