Skip to content

Commit

Permalink
Fix FV/MV jobs
Browse files Browse the repository at this point in the history
Fix minor CI jobs:
 - switch to latest ubuntu and macos
 - remove hardcoded git plugin version

Resolves: MINOR-FIX

Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
  • Loading branch information
ystefinko committed Mar 20, 2024
1 parent e4d666f commit 234cc04
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 54 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/fv_pipelines.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/mv_pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: MV_Pipelines

on:
push:
branches:
- '*'
# workflow_dispatch
# branches:
# - '*'
# schedule:
# MV(as well as FV) Android and iOS only once a month.
# - cron: '* 5 1 * *'

jobs:
mv-build-ios-network-test:
name: MV / iOS clang / Network tests
runs-on: macos-latest
env:
BUILD_TYPE: RelWithDebInfo
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build with tests
run: ./scripts/ios/fv/gh-actions-build-with-tests-fv.sh
shell: bash
- name: Test MV Network
run: ./scripts/ios/fv/gh-actions-functional-network-test.sh
shell: bash

mv-android-emulator-build-test:
name: MV.Android.Emulator.Build.Test.API21.ABIx86_64.NDK-Latest.
runs-on: ubuntu-latest
env:
#ANDROID_NDK_HOME: $(ANDROID_HOME)/ndk-bundle
SEGFAULT_SIGNALS: all
BUILD_TYPE: RelWithDebInfo
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Verification of cmake script
run: ls -la ${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake && ls -la ${ANDROID_NDK_HOME}/prebuilt && ls -la ${ANDROID_NDK_HOME}/ndk-build
- name: Android Emulator Test
run: scripts/android/build-test-emulator.sh
shell: bash
14 changes: 11 additions & 3 deletions scripts/android/build-test-emulator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex
#
# Copyright (C) 2020-2021 HERE Europe B.V.
# Copyright (C) 2020-2024 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,17 +24,25 @@
export ANDROID_ABI="x86_64"
export ANDROID_API=21

export NDK_ROOT=$ANDROID_HOME/ndk-bundle # This var is not exist on Azure MacOS image, step can be skipped on GitLab
export NDK_ROOT=$ANDROID_NDK_ROOT/ndk-bundle # This var is not exist on Azure MacOS image, step can be skipped on GitLab
echo "NDK_ROOT is ${NDK_ROOT} , ANDROID_HOME is ${ANDROID_HOME} " # as we already set this var inside docker image.
ls -la $ANDROID_HOME
export PATH=$PATH:$ANDROID_HOME/tools/bin/:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools

${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --list
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk;22.1.7171670" --sdk_root=${ANDROID_HOME} >/dev/null
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-21"
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-21;default;x86_64"
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "sources;android-21"
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --install "ndk-bundle;22.1.7171670"
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --list

mkdir -p build && cd build

echo ""
echo ""
echo "*************** $VARIANT Build SDK for C++ ********** Start ***************"
CMAKE_COMMAND="cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
CMAKE_COMMAND="cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_TYPE=${BUILD_TYPE} -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=android-$ANDROID_API -DANDROID_STL=c++_static -DANDROID_ABI=$ANDROID_ABI"
BUILD_COMMAND="cmake --build . -- -j4"

Expand Down
16 changes: 7 additions & 9 deletions scripts/ios/fv/gh-actions-build-with-tests-fv.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright (C) 2021 HERE Europe B.V.
# Copyright (C) 2021-2024 HERE Europe B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,19 +17,17 @@
# SPDX-License-Identifier: Apache-2.0
# License-Filename: LICENSE

mkdir -p build && cd build
# Getting rid of boost installed to the CI image (not clear when it appeared)
# asciidoc and source-highlight are using it so dependencies are ignored.
# Sometimes there is no boost and there is no need to fail in this case.
brew uninstall --ignore-dependencies boost || true

xcode-select -p
if [[ ${GITHUB_RUN_ID} != "" ]]; then
# Run on GH Actions CI
# Using Xcode_11 pre-installed on node. Otherwise, compilation may fail.
sudo xcode-select -s /Applications/Xcode_11.2.1.app
fi
xcode-select -p
mkdir -p build && cd build

cmake ../ -GXcode \
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/iOS.cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DBUILD_TYPE=${BUILD_TYPE} \
-DPLATFORM=iphoneos \
-DOLP_SDK_ENABLE_TESTING=ON \
-DSIMULATOR=YES \
Expand Down
2 changes: 1 addition & 1 deletion scripts/ios/fv/gh-actions-functional-network-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ else
echo ">>> Installing mock server SSL certificate into OS... >>>"
# Import and Make trusted
sudo security import mock-server-cert.pem
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain mock-server-cert.pem
sudo security authorizationdb write com.apple.trust-settings.admin allow; sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain mock-server-cert.pem ; sudo security authorizationdb remove com.apple.trust-settings.admin || true
# Validate cert: if trusted - succeeded , if not trusted - fails
sudo security verify-cert -c mock-server-cert.pem
echo ">>> Starting Mock Server... >>>"
Expand Down

0 comments on commit 234cc04

Please sign in to comment.