Skip to content

Commit

Permalink
Docker in the nightly testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rbanka1 committed Jan 13, 2025
1 parent 9d98b90 commit 143f4a2
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 53 deletions.
95 changes: 49 additions & 46 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name: Nightly

# This job is run at 00:00 UTC every day or on demand.
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
on: workflow_call
# workflow_dispatch:
# schedule:
# - cron: '0 0 * * *'

permissions:
contents: read
Expand All @@ -27,28 +27,29 @@ jobs:
with:
fetch-depth: 0

- name: Install apt packages
- name: Build Docker image
run: |
sudo apt-get update
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev
docker build -f .github/docker/ubuntu-20.04.Dockerfile -t umf-ubuntu-20.04 .
- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUMF_TESTS_FAIL_ON_SKIP=ON
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_FUZZTESTS=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --verbose -j$(nproc)

- name: Fuzz long test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"
- name: Fuzz long test in Docker container
run: |
docker run --rm \
-v ${{github.workspace}}:/workspace \
-w /workspace \
umf-ubuntu-20.04 \
bash -c "
sudo apt-get update &&
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev &&
cmake -B /workspace/build \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} \
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
-DUMF_TESTS_FAIL_ON_SKIP=ON \
-DUMF_DEVELOPER_MODE=ON \
-DUMF_BUILD_FUZZTESTS=ON &&
cmake --build /workspace/build --config ${matrix.build_type} --verbose -j$(nproc) &&
ctest -C ${matrix.build_type} --output-on-failure --verbose -L fuzz-long
"
valgrind:
name: Valgrind
Expand All @@ -64,30 +65,32 @@ jobs:
with:
fetch-depth: 0

- name: Install apt packages
- name: Build Docker image
run: |
sudo apt-get update
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind
docker build -f .github/docker/ubuntu-20.04.Dockerfile -t umf-ubuntu-20.04 .
- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Debug
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
-DUMF_BUILD_CUDA_PROVIDER=OFF
-DUMF_USE_VALGRIND=1
-DUMF_TESTS_FAIL_ON_SKIP=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug -j$(nproc)

- name: Run tests under valgrind
run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
- name: Run tests under valgrind in Docker
run: |
docker run --rm \
-v ${{github.workspace}}:/workspace \
-w /workspace \
umf-ubuntu-20.04 \
bash -c "\
sudo apt-get update &&
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind &&
cmake -B /workspace/build \
-DCMAKE_BUILD_TYPE=Debug \
-DUMF_FORMAT_CODE_STYLE=OFF \
-DUMF_DEVELOPER_MODE=ON \
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON \
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON \
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF \
-DUMF_BUILD_CUDA_PROVIDER=OFF \
-DUMF_USE_VALGRIND=1 \
-DUMF_TESTS_FAIL_ON_SKIP=ON &&
cmake --build /workspace/build --config Debug -j$(nproc) &&
/workspace/test/test_valgrind.sh /workspace /workspace/build ${matrix.tool}
"
# TODO fix #843
#icx:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
uses: ./.github/workflows/reusable_checks.yml
DocsBuild:
uses: ./.github/workflows/reusable_docs_build.yml
Nightly:
uses: ./.github/workflows/nightly.yml
FastBuild:
name: Fast builds
needs: [CodeChecks, DocsBuild]
Expand Down
14 changes: 7 additions & 7 deletions third_party/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ black==24.3.0
packaging==24.2
# Generating HTML documentation
pygments==2.18.0
sphinxcontrib_applehelp==2.0.0
sphinxcontrib_devhelp==2.0.0
sphinxcontrib_htmlhelp==2.1.0
sphinxcontrib_serializinghtml==2.0.0
sphinxcontrib_qthelp==2.0.0
sphinxcontrib_applehelp==1.0.0
sphinxcontrib_devhelp==1.0.0
sphinxcontrib_htmlhelp==2.0.1
sphinxcontrib_serializinghtml==1.1.5
sphinxcontrib_qthelp==1.0.3
breathe==4.35.0
sphinx==8.1.3
sphinx_book_theme==1.1.3
sphinx==7.1.2
sphinx_book_theme==1.0.1

0 comments on commit 143f4a2

Please sign in to comment.