Skip to content

Commit 0f49275

Browse files
committed
Docker in the nightly testing
1 parent 9d98b90 commit 0f49275

File tree

3 files changed

+52
-47
lines changed

3 files changed

+52
-47
lines changed

.github/workflows/nightly.yml

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
name: Nightly
33

44
# This job is run at 00:00 UTC every day or on demand.
5-
on:
6-
workflow_dispatch:
7-
schedule:
8-
- cron: '0 0 * * *'
5+
on: workflow_call
6+
# workflow_dispatch:
7+
# schedule:
8+
# - cron: '0 0 * * *'
99

1010
permissions:
1111
contents: read
@@ -27,28 +27,29 @@ jobs:
2727
with:
2828
fetch-depth: 0
2929

30-
- name: Install apt packages
30+
- name: Build Docker image
3131
run: |
32-
sudo apt-get update
33-
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev
32+
docker build -f .github/docker/ubuntu-20.04.Dockerfile -t umf-ubuntu-20.04 .
3433
35-
- name: Configure CMake
36-
run: >
37-
cmake
38-
-B ${{github.workspace}}/build
39-
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
40-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
41-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
42-
-DUMF_TESTS_FAIL_ON_SKIP=ON
43-
-DUMF_DEVELOPER_MODE=ON
44-
-DUMF_BUILD_FUZZTESTS=ON
45-
46-
- name: Build
47-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --verbose -j$(nproc)
48-
49-
- name: Fuzz long test
50-
working-directory: ${{github.workspace}}/build
51-
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"
34+
- name: Fuzz long test in Docker container
35+
run: |
36+
docker run --rm \
37+
-v ${{github.workspace}}:/workspace \
38+
-w /workspace \
39+
umf-ubuntu-20.04 \
40+
bash -c "
41+
sudo apt-get update &&
42+
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev &&
43+
cmake -B /workspace/build \
44+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
45+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} \
46+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
47+
-DUMF_TESTS_FAIL_ON_SKIP=ON \
48+
-DUMF_DEVELOPER_MODE=ON \
49+
-DUMF_BUILD_FUZZTESTS=ON &&
50+
cmake --build /workspace/build --config ${matrix.build_type} --verbose -j$(nproc) &&
51+
ctest -C ${matrix.build_type} --output-on-failure --verbose -L fuzz-long
52+
"
5253
5354
valgrind:
5455
name: Valgrind
@@ -64,30 +65,32 @@ jobs:
6465
with:
6566
fetch-depth: 0
6667

67-
- name: Install apt packages
68+
- name: Build Docker image
6869
run: |
69-
sudo apt-get update
70-
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind
70+
docker build -f .github/docker/ubuntu-20.04.Dockerfile -t umf-ubuntu-20.04 .
7171
72-
- name: Configure CMake
73-
run: >
74-
cmake
75-
-B ${{github.workspace}}/build
76-
-DCMAKE_BUILD_TYPE=Debug
77-
-DUMF_FORMAT_CODE_STYLE=OFF
78-
-DUMF_DEVELOPER_MODE=ON
79-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
80-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
81-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
82-
-DUMF_BUILD_CUDA_PROVIDER=OFF
83-
-DUMF_USE_VALGRIND=1
84-
-DUMF_TESTS_FAIL_ON_SKIP=ON
85-
86-
- name: Build
87-
run: cmake --build ${{github.workspace}}/build --config Debug -j$(nproc)
88-
89-
- name: Run tests under valgrind
90-
run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
72+
- name: Run tests under valgrind in Docker
73+
run: |
74+
docker run --rm \
75+
-v ${{github.workspace}}:/workspace \
76+
-w /workspace \
77+
umf-ubuntu-20.04 \
78+
bash -c "\
79+
sudo apt-get update &&
80+
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind &&
81+
cmake -B /workspace/build \
82+
-DCMAKE_BUILD_TYPE=Debug \
83+
-DUMF_FORMAT_CODE_STYLE=OFF \
84+
-DUMF_DEVELOPER_MODE=ON \
85+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON \
86+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON \
87+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF \
88+
-DUMF_BUILD_CUDA_PROVIDER=OFF \
89+
-DUMF_USE_VALGRIND=1 \
90+
-DUMF_TESTS_FAIL_ON_SKIP=ON &&
91+
cmake --build /workspace/build --config Debug -j$(nproc) &&
92+
/workspace/test/test_valgrind.sh /workspace /workspace/build ${matrix.tool}
93+
"
9194
9295
# TODO fix #843
9396
#icx:

.github/workflows/pr_push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
uses: ./.github/workflows/reusable_checks.yml
2121
DocsBuild:
2222
uses: ./.github/workflows/reusable_docs_build.yml
23+
Nightly:
24+
uses: ./.github/workflows/nightly.yml
2325
FastBuild:
2426
name: Fast builds
2527
needs: [CodeChecks, DocsBuild]

third_party/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ sphinxcontrib_serializinghtml==2.0.0
1414
sphinxcontrib_qthelp==2.0.0
1515
breathe==4.35.0
1616
sphinx==8.1.3
17-
sphinx_book_theme==1.1.3
17+
sphinx_book_theme==1.1.3

0 commit comments

Comments
 (0)