Skip to content

[WIP] Docker in the nightly testing #1

[WIP] Docker in the nightly testing

[WIP] Docker in the nightly testing #1

Workflow file for this run

# Fast builds
name: FastBuild
on: workflow_call
permissions:
contents: read
env:
BUILD_DIR : "${{github.workspace}}/build"
INSTL_DIR : "${{github.workspace}}/../install-dir"
FastBuild:
name: Fast builds
container:
image: rbanka974/umf-ubuntu-20.04:latest
env:
VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows"
strategy:
matrix:
include:
- os: windows-latest
disjoint: 'OFF'
build_tests: 'ON'
simple_cmake: 'OFF'
# pure C build (Windows)
- os: windows-latest
disjoint: 'OFF'
# Tests' building is off for a pure C build
build_tests: 'OFF'
simple_cmake: 'OFF'
- os: ubuntu-latest
disjoint: 'ON'
build_tests: 'ON'
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON'
simple_cmake: 'OFF'
# pure C build (Linux)
- os: ubuntu-latest
disjoint: 'OFF'
# Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command
# Tests' building is off for a pure C build
build_tests: 'OFF'
extra_build_options: '-DCMAKE_BUILD_TYPE=Release -DUMF_BUILD_BENCHMARKS=ON'
simple_cmake: 'OFF'
# simplest CMake on ubuntu-latest
- os: ubuntu-latest
disjoint: 'OFF'
build_tests: 'ON'
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
simple_cmake: 'ON'
# simplest CMake ubuntu-20.04
- os: ubuntu-20.04
disjoint: 'OFF'
build_tests: 'ON'
extra_build_options: '-DCMAKE_BUILD_TYPE=Release'
simple_cmake: 'ON'
runs-on: ${{ (matrix.os == 'ubuntu-latest' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Initialize vcpkg
if: matrix.os == 'windows-latest'
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
with:
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'
- name: Install dependencies (windows-latest)
if: matrix.os == 'windows-latest'
run: vcpkg install
shell: pwsh # Specifies PowerShell as the shell for running the script.
- name: Install dependencies (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y cmake libhwloc-dev libnuma-dev libtbb-dev
- name: Install dependencies (ubuntu-20.04)
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y cmake libnuma-dev libtbb-dev
.github/scripts/install_hwloc.sh # install hwloc-2.3.0 instead of hwloc-2.1.0 present in the OS package
- name: Set ptrace value for IPC test (on Linux only)
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }}
run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope"
- name: Configure CMake
if: matrix.simple_cmake == 'OFF'
run: >
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=${{matrix.disjoint}}
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_BUILD_TESTS=${{matrix.build_tests}}
-DUMF_BUILD_EXAMPLES=ON
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
-DUMF_BUILD_CUDA_PROVIDER=ON
-DUMF_TESTS_FAIL_ON_SKIP=ON
-DUMF_BUILD_SHARED_LIBRARY=ON
${{matrix.extra_build_options}}
- name: Configure CMake (simple)
if: matrix.simple_cmake == 'ON'
run: >
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
-DUMF_BUILD_SHARED_LIBRARY=ON
-DUMF_TESTS_FAIL_ON_SKIP=ON
${{matrix.extra_build_options}}
- name: Build
run: cmake --build ${{env.BUILD_DIR}} --config Release -j
- name: Run examples
working-directory: ${{env.BUILD_DIR}}
run: ctest --output-on-failure --test-dir examples -C Release
- name: Run tests
if: matrix.build_tests == 'ON'
working-directory: ${{env.BUILD_DIR}}
run: ctest --output-on-failure --test-dir test -C Release
# TODO: We could add some script to verify metadata of dll's (selected fields, perhaps)
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
- name: Print metadata of our dll's
if: matrix.os == 'windows-latest'
run: |
get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list
get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list