Skip to content

Commit 2f3000a

Browse files
committed
ci: Update to changes in repository layout
1 parent 5f13414 commit 2f3000a

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

.github/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN mkdir -p /deps
2727
ARG DEPS_GOOGLETEST_V="1.15.2"
2828
RUN cd /deps \
2929
&& dir="googletest-${DEPS_GOOGLETEST_V}" \
30-
&& curl -sL https://github.com/google/googletest/releases/download/v${DEPS_GOOGLETEST_V}/$dir.tar.gz | tar xzf - \
30+
&& i=0 && while ! curl -sL https://github.com/google/googletest/releases/download/v${DEPS_GOOGLETEST_V}/$dir.tar.gz | tar xzf -; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
3131
&& cmake -B "build/$dir" \
3232
-DCMAKE_BUILD_TYPE=Release \
3333
-DBUILD_SHARED_LIBS=ON \
@@ -50,7 +50,7 @@ RUN cd /deps \
5050
ARG DEPS_JSON_SCHEMA_VALIDATOR_V="2.3.0"
5151
RUN cd /deps \
5252
&& dir="json-schema-validator-${DEPS_JSON_SCHEMA_VALIDATOR_V}" \
53-
&& curl -sL https://github.com/pboettch/json-schema-validator/archive/refs/tags/${DEPS_JSON_SCHEMA_VALIDATOR_V}.tar.gz | tar xzf - \
53+
&& i=0 && while ! curl -sL https://github.com/pboettch/json-schema-validator/archive/refs/tags/${DEPS_JSON_SCHEMA_VALIDATOR_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
5454
&& cmake -B "build/$dir" \
5555
-DCMAKE_BUILD_TYPE=Release \
5656
-DBUILD_SHARED_LIBS=ON \
@@ -63,7 +63,7 @@ RUN cd /deps \
6363
ARG DEPS_WEBSOCKETPP_V="0.8.2"
6464
RUN cd /deps \
6565
&& dir="websocketpp-${DEPS_WEBSOCKETPP_V}" \
66-
&& curl -sL https://github.com/zaphoyd/websocketpp/archive/refs/tags/${DEPS_WEBSOCKETPP_V}.tar.gz | tar xzf - \
66+
&& i=0 && while ! curl -sL https://github.com/zaphoyd/websocketpp/archive/refs/tags/${DEPS_WEBSOCKETPP_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
6767
&& cmake -B "build/$dir" \
6868
-DCMAKE_BUILD_TYPE=Release \
6969
-DBUILD_SHARED_LIBS=ON \
@@ -83,7 +83,7 @@ RUN pip install --break-system-packages gcovr
8383
ARG DEPS_TRANSPORT_V
8484
RUN cd /deps \
8585
&& dir="firebolt-native-transport-${DEPS_TRANSPORT_V}" \
86-
&& curl -sL https://github.com/rdkcentral/firebolt-native-transport/releases/download/v${DEPS_TRANSPORT_V}/firebolt-native-transport-${DEPS_TRANSPORT_V}.tar.gz | tar xzf - \
86+
&& i=0 && while ! curl -sL https://github.com/rdkcentral/firebolt-native-transport/releases/download/v${DEPS_TRANSPORT_V}/firebolt-native-transport-${DEPS_TRANSPORT_V}.tar.gz | tar xzf - ; do test "$i" -eq 5 && exit 1; i=$((i+1)); sleep 1; done \
8787
&& cmake -B "build/$dir" \
8888
-DCMAKE_BUILD_TYPE=Release \
8989
-DBUILD_SHARED_LIBS=ON \

.github/workflows/ci.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
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
@@ -84,8 +84,8 @@ jobs:
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

Comments
 (0)