Skip to content

Commit afd2c1e

Browse files
Conan2 migration (eclipse-velocitas#69)
* Adapt C++ SDK CI workflow to Conan2: Replace direct conan call by script * Change base-image to v0.4 * Update license checker version to 1.3 * Update readme
1 parent aefbf8f commit afd2c1e

File tree

10 files changed

+32
-21
lines changed

10 files changed

+32
-21
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run-integration-tests:
3232
name: Run Integration Test
3333
runs-on: ubuntu-22.04
34-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ matrix.language }}:v0.3
34+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ matrix.language }}:v0.4
3535
strategy:
3636
matrix:
3737
language: ["python", "cpp"]

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
# devenv-github-workflows
22

33
Repo for Github Workflow Configuration
4+
5+
> [!IMPORTANT]
6+
> We sucessfully migrated our C++ repositories to use version 2 of the [Conan package manager](https://conan.io/).
7+
> Unfortunately, those changes are not backwards compatible. So, please be aware that versions >= 7.0.0 of this repository
8+
> are compatible with recent versions of the [C++ SDK](https://github.com/eclipse-velocitas/vehicle-app-cpp-sdk) (>= v0.7.0)
9+
> and [C++ App Template](https://github.com/eclipse-velocitas/vehicle-app-cpp-template), only.
10+
>
11+
> This is not relevant for the Python related template and SDK repositories.

src/app/workflows/build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
build-image:
2929
name: "Building image (${{ inputs.app_name }})"
3030
runs-on: ubuntu-22.04
31-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.3
31+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.4
3232
outputs:
3333
archs: ${{ steps.set_args.outputs.archs_matrix }}
3434
env:

src/app/workflows/gen-desired-state.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
gen-desired-state:
2626
name: "Generate desired state for ${{ inputs.app_name }}"
2727
runs-on: ubuntu-22.04
28-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.3
28+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.4
2929

3030
steps:
3131
- name: Checkout repository

src/common/workflows/check-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: actions/checkout@v4
4242
with:
4343
repository: eclipse-velocitas/license-check
44-
ref: v1.2
44+
ref: v1.3
4545
path: .github/actions/license-check
4646

4747
- name: Run License Checker

src/common/workflows/ensure-lifecycle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
jobs:
2929
check-sync:
3030
runs-on: ubuntu-22.04
31-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.3
31+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/${{ language }}:v0.4
3232
name: Are files in sync?
3333

3434
steps:

src/cpp-app/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737
jobs:
3838
build-and-publish:
3939
runs-on: ubuntu-22.04
40-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.3
40+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.4
4141
name: "Build, Test and Lint"
4242
steps:
4343
- name: Checkout repository
@@ -61,7 +61,7 @@ jobs:
6161
run: ./install_dependencies.sh -r
6262

6363
- name: build
64-
run: ./build.sh -r
64+
run: ./build.sh -r --coverage
6565

6666
- name: Run Unit Tests
6767
shell: bash
@@ -70,12 +70,14 @@ jobs:
7070
build/bin/app_utests | tee test-results.md
7171
7272
- name: Generate coverage report
73-
run: cd build && gcovr -r ..
73+
# If 'build' folder is a symlink, assigning pwd to ROOT_DIR makes this independent
74+
# of the number of dirs covered by the symlink
75+
run: ROOT_DIR=$(pwd) && cd build && gcovr -r $ROOT_DIR
7476

7577
- name: Code Coverage Summary Report
7678
uses: irongut/CodeCoverageSummary@v1.3.0
7779
with:
78-
filename: build/coverage.cobertura.xml
80+
filename: build-linux-x86_64/Release/coverage.cobertura.xml
7981
badge: true
8082
format: markdown
8183
hide_complexity: true

src/cpp-sdk/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ on:
2828
branches:
2929
- main
3030
jobs:
31-
conan-package:
31+
cpp-package:
3232
runs-on: ubuntu-22.04
33-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.3
34-
name: Check Conan package
33+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.4
34+
name: Check C++ package
3535
strategy:
3636
matrix:
37-
host: ["linux_x86_64"]
37+
host: ["linux-x86_64"]
3838
fail-fast: false
3939

40-
4140
steps:
4241
- name: Checkout repository
4342
uses: actions/checkout@v4
@@ -51,14 +50,14 @@ jobs:
5150
sudo apt-get update && sudo apt-get install -y ninja-build clang-format-14 clang-tidy-14 cppcheck
5251
pip3 install -r requirements.txt
5352
54-
- name: Create conan package
53+
- name: Test creating the C++ package
5554
run: |
56-
conan create --build=missing -pr:b ./.conan/profiles/linux_x86_64_release -pr:h ./.conan/profiles/${{ matrix.host }}_release . ci/testing
55+
.scripts/test_package.sh ${{ matrix.host }}
5756
5857
build-and-publish:
5958
runs-on: ubuntu-22.04
6059
name: "Build, Test and Lint"
61-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.3
60+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/cpp:v0.4
6261

6362
steps:
6463
- name: Checkout repository
@@ -83,7 +82,9 @@ jobs:
8382
run: build/bin/sdk_utests
8483

8584
- name: Generate coverage report
86-
run: cd build && gcovr -r ..
85+
# If 'build' folder is a symlink, assigning pwd to ROOT_DIR makes this independent
86+
# of the number of dirs covered by the symlink
87+
run: ROOT_DIR=$(pwd) && cd build && gcovr -r $ROOT_DIR
8788

8889
- name: Code Coverage Summary Report
8990
uses: irongut/CodeCoverageSummary@v1.3.0

src/python-app/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
jobs:
3232
unit-tests:
3333
runs-on: ubuntu-22.04
34-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.3
34+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.4
3535
name: Run unit tests and linters
3636

3737
steps:
@@ -149,7 +149,7 @@ jobs:
149149
run-integration-tests:
150150
name: Run Integration Tests (${{ needs.get-app-name.outputs.app_name }})
151151
runs-on: ubuntu-22.04
152-
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.3
152+
container: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.4
153153
needs: [get-app-name, build-image-amd64]
154154
env:
155155
APP_NAME: ${{ needs.get-app-name.outputs.app_name }}

src/python-sdk/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030

3131
jobs:
3232
build-and-publish:
33-
runs-on: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.3
33+
runs-on: ghcr.io/eclipse-velocitas/devcontainer-base-images/python:v0.4
3434
name: Run Linters, Unit Tests and sdist
3535
strategy:
3636
max-parallel: 3

0 commit comments

Comments
 (0)