Skip to content

Commit ff8c41b

Browse files
committed
ci: Update to changes in repository layout
1 parent 0f18d3c commit ff8c41b

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
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: 13 additions & 15 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,7 +84,6 @@ 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 \
8887
&& git ls-files -- '*.cpp' '*.h' | xargs clang-format --dry-run --Werror \
8988
"
9089
@@ -117,7 +116,6 @@ jobs:
117116
run: |
118117
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
119118
bash -c " \
120-
cd src/cpp \
121119
&& cmake -B build -S . \
122120
-DCMAKE_BUILD_TYPE=Debug \
123121
-DENABLE_TESTS=ON \
@@ -127,13 +125,13 @@ jobs:
127125
- name: Build Project
128126
run: |
129127
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"
128+
bash -c "cmake --build build --parallel"
131129
132130
- name: Upload build directory
133131
uses: actions/upload-artifact@v4
134132
with:
135133
name: build-dir
136-
path: ${{ github.workspace }}/src/cpp/build
134+
path: ${{ github.workspace }}/build
137135

138136
unit_tests:
139137
permissions:
@@ -156,20 +154,20 @@ jobs:
156154
uses: actions/download-artifact@v4
157155
with:
158156
name: build-dir
159-
path: ${{ github.workspace }}/src/cpp/build
157+
path: ${{ github.workspace }}/build
160158

161159
- name: Run Unit Tests
162160
run: |
163-
chmod +x ${{ github.workspace }}/src/cpp/build/test/FireboltClientUnitTests
161+
chmod +x ${{ github.workspace }}/build/test/FireboltClientUnitTests
164162
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"
163+
bash -c "ctest --test-dir build/test"
166164
167165
- name: Generate Coverage Report
168166
run: |
169167
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace ${{ needs.build_docker.outputs.image_tag }} \
170168
bash -c " \
171169
set -e \
172-
&& cd src/cpp/build \
170+
&& cd build \
173171
&& mkdir -p coverage \
174172
&& gcovr -r .. \
175173
--exclude '.*/test/.*\.h' \
@@ -184,12 +182,12 @@ jobs:
184182
uses: actions/upload-artifact@v4
185183
with:
186184
name: coverage-report
187-
path: ${{ github.workspace }}/src/cpp/build/coverage/
185+
path: ${{ github.workspace }}/build/coverage/
188186

189187
- name: Code Coverage Summary Report
190188
uses: irongut/CodeCoverageSummary@v1.3.0
191189
with:
192-
filename: src/cpp/build/coverage.cobertura.xml
190+
filename: build/coverage.cobertura.xml
193191
badge: true
194192
hide_complexity: true
195193
format: markdown
@@ -221,7 +219,7 @@ jobs:
221219
uses: actions/download-artifact@v4
222220
with:
223221
name: build-dir
224-
path: ${{ github.workspace }}/src/cpp/build
222+
path: ${{ github.workspace }}/build
225223

226224
- name: Setup Mock-Firebolt
227225
id: setup-mock
@@ -235,11 +233,11 @@ jobs:
235233

236234
- name: Run Component Tests
237235
run: |
238-
chmod +x ${{ github.workspace }}/src/cpp/build/test/FireboltClientComponentTests
236+
chmod +x ${{ github.workspace }}/build/test/FireboltClientComponentTests
239237
docker run --rm --user "$(id -u):$(id -g)" -v ${{ github.workspace }}:/workspace -v ${{ env.MOCK_PATH }}:/mock ${{ needs.build_docker.outputs.image_tag }} \
240238
./.github/scripts/run-component-tests.sh \
241239
--mock /mock \
242240
--config /workspace/.github/mock-firebolt/config.json \
243-
--openrpc /workspace/src/cpp/firebolt-open-rpc.json \
241+
--openrpc /workspace/firebolt-open-rpc.json \
244242
--app-openrpc /workspace/.github/openrpc/firebolt-app-open-rpc.json \
245-
--test-exe /workspace/src/cpp/build/test/FireboltClientComponentTests
243+
--test-exe /workspace/build/test/FireboltClientComponentTests

0 commit comments

Comments
 (0)