4848
4949 - name : Get Transport Version for Build-Arg
5050 id : transport_version
51- run : echo "version=$(cat ${{ github.workspace }}/src/cpp/ .transport.version)" >> $GITHUB_OUTPUT
51+ run : echo "version=$(cat ${{ github.workspace }}/.transport.version)" >> $GITHUB_OUTPUT
5252
5353 - name : Build and push Docker image
5454 uses : docker/build-push-action@v5
8484 run : |
8585 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
8686 bash -c " \
87- cd ./src/cpp \
88- && git ls-files -- '*.cpp' '*.h' | xargs clang-format --dry-run --Werror \
87+ set -e \
88+ && git ls-files -- '*.cpp' '*.h' | xargs clang-format --dry-run --Werror \
8989 "
9090
9191 build_project :
@@ -117,7 +117,7 @@ jobs:
117117 run : |
118118 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
119119 bash -c " \
120- cd src/cpp \
120+ set -e \
121121 && cmake -B build -S . \
122122 -DCMAKE_BUILD_TYPE=Debug \
123123 -DENABLE_TESTS=ON \
@@ -127,13 +127,16 @@ jobs:
127127 - name : Build Project
128128 run : |
129129 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
130- bash -c "cmake --build src/cpp/build --parallel"
130+ bash -c " \
131+ set -e \
132+ && cmake --build build --parallel \
133+ "
131134
132135 - name : Upload build directory
133136 uses : actions/upload-artifact@v4
134137 with :
135138 name : build-dir
136- path : ${{ github.workspace }}/src/cpp/ build
139+ path : ${{ github.workspace }}/build
137140
138141 unit_tests :
139142 permissions :
@@ -156,20 +159,23 @@ jobs:
156159 uses : actions/download-artifact@v4
157160 with :
158161 name : build-dir
159- path : ${{ github.workspace }}/src/cpp/ build
162+ path : ${{ github.workspace }}/build
160163
161164 - name : Run Unit Tests
162165 run : |
163- chmod +x ${{ github.workspace }}/src/cpp/ build/test/FireboltClientUnitTests
166+ chmod +x ${{ github.workspace }}/build/test/FireboltClientUnitTests
164167 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
165- bash -c "ctest --test-dir src/cpp/build/test"
168+ bash -c " \
169+ set -e \
170+ && ctest --test-dir build/test \
171+ "
166172
167173 - name : Generate Coverage Report
168174 run : |
169175 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
170176 bash -c " \
171177 set -e \
172- && cd src/cpp/ build \
178+ && cd build \
173179 && mkdir -p coverage \
174180 && gcovr -r .. \
175181 --exclude '.*/test/.*\.h' \
@@ -184,12 +190,12 @@ jobs:
184190 uses : actions/upload-artifact@v4
185191 with :
186192 name : coverage-report
187- path : ${{ github.workspace }}/src/cpp/ build/coverage/
193+ path : ${{ github.workspace }}/build/coverage/
188194
189195 - name : Code Coverage Summary Report
190196 uses : irongut/CodeCoverageSummary@v1.3.0
191197 with :
192- filename : src/cpp/ build/coverage.cobertura.xml
198+ filename : build/coverage.cobertura.xml
193199 badge : true
194200 hide_complexity : true
195201 format : markdown
@@ -221,7 +227,7 @@ jobs:
221227 uses : actions/download-artifact@v4
222228 with :
223229 name : build-dir
224- path : ${{ github.workspace }}/src/cpp/ build
230+ path : ${{ github.workspace }}/build
225231
226232 - name : Setup Mock-Firebolt
227233 id : setup-mock
@@ -235,11 +241,11 @@ jobs:
235241
236242 - name : Run Component Tests
237243 run : |
238- chmod +x ${{ github.workspace }}/src/cpp/ build/test/FireboltClientComponentTests
244+ chmod +x ${{ github.workspace }}/build/test/FireboltClientComponentTests
239245 docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace -v ${{ env.MOCK_PATH }}:/mock ${{ needs.build_docker.outputs.image_tag }} \
240246 ./.github/scripts/run-component-tests.sh \
241247 --mock /mock \
242248 --config /workspace/.github/mock-firebolt/config.json \
243- --openrpc /workspace/src/cpp/ firebolt-open-rpc.json \
249+ --openrpc /workspace/firebolt-open-rpc.json \
244250 --app-openrpc /workspace/.github/openrpc/firebolt-app-open-rpc.json \
245- --test-exe /workspace/src/cpp/ build/test/FireboltClientComponentTests
251+ --test-exe /workspace/build/test/FireboltClientComponentTests
0 commit comments