From 385fa4ce6d10b32b637433ac309276992f17586f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Mar 2025 11:48:46 +0100 Subject: [PATCH 1/4] [CI] Add Compat test on GPU runners --- .github/workflows/reusable_compatibility.yml | 112 +++++++++++++++++-- 1 file changed, 103 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable_compatibility.yml b/.github/workflows/reusable_compatibility.yml index 29597ac18f..a7b6311064 100644 --- a/.github/workflows/reusable_compatibility.yml +++ b/.github/workflows/reusable_compatibility.yml @@ -1,4 +1,4 @@ -# Workflow for checkig the backward compatibility of UMF. +# Workflow for checking the backward compatibility of UMF. # Test the latest UMF shared library with binaries compiled using the older UMF # shared library. name: Compatibility @@ -15,7 +15,7 @@ permissions: contents: read jobs: - ubuntu-build: + ubuntu: name: Ubuntu runs-on: 'ubuntu-22.04' @@ -64,7 +64,7 @@ jobs: working-directory: ${{github.workspace}}/tag_version run: | cmake --build ${{github.workspace}}/tag_version/build -j $(nproc) - + - name: Run "tag" UMF tests working-directory: ${{github.workspace}}/tag_version/build run: | @@ -75,13 +75,13 @@ jobs: with: fetch-depth: 0 path: ${{github.workspace}}/latest_version - + - name: Get latest UMF version working-directory: ${{github.workspace}}/latest_version run: | VERSION=$(git describe --tags) echo "checked version: $VERSION" - + - name: Configure latest UMF build working-directory: ${{github.workspace}}/latest_version run: > @@ -107,11 +107,11 @@ jobs: - name: Run "tag" UMF tests with latest UMF libs (warnings enabled) working-directory: ${{github.workspace}}/tag_version/build run: > - UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" - LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ + UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" + LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ ctest --output-on-failure - - windows-build: + + windows: name: Windows env: VCPKG_PATH: "${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows" @@ -207,3 +207,97 @@ jobs: $env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll ctest -C Debug --output-on-failure --test-dir test + + gpu: + name: GPU Ubuntu + strategy: + matrix: + provider: ['LEVEL_ZERO', 'CUDA'] + runs-on: ["DSS-${{matrix.provider}}", "DSS-UBUNTU"] + + steps: + - name: Checkout "tag" UMF version + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + ref: refs/tags/${{inputs.tag}} + path: ${{github.workspace}}/tag_version + + - name: Get "tag" UMF version + working-directory: ${{github.workspace}}/tag_version + run: | + VERSION=$(git describe --tags) + echo "tag version: $VERSION" + + - name: Configure "tag" UMF build + working-directory: ${{github.workspace}}/tag_version + run: > + cmake + -B ${{github.workspace}}/tag_version/build + -DCMAKE_BUILD_TYPE=Debug + -DUMF_BUILD_SHARED_LIBRARY=ON + -DCMAKE_C_COMPILER=gcc + -DCMAKE_CXX_COMPILER=g++ + -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_GPU_TESTS=ON + -DUMF_BUILD_EXAMPLES=ON + -DUMF_BUILD_GPU_EXAMPLES=ON + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_BUILD_CUDA_PROVIDER=OFF + -DUMF_BUILD_${{matrix.provider}}_PROVIDER=ON + -DUMF_FORMAT_CODE_STYLE=OFF + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + + - name: Build "tag" UMF + working-directory: ${{github.workspace}}/tag_version + run: | + cmake --build ${{github.workspace}}/tag_version/build -j $(nproc) + + - name: Run "tag" UMF tests + working-directory: ${{github.workspace}}/tag_version/build + run: | + LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure + + - name: Checkout latest UMF version + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + path: ${{github.workspace}}/latest_version + + - name: Get latest UMF version + working-directory: ${{github.workspace}}/latest_version + run: | + VERSION=$(git describe --tags) + echo "checked version: $VERSION" + + - name: Configure latest UMF build + working-directory: ${{github.workspace}}/latest_version + run: > + cmake + -B ${{github.workspace}}/latest_version/build + -DCMAKE_BUILD_TYPE=Debug + -DUMF_BUILD_SHARED_LIBRARY=ON + -DCMAKE_C_COMPILER=gcc + -DCMAKE_CXX_COMPILER=g++ + -DUMF_BUILD_TESTS=OFF + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON + -DUMF_BUILD_CUDA_PROVIDER=ON + -DUMF_FORMAT_CODE_STYLE=OFF + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + + - name: Build latest UMF + working-directory: ${{github.workspace}}/latest_version + run: | + cmake --build ${{github.workspace}}/latest_version/build -j $(nproc) + + # NOTE: Once not implemented features may now be implemented - exclude these tests + - name: Run "tag" UMF tests with latest UMF libs (warnings enabled) + working-directory: ${{github.workspace}}/tag_version/build + run: > + UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" + LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ + ctest --output-on-failure -E "not_impl" From 1ef1e48dec5bb9349f4045c62854e5378633e7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Mar 2025 11:50:01 +0100 Subject: [PATCH 2/4] [CI][Compat] Remove steps printing version For tag checkout it's no surprise; for main we print full version during 'Configure' step. --- .github/workflows/reusable_compatibility.yml | 38 +------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/.github/workflows/reusable_compatibility.yml b/.github/workflows/reusable_compatibility.yml index a7b6311064..a11c91128b 100644 --- a/.github/workflows/reusable_compatibility.yml +++ b/.github/workflows/reusable_compatibility.yml @@ -35,12 +35,6 @@ jobs: - name: Install libhwloc working-directory: ${{github.workspace}}/tag_version run: .github/scripts/install_hwloc.sh - - - name: Get "tag" UMF version - working-directory: ${{github.workspace}}/tag_version - run: | - VERSION=$(git describe --tags) - echo "tag version: $VERSION" - name: Configure "tag" UMF build working-directory: ${{github.workspace}}/tag_version @@ -76,12 +70,6 @@ jobs: fetch-depth: 0 path: ${{github.workspace}}/latest_version - - name: Get latest UMF version - working-directory: ${{github.workspace}}/latest_version - run: | - VERSION=$(git describe --tags) - echo "checked version: $VERSION" - - name: Configure latest UMF build working-directory: ${{github.workspace}}/latest_version run: > @@ -132,16 +120,11 @@ jobs: vcpkgDirectory: ${{github.workspace}}/vcpkg vcpkgJsonGlob: '**/vcpkg.json' + # NOTE we use vcpkg setup from "tag" version - name: Install dependencies working-directory: ${{github.workspace}}/tag_version run: vcpkg install shell: pwsh # Specifies PowerShell as the shell for running the script. - - - name: Get "tag" UMF version - working-directory: ${{github.workspace}}/tag_version - run: | - $version = (git describe --tags) - echo "tag version: $VERSION" - name: Configure "tag" UMF build working-directory: ${{github.workspace}}/tag_version @@ -174,13 +157,6 @@ jobs: fetch-depth: 0 path: ${{github.workspace}}/latest_version - # NOTE we use vcpkg setup from "tag" version - - name: Get latest UMF version - working-directory: ${{github.workspace}}/latest_version - run: | - $version = (git describe --tags) - echo "latest version: $VERSION" - - name: Configure latest UMF build working-directory: ${{github.workspace}}/latest_version run: > @@ -223,12 +199,6 @@ jobs: ref: refs/tags/${{inputs.tag}} path: ${{github.workspace}}/tag_version - - name: Get "tag" UMF version - working-directory: ${{github.workspace}}/tag_version - run: | - VERSION=$(git describe --tags) - echo "tag version: $VERSION" - - name: Configure "tag" UMF build working-directory: ${{github.workspace}}/tag_version run: > @@ -267,12 +237,6 @@ jobs: fetch-depth: 0 path: ${{github.workspace}}/latest_version - - name: Get latest UMF version - working-directory: ${{github.workspace}}/latest_version - run: | - VERSION=$(git describe --tags) - echo "checked version: $VERSION" - - name: Configure latest UMF build working-directory: ${{github.workspace}}/latest_version run: > From f67374899f8cd3cad070c28c844e99cdee85aae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Mar 2025 12:01:20 +0100 Subject: [PATCH 3/4] [CI][Compat] Run tests verbosely - warnings will be always visible --- .github/workflows/reusable_compatibility.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_compatibility.yml b/.github/workflows/reusable_compatibility.yml index a11c91128b..12444d6cfe 100644 --- a/.github/workflows/reusable_compatibility.yml +++ b/.github/workflows/reusable_compatibility.yml @@ -97,7 +97,7 @@ jobs: run: > UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ - ctest --output-on-failure + ctest --verbose windows: name: Windows @@ -182,7 +182,7 @@ jobs: run: | $env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll - ctest -C Debug --output-on-failure --test-dir test + ctest -C Debug --verbose --test-dir test gpu: name: GPU Ubuntu @@ -264,4 +264,4 @@ jobs: run: > UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ - ctest --output-on-failure -E "not_impl" + ctest --verbose -E "not_impl" From f2a7e21aa286d15a2a147cb95549c6f3abeb623c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Thu, 6 Mar 2025 12:16:46 +0100 Subject: [PATCH 4/4] [CI][Compat] Enable examples as well --- .github/workflows/reusable_compatibility.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_compatibility.yml b/.github/workflows/reusable_compatibility.yml index 12444d6cfe..b6007b0812 100644 --- a/.github/workflows/reusable_compatibility.yml +++ b/.github/workflows/reusable_compatibility.yml @@ -46,6 +46,7 @@ jobs: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_EXAMPLES=ON -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON -DUMF_BUILD_CUDA_PROVIDER=ON -DUMF_FORMAT_CODE_STYLE=OFF @@ -85,7 +86,6 @@ jobs: -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - name: Build latest UMF working-directory: ${{github.workspace}}/latest_version @@ -136,6 +136,7 @@ jobs: -DCMAKE_CXX_COMPILER=cl -DUMF_BUILD_SHARED_LIBRARY=ON -DUMF_BUILD_TESTS=ON + -DUMF_BUILD_EXAMPLES=ON -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON -DUMF_BUILD_CUDA_PROVIDER=ON -DUMF_FORMAT_CODE_STYLE=OFF @@ -172,7 +173,6 @@ jobs: -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - name: Build latest UMF run: cmake --build "${{github.workspace}}/latest_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS @@ -182,7 +182,7 @@ jobs: run: | $env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll - ctest -C Debug --verbose --test-dir test + ctest -C Debug --verbose gpu: name: GPU Ubuntu