Skip to content

Commit 64f9913

Browse files
author
Samat Gaynutdinov
committed
try creating docker action
1 parent d8864b8 commit 64f9913

File tree

5 files changed

+26
-29
lines changed

5 files changed

+26
-29
lines changed

docker/Dockerfile_image_for_portability_test renamed to .github/actions/check-portability-docker-action/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ RUN cd /gtest && mkdir build && cd build && \
3535
$UTBOT_CMAKE_BINARY -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .. && \
3636
$UTBOT_CMAKE_BINARY --build . --target install && \
3737
cd /
38+
39+
# copy generated tests inside image
40+
COPY ../../../integration-tests/c-example/ /c-example/
41+
42+
# copy script inside image
43+
COPY check-portable-tests.sh /check-portable-tests.sh
44+
45+
# code to execute when container starts up
46+
ENTRYPOINT ["/check-portable-tests.sh"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: 'Check portability'
2+
description: 'Check portability of tests in fresh docker container'
3+
runs:
4+
using: 'docker'
5+
image: 'Dockerfile'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
#for fail-fast execution mode
4+
set -e
5+
6+
# check portability
7+
REMOVE_CMD=$("rm -r /c-example/build/utbot_build")
8+
RUN_TEST_CMD=$("env make -f /c-example/tests/lib/floats/floating_point_plain.mk run GTEST_FLAGS=\"--gtest_filter=*.plain_isnan_test_1\" CLANG=\"/usr/bin/clang-10\" CLANGXX=\"/usr/bin/clang++-10\" GTEST=\"/gtest\"")
9+
$REMOVE_CMD && $RUN_TEST_CMD

.github/workflows/build-utbot.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,12 @@ jobs:
143143
with:
144144
submodules: recursive
145145

146-
- uses: satackey/action-docker-layer-caching@v0.0.11
147-
continue-on-error: false
148-
149-
- name: Build Portable docker image
150-
run: |
151-
docker build --tag $DOCKER_IMAGE_TAG . --file docker/Dockerfile_image_for_portability_test
152-
153146
- name: Download generated test
154147
uses: actions/download-artifact@v3
155148
with:
156149
name: project
157150

151+
- run: chmod +x actions/check-portability-docker-action/check-portable-tests.sh
152+
158153
- name: Check test portability
159-
run: |
160-
chmod +x docker/action-scripts/check-portable-tests.sh
161-
./docker/action-scripts/check-portable-tests.sh
154+
uses: actions/check-portability-docker-action

docker/action-scripts/check-portable-tests.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)