1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-10-31 23:26:22 +00:00
gnss-sdr/.github/workflows/volk_gnsssdr_android.yml

63 lines
2.5 KiB
YAML
Raw Normal View History

2022-09-05 09:58:31 +00:00
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <carles.fernandez@cttc.es>
on:
push:
paths:
2022-11-25 12:58:00 +00:00
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
2022-09-05 09:58:31 +00:00
pull_request:
paths:
2022-11-25 12:58:00 +00:00
- "src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/**"
- "CMakeLists.txt"
2022-11-27 15:49:41 +00:00
workflow_dispatch:
2022-09-05 09:58:31 +00:00
name: Build volk_gnsssdr on Android NDK
2022-09-05 09:58:31 +00:00
jobs:
2022-09-05 10:02:21 +00:00
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 }
2022-09-05 09:58:31 +00:00
runs-on: ubuntu-latest
steps:
2022-12-17 08:40:20 +00:00
- uses: actions/checkout@v3
2022-11-25 12:58:00 +00:00
- name: Update repositories
run: sudo apt update
- 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
2022-12-17 08:40:20 +00:00
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
2022-11-25 12:58:00 +00:00
# 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
2022-12-17 08:40:20 +00:00
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
2022-11-25 12:58:00 +00:00
# Build
- name: Build ${{ matrix.arch.name }}
shell: bash
run: cd $GITHUB_WORKSPACE/build && make
continue-on-error: ${{ matrix.arch.allow_fail }}