Skip to content

Commit 94402c9

Browse files
authored
Add gcc-7 on 20.04 (#1367)
And use gcc-7 by specifying CC and CXX. Now we are back to gcc7 again after Github Actions CI deprecates 18.04 Ubuntu. Fix codecov upload. Relates-To: OLPEDGE-2776 Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
1 parent b2a8e33 commit 94402c9

File tree

3 files changed

+14
-31
lines changed

3 files changed

+14
-31
lines changed

.github/workflows/psv_pipelines.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,40 @@ jobs:
1717
psv-linux-gcc-build-test-codecov:
1818
name: PSV / Linux gcc 7.5 / Tests / Code coverage
1919
runs-on: ubuntu-20.04
20+
env:
21+
BUILD_TYPE: RelWithDebInfo
22+
CC: gcc-7
23+
CXX: g++-7
2024
steps:
2125
- name: Check out repository
22-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2327
- name: "C++ Lint checker script"
2428
run: ./scripts/misc/cpplint_ci.sh
2529
shell: bash
2630
- name: Install Ubuntu dependencies
27-
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev --no-install-recommends
31+
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
2832
shell: bash
2933
- name: Compile project with cmake and ccache
3034
run: gcc --version && ./scripts/linux/psv/build_psv.sh
3135
shell: bash
32-
- name: Run unit and integration tests. Report coverage to CodeCov.
36+
- name: Run unit and integration tests
3337
run: ./scripts/linux/psv/test_psv.sh
3438
shell: bash
35-
- name: Archive code coverage script
36-
uses: actions/upload-artifact@v2
37-
with:
38-
name: codecov-script
39-
path: codecov_upload_bash_*.sh
39+
- name: Upload coverage to Codecov
40+
uses: codecov/codecov-action@v3
4041

4142
psv-linux-gcc-build-no-cache:
4243
name: PSV / Linux gcc 7.5 / OLP_SDK_ENABLE_DEFAULT_CACHE=OFF
4344
runs-on: ubuntu-20.04
4445
env:
4546
BUILD_TYPE: RelWithDebInfo
47+
CC: gcc-7
48+
CXX: g++-7
4649
steps:
4750
- name: Check out repository
4851
uses: actions/checkout@v2
4952
- name: Install Ubuntu dependencies
50-
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev --no-install-recommends
53+
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
5154
shell: bash
5255
- name: Compile project without cache
5356
run: ./scripts/linux/psv/build_psv_no_cache.sh

scripts/linux/psv/build_psv_no_cache.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -ex
22
#
3-
# Copyright (C) 2021 HERE Europe B.V.
3+
# Copyright (C) 2021-2022 HERE Europe B.V.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
2020
mkdir -p build
2121
cd build
2222

23-
cmake \
23+
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
2424
-DOLP_SDK_ENABLE_TESTING=OFF \
2525
-DOLP_SDK_ENABLE_DEFAULT_CACHE=OFF \
2626
-DOLP_SDK_ENABLE_DEFAULT_CACHE_LMDB=OFF \

scripts/linux/psv/test_psv.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,3 @@ $CPP_TEST_SOURCE_DARASERVICE_WRITE/olp-cpp-sdk-dataservice-write-tests \
4141
echo ">>> Integration Test ... >>>"
4242
$CPP_TEST_SOURCE_INTEGRATION/olp-cpp-sdk-integration-tests \
4343
--gtest_output="xml:olp-cpp-sdk-integration-tests-report.xml"
44-
45-
# CodeCov verification stage:
46-
# https://docs.codecov.io/docs/about-the-codecov-bash-uploader#validating-the-bash-script
47-
curl -fLso codecov https://codecov.io/bash;
48-
VERSION=$(grep -o 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
49-
# Loop for 3 types of SHA sums
50-
for i in 1 256 512
51-
do
52-
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
53-
done
54-
55-
56-
curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov_upload_bash_$(date +%s).sh
57-
cp $(ls codecov_upload_bash_*.sh) codecov_upload_bash.sh
58-
# Execute CodeCov scanner
59-
ls -la *.xml
60-
bash codecov_upload_bash.sh -Z -X fix "$@"
61-
62-
63-
#bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)