Skip to content

Commit 3bafc76

Browse files
[ci] Use docker container for CI build
Signed-off-by: Mykola Kobets <mykola_kobets@epam.com>
1 parent bfd2d66 commit 3bafc76

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/build_test.yaml

+13-6
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,25 @@ on:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-22.04
16+
permissions: read-all
17+
container:
18+
image: ghcr.io/aosedge/aos-core-build-base:latest
19+
options: '--entrypoint /usr/bin/bash'
20+
credentials:
21+
username: ${{ github.actor }}
22+
password: ${{ github.token }}
23+
1624
steps:
25+
# Apply solution to "HOME is overridden for containers" problem: https://github.com/actions/runner/issues/863
26+
- name: Preserve $HOME set in the container
27+
run: echo HOME=/root >> "$GITHUB_ENV"
28+
1729
- name: Checkout
1830
uses: actions/checkout@v4
1931
with:
2032
fetch-depth: 0
2133
submodules: 'recursive'
2234

23-
- name: Prepare
24-
run: |
25-
sudo apt install lcov libsofthsm2 libsystemd-dev cppcheck -y
26-
pip install conan
27-
2835
- name: Build and test
2936
run: |
3037
mkdir build
@@ -40,7 +47,7 @@ jobs:
4047
- name: Static analysis
4148
run: |
4249
cppcheck --enable=all --inline-suppr -I src --std=c++17 --error-exitcode=1 \
43-
--suppressions-list=./suppressions.txt -I build/aoscorecommon/include src
50+
--suppressions-list=./suppressions.txt -I external/aos_core_common_cpp/include src
4451
4552
- name: Upload codecov report
4653
uses: codecov/codecov-action@v4

0 commit comments

Comments
 (0)