Skip to content

test Unix Makefiles #1279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
126b98a
Update nightly.yml
opensource-krzysztof Apr 18, 2025
05c7c0d
Update nightly.yml
opensource-krzysztof Apr 18, 2025
da1540a
Update nightly.yml
opensource-krzysztof Apr 18, 2025
78a0fa0
Update pr_push.yml
opensource-krzysztof Apr 18, 2025
575969d
Update docs_pr_push.yml
opensource-krzysztof Apr 18, 2025
7e913f2
Update nightly.yml
opensource-krzysztof Apr 18, 2025
d6922b8
Update pr_push.yml
opensource-krzysztof Apr 18, 2025
b3e3a7e
Update docs_pr_push.yml
opensource-krzysztof Apr 18, 2025
9d9c1e7
Update pr_push.yml
opensource-krzysztof Apr 18, 2025
f9dadad
Update pr_push.yml
opensource-krzysztof Apr 18, 2025
df0629f
Update pr_push.yml
opensource-krzysztof Apr 18, 2025
b990529
Update docs_pr_push.yml
opensource-krzysztof Apr 22, 2025
c28fda9
Update nightly.yml
opensource-krzysztof Apr 22, 2025
4316fad
Update nightly.yml
opensource-krzysztof Apr 22, 2025
87ba26e
Update nightly.yml
opensource-krzysztof Apr 23, 2025
9bb64a0
Update nightly.yml
opensource-krzysztof Apr 23, 2025
90ff5a9
Update nightly.yml
opensource-krzysztof Apr 23, 2025
6d8e12a
Update nightly.yml
opensource-krzysztof Apr 23, 2025
4ad3ceb
Update nightly.yml
opensource-krzysztof Apr 23, 2025
855ce78
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
dd0230d
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
08492c3
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
eb06e3b
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
b801b56
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
fd7e80f
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
31dea5c
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
bc75e52
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
b15d928
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
f4fc264
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
6357038
Update pr_push.yml
opensource-krzysztof Apr 23, 2025
92a698a
Update nightly.yml
opensource-krzysztof Apr 24, 2025
468de3e
Update nightly.yml
opensource-krzysztof Apr 24, 2025
2611466
Update nightly.yml
opensource-krzysztof Apr 24, 2025
24ce01d
Update nightly.yml
opensource-krzysztof Apr 25, 2025
32d822b
Update nightly.yml
opensource-krzysztof Apr 28, 2025
ba35d75
Update nightly.yml
opensource-krzysztof Apr 28, 2025
1408bcd
Update nightly.yml
opensource-krzysztof Apr 29, 2025
b8d88ee
Merge branch 'main' into cmake-new
opensource-krzysztof Apr 29, 2025
7483fe3
Update nightly.yml
opensource-krzysztof Apr 29, 2025
08e08cf
Update nightly.yml
opensource-krzysztof Apr 29, 2025
ed91744
Update nightly.yml
opensource-krzysztof Apr 29, 2025
9089875
Update nightly.yml
opensource-krzysztof Apr 30, 2025
c9d52f5
Update nightly.yml
opensource-krzysztof Apr 30, 2025
9c8ac6a
Update nightly.yml
opensource-krzysztof Apr 30, 2025
b343977
Update nightly.yml
opensource-krzysztof Apr 30, 2025
861d2f8
Update nightly.yml
opensource-krzysztof Apr 30, 2025
0905e56
Update nightly.yml
opensource-krzysztof Apr 30, 2025
27f0786
Update nightly.yml
opensource-krzysztof Apr 30, 2025
75fd050
Update nightly.yml
opensource-krzysztof May 5, 2025
6f12a66
Update nightly.yml
opensource-krzysztof May 5, 2025
2845351
Update nightly.yml
opensource-krzysztof May 5, 2025
ee93df2
Update nightly.yml
opensource-krzysztof May 6, 2025
4007983
Update nightly.yml
opensource-krzysztof May 6, 2025
8684581
Update nightly.yml
opensource-krzysztof May 6, 2025
2a5b499
Update nightly.yml
opensource-krzysztof May 8, 2025
25330f4
Update nightly.yml
opensource-krzysztof May 12, 2025
f60d02b
Update nightly.yml
opensource-krzysztof May 13, 2025
7f05cdd
Update nightly.yml
opensource-krzysztof May 13, 2025
6faf149
Update nightly.yml
opensource-krzysztof May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/docs_pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to documentation or specific workflows are edited, ensuring that the job runs only for
# relevant changes.

name: Documentation PR/push
name: Documentation PR/push(testing)

on:
push:
Expand Down Expand Up @@ -33,4 +33,5 @@ permissions:

jobs:
DocsBuild:
if: false
uses: ./.github/workflows/reusable_docs_build.yml
303 changes: 25 additions & 278 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,210 +3,23 @@ name: Nightly

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

permissions:
contents: read
push:
branches-ignore:
- 'dependabot/**'
pull_request:

env:
BUILD_DIR : "${{github.workspace}}/build"
INSTALL_DIR: "${{github.workspace}}/build/install"

jobs:
fuzz-test:
name: Fuzz test
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
compiler: [{c: clang, cxx: clang++}]

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev

- name: Find Clang fuzzer lib
run: |
CLANG_LIBS_DIR=$(find /usr/lib -name "libclang_rt.fuzzer_no_main-x86_64.a" -exec dirname {} \; | head -n 1)
echo "CLANG_LIBS_DIR=${CLANG_LIBS_DIR}" >> $GITHUB_ENV

- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DCMAKE_PREFIX_PATH=${{env.CLANG_LIBS_DIR}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUMF_BUILD_SHARED_LIBRARY=ON
-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: Run regular tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"

- name: Run regular tests with proxy library
working-directory: ${{env.BUILD_DIR}}
run: LD_PRELOAD=./lib/libumf_proxy.so ctest -C ${{matrix.build_type}} --output-on-failure -E "fuzz|test_init_teardown"

- name: Fuzz long test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure --verbose -L "fuzz-long"

valgrind:
name: Valgrind
strategy:
fail-fast: false
matrix:
tool: ['memcheck', 'drd', 'helgrind']
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y cmake hwloc libhwloc-dev libnuma-dev libtbb-dev valgrind

- 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_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}}

Windows-generators:
name: Windows ${{matrix.generator}} generator
strategy:
matrix:
build_type: [Debug, Release]
compiler: [{c: cl, cxx: cl}]
shared_library: ['ON', 'OFF']
static_hwloc: ['ON', 'OFF']
generator: ['Ninja', 'NMake Makefiles']
umfd_lib: ['ON', 'OFF']

runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Set VCPKG_PATH with hwloc
if: matrix.static_hwloc == 'OFF'
run: echo "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" >> $env:GITHUB_ENV

- name: Set VCPKG_PATH without hwloc
if: matrix.static_hwloc == 'ON'
run: echo "VCPKG_PATH=${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" >> $env:GITHUB_ENV

- name: Initialize vcpkg
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
env:
VCPKG_PATH: ${{env.VCPKG_PATH}}
with:
vcpkgGitCommitId: ea2a964f9303270322cf3f2d51c265ba146c422d # 1.04.2025
vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg
vcpkgJsonGlob: '**/vcpkg.json'

- name: Install dependencies
run: vcpkg install --triplet x64-windows

- name: Install Ninja
if: matrix.generator == 'Ninja'
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6

- name: Configure MSVC environment
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Configure build
run: >
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-G "${{matrix.generator}}"
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
-DUMF_LINK_HWLOC_STATICALLY=${{matrix.static_hwloc}}
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
-DUMF_BUILD_CUDA_PROVIDER=ON
-DUMF_TESTS_FAIL_ON_SKIP=ON
${{ matrix.umfd_lib == 'ON' && '-DUMF_USE_DEBUG_POSTFIX=ON' || '' }}

- name: Build UMF
shell: cmd
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j %NUMBER_OF_PROCESSORS%

- name: Run tests
shell: cmd
working-directory: ${{env.BUILD_DIR}}
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

- name: Get UMF version
run: |
$version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value
echo "UMF_VERSION=$version" >> $env:GITHUB_ENV
shell: pwsh

- name: Test UMF installation and uninstallation
# The '--shared-library' parameter is added to the installation test when the UMF is built as a shared library
# The '--umfd-lib' parameter is added when the UMF is built with the umfd library
run: >
python3 ${{github.workspace}}/test/test_installation.py
--build-dir ${{env.BUILD_DIR}}
--install-dir ${{env.INSTALL_DIR}}
--build-type ${{matrix.build_type}}
--umf-version ${{env.UMF_VERSION}}
${{ matrix.shared_library == 'ON' && '--proxy --shared-library' || '' }}
${{ matrix.umfd_lib == 'ON' && '--umfd-lib' || ''}}
${{ matrix.static_hwloc == 'ON' && '--hwloc' || '' }}

icx:
name: ICX
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:
os: ['windows-2019', 'windows-2022']
os: ['windows-2022']
build_type: [Debug]
compiler: [{c: icx, cxx: icx}]
shared_library: ['ON', 'OFF']
Expand All @@ -233,6 +46,24 @@ jobs:

- name: Install dependencies
run: vcpkg install --triplet x64-windows
- name: Install llvm-mingw
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250430/llvm-mingw-20250430-ucrt-x86_64.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mingw is probably not needed

powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
del llvm-mingw*.zip
mv llvm-mingw* c:\llvm-mingw
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
# - name: Download win64devkit
# run: |
# Invoke-RestMethod "https://github.com/skeeto/w64devkit/archive/refs/tags/v2.2.0.zip" -OutFile 'w64devkit.zip'
# - name: install win64devkit
# run: |
# Expand-Archive ./w64devkit.zip -DestinationPath .

# - name: Add w64devkit to PATH
# run: |
# echo "$(Get-Location)\w64devkit\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8


- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
Expand All @@ -254,14 +85,15 @@ jobs:
- name: Configure build
shell: cmd
run: |
rmdir ${{env.BUILD_DIR}} /s /q
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
cmake ^
-B ${{env.BUILD_DIR}} ^
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" ^
-DCMAKE_C_COMPILER=${{matrix.compiler.c}} ^
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} ^
-G Ninja ^
-G "Unix Makefiles" ^
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} ^
-DUMF_FORMAT_CODE_STYLE=OFF ^
-DUMF_DEVELOPER_MODE=ON ^
Expand All @@ -285,88 +117,3 @@ jobs:
call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat"
ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

# Scenarios where UMF_LINK_HWLOC_STATICALLY is set to OFF and hwloc is not installed in the system
# The hwloc library is fetched implicitly
hwloc-fallback:
name: "Fallback to static hwloc build"
strategy:
matrix:
include:
- os: 'ubuntu-latest'
build_type: Release
number_of_processors: '$(nproc)'
- os: 'windows-latest'
build_type: Release
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'

runs-on: ${{matrix.os}}

steps:
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libnuma-dev

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Configure build
run: >
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DUMF_BUILD_SHARED_LIBRARY=ON
-DUMF_BUILD_EXAMPLES=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_LINK_HWLOC_STATICALLY=OFF
-DUMF_TESTS_FAIL_ON_SKIP=ON

- name: Build UMF
run: >
cmake
--build ${{env.BUILD_DIR}}
--config ${{matrix.build_type}}
-j ${{matrix.number_of_processors}}

- name: Run tests
working-directory: ${{env.BUILD_DIR}}
run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test

L0:
uses: ./.github/workflows/reusable_gpu.yml
with:
provider: "LEVEL_ZERO"
runner: "L0"
L0-BMG:
uses: ./.github/workflows/reusable_gpu.yml
with:
provider: "LEVEL_ZERO"
runner: "L0-BMG"
os: "['Ubuntu']"
CUDA:
uses: ./.github/workflows/reusable_gpu.yml
with:
provider: "CUDA"
runner: "CUDA"

# Full execution of QEMU tests
QEMU:
uses: ./.github/workflows/reusable_qemu.yml
with:
short_run: false
# Beside the 2 LTS Ubuntu, we also test this on the latest Ubuntu - to be updated
# every 6 months, so we verify the latest version of packages (compilers, etc.).
os: "['ubuntu-22.04', 'ubuntu-24.04', 'ubuntu-24.10']"

Benchmarks:
uses: ./.github/workflows/reusable_benchmarks.yml
permissions:
contents: write
pull-requests: write
with:
pr_no: '0'
bench_script_params: '--save Baseline_PVC'

SYCL:
uses: ./.github/workflows/reusable_sycl.yml
Loading
Loading