diff --git a/.github/workflows/.spellcheck-conf.toml b/.github/workflows/.spellcheck-conf.toml deleted file mode 100644 index 24b9023fe3..0000000000 --- a/.github/workflows/.spellcheck-conf.toml +++ /dev/null @@ -1,7 +0,0 @@ -[default] -# Don't correct the following words: -extend-ignore-words-re = ["ASSER", "Tne", "ba", "BA"] - -[files] -# completely exclude those files from consideration: -extend-exclude = ["test/supp/*.supp"] diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml deleted file mode 100644 index acb64034b9..0000000000 --- a/.github/workflows/bandit.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Bandit static analysis (for Python code) -name: Bandit -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - bandit: - name: Bandit - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - 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: Install Bandit - run: python3 -m pip install bandit - - # Run Bandit recursively, but omit _deps directory (with 3rd party code) - - name: Run Bandit - run: python3 -m bandit -r . -x '/_deps/' diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml deleted file mode 100644 index a2e41aa5ef..0000000000 --- a/.github/workflows/basic.yml +++ /dev/null @@ -1,476 +0,0 @@ -# Builds project (with various compilers, CMake options, etc.) and runs tests -name: BasicBuilds - -on: workflow_call - -permissions: - contents: read - -env: - # for installation testing - it should match with version set in CMake - UMF_VERSION: 0.10.0 - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - ubuntu-build: - name: Ubuntu - strategy: - matrix: - os: ['ubuntu-20.04', 'ubuntu-22.04'] - build_type: [Debug, Release] - compiler: [{c: gcc, cxx: g++}] - shared_library: ['OFF'] - level_zero_provider: ['ON'] - cuda_provider: ['ON'] - install_tbb: ['ON'] - disable_hwloc: ['OFF'] - link_hwloc_statically: ['OFF'] - include: - - os: 'ubuntu-20.04' - build_type: Release - compiler: {c: gcc-7, cxx: g++-7} - shared_library: 'OFF' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: clang, cxx: clang++} - shared_library: 'OFF' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: gcc, cxx: g++} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - - os: 'ubuntu-24.04' - build_type: Debug - compiler: {c: gcc, cxx: g++} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - # test level_zero_provider='OFF' and cuda_provider='OFF' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: gcc, cxx: g++} - shared_library: 'OFF' - level_zero_provider: 'OFF' - cuda_provider: 'OFF' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - # test icx compiler - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: icx, cxx: icpx} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - # test without installing TBB - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: gcc, cxx: g++} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'OFF' - disable_hwloc: 'OFF' - link_hwloc_statically: 'OFF' - - os: 'ubuntu-22.04' - build_type: Debug - compiler: {c: gcc, cxx: g++} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'ON' - link_hwloc_statically: 'OFF' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: gcc, cxx: g++} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - install_tbb: 'ON' - disable_hwloc: 'OFF' - link_hwloc_statically: 'ON' - runs-on: ${{matrix.os}} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev - - - name: Install TBB apt package - if: matrix.install_tbb == 'ON' - run: | - sudo apt-get install -y libtbb-dev - - - name: Install oneAPI basekit - if: matrix.compiler.cxx == 'icpx' - run: | - sudo apt-get install -y gpg-agent wget - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install -y intel-oneapi-ippcp-devel intel-oneapi-ipp-devel intel-oneapi-common-oneapi-vars intel-oneapi-compiler-dpcpp-cpp - - - name: Install g++-7 - if: matrix.compiler.cxx == 'g++-7' - run: sudo apt-get install -y ${{matrix.compiler.cxx}} - - - name: Install libhwloc - run: .github/scripts/install_hwloc.sh - - - name: Set ptrace value for IPC test - run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" - - - name: Configure build - run: > - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.level_zero_provider}} - -DUMF_BUILD_CUDA_PROVIDER=${{matrix.cuda_provider}} - -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 - -DUMF_DISABLE_HWLOC=${{matrix.disable_hwloc}} - -DUMF_LINK_HWLOC_STATICALLY=${{matrix.link_hwloc_statically}} - - - name: Build UMF - run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} - cmake --build ${{env.BUILD_DIR}} -j $(nproc) - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} - ctest --output-on-failure --test-dir test - - - name: Remove the installation directory - run: rm -rf ${{env.INSTL_DIR}} - - - 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 - run: > - python3 ${{github.workspace}}/test/test_installation.py - --build-dir ${{env.BUILD_DIR}} - --install-dir ${{env.INSTL_DIR}} - --build-type ${{matrix.build_type}} - --disjoint-pool - --jemalloc-pool - ${{ matrix.install_tbb == 'ON' && matrix.disable_hwloc != 'ON' && matrix.link_hwloc_statically != 'ON' && '--proxy' || '' }} - --umf-version ${{env.UMF_VERSION}} - ${{ matrix.shared_library == 'ON' && '--shared-library' || '' }} - - windows-build: - name: Windows - 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'] - build_type: [Debug, Release] - compiler: [{c: cl, cxx: cl}] - shared_library: ['ON', 'OFF'] - level_zero_provider: ['ON'] - cuda_provider: ['ON'] - include: - - os: 'windows-2022' - build_type: Release - compiler: {c: clang-cl, cxx: clang-cl} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - toolset: "-T ClangCL" - - os: 'windows-2022' - build_type: Release - compiler: {c: cl, cxx: cl} - shared_library: 'ON' - level_zero_provider: 'ON' - cuda_provider: 'ON' - - os: 'windows-2022' - build_type: Release - compiler: {c: cl, cxx: cl} - shared_library: 'ON' - level_zero_provider: 'OFF' - cuda_provider: 'OFF' - - runs-on: ${{matrix.os}} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Initialize vcpkg - uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 - with: - vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 - vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg - vcpkgJsonGlob: '**/vcpkg.json' - - - name: Install dependencies - run: vcpkg install - shell: pwsh # Specifies PowerShell as the shell for running the script. - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - ${{matrix.toolset}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -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=${{matrix.level_zero_provider}} - -DUMF_BUILD_CUDA_PROVIDER=${{matrix.cuda_provider}} - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test - - - 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 - run: > - python3 ${{github.workspace}}/test/test_installation.py - --build-dir ${{env.BUILD_DIR}} - --install-dir ${{env.INSTL_DIR}} - --build-type ${{matrix.build_type}} - --disjoint-pool - --jemalloc-pool - --proxy - --umf-version ${{env.UMF_VERSION}} - ${{ matrix.shared_library == 'ON' && '--shared-library' || ''}} - - - name: check /DEPENDENTLOADFLAG in umf.dll - if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}} - run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll - shell: pwsh - - - name: check /DEPENDENTLOADFLAG in umf_proxy.dll - if: ${{matrix.compiler.cxx == 'cl'}} - run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/src/proxy_lib/${{matrix.build_type}}/umf_proxy.dll - shell: pwsh - - windows-dynamic_build_hwloc: - name: "Windows dynamic UMF + static hwloc" - strategy: - matrix: - build_type: [Release] - - runs-on: 'windows-2022' - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DUMF_BUILD_SHARED_LIBRARY=ON - -DUMF_BUILD_EXAMPLES=OFF - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON - -DUMF_BUILD_CUDA_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - -DUMF_LINK_HWLOC_STATICALLY=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test - - # we check umf.dll only here - note that the proxy library is disabled in - # this configuration - - name: check /DEPENDENTLOADFLAG in umf.dll - run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll - shell: pwsh - - windows-static_build_hwloc: - name: "Windows static UMF + static hwloc" - strategy: - matrix: - build_type: [Release] - - runs-on: 'windows-2022' - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DUMF_BUILD_SHARED_LIBRARY=OFF - -DUMF_BUILD_EXAMPLES=OFF - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON - -DUMF_BUILD_CUDA_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - -DUMF_LINK_HWLOC_STATICALLY=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS -v - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test - - windows-dynamic_mingw_hwloc: - env: - HWLOC_PACKAGE_NAME: hwloc-win64-build-2.10.0 - TBB_PACKAGE_NAME: oneapi-tbb-2021.12.0 - TBB_LIB_DIR: lib\intel64\vc14 - TBB_BIN_DIR: redist\intel64\vc14 - - name: "Windows dynamic UMF + mingw libhwloc" - strategy: - matrix: - build_type: [Release] - - runs-on: 'windows-2022' - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Get hwloc from official repo (mingw version) - run: | - Invoke-WebRequest -Uri https://download.open-mpi.org/release/hwloc/v2.10/${{env.HWLOC_PACKAGE_NAME}}.zip -OutFile ${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}}.zip -TimeoutSec 360 - Expand-Archive ${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}}.zip -DestinationPath ${{github.workspace}} - - - name: Get TBB from github - run: | - Invoke-WebRequest -Uri https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/${{env.TBB_PACKAGE_NAME}}-win.zip -OutFile "${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}-win.zip" -TimeoutSec 360 - Expand-Archive "${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}-win.zip" -DestinationPath ${{github.workspace}} - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_PREFIX_PATH="${{github.workspace}}\${{env.HWLOC_PACKAGE_NAME}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}\${{env.TBB_LIB_DIR}};${{github.workspace}}\${{env.TBB_PACKAGE_NAME}}\${{env.TBB_BIN_DIR}}" - -DUMF_BUILD_SHARED_LIBRARY=ON - -DUMF_BUILD_EXAMPLES=ON - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - -DUMF_HWLOC_NAME=libhwloc - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{matrix.build_type}} --output-on-failure --test-dir test - - macos-build: - name: MacOS - strategy: - matrix: - os: ['macos-12', 'macos-13'] - env: - BUILD_TYPE : "Release" - runs-on: ${{matrix.os}} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install Python requirements - run: python3 -m pip install -r third_party/requirements.txt - - - name: Install hwloc - run: brew install hwloc jemalloc tbb - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_SHARED_LIBRARY=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu) - - - name: Test UMF installation and uninstallation - run: > - python3 ${{github.workspace}}/test/test_installation.py - --build-dir ${{env.BUILD_DIR}} - --install-dir ${{env.INSTL_DIR}} - --build-type ${{env.BUILD_TYPE}} - --disjoint-pool - --jemalloc-pool - --proxy - --umf-version ${{env.UMF_VERSION}} - --shared-library diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml deleted file mode 100644 index 41710029c8..0000000000 --- a/.github/workflows/benchmarks.yml +++ /dev/null @@ -1,80 +0,0 @@ -# Executes benchmarks implemented in this repository -name: Benchmarks - -on: workflow_call - -permissions: - contents: read - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - benchmarks: - name: Benchmarks - 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: ['ubuntu-latest', 'windows-latest'] - include: - # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command to determine the build type - - os: ubuntu-latest - extra_build_option: '-DCMAKE_BUILD_TYPE=Release' - runs-on: ${{matrix.os}} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev - - - 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 vcpkg packages - if: matrix.os == 'windows-latest' - run: vcpkg install - shell: pwsh # Specifies PowerShell as the shell for running the script. - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - ${{matrix.extra_build_option}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DUMF_BUILD_SHARED_LIBRARY=ON - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_BENCHMARKS_MT=ON - -DUMF_BUILD_TESTS=OFF - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON - -DUMF_BUILD_CUDA_PROVIDER=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - - - name: Build UMF on Linux - if: matrix.os == 'ubuntu-latest' - run: cmake --build ${{env.BUILD_DIR}} -j $(nproc) - - - name: Build UMF on Windows - if: matrix.os == 'windows-latest' - run: cmake --build ${{env.BUILD_DIR}} --config Release -j $Env:NUMBER_OF_PROCESSORS - - - name: Run benchmarks - working-directory: ${{env.BUILD_DIR}} - run: ctest -V --test-dir benchmark -C Release diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index a444234205..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,94 +0,0 @@ -# CodeQL static analysis -name: CodeQL - -# Due to lower score on Scorecard we're running this separately from -# "PR/push" workflow. For some reason permissions weren't properly set -# or recognized (by Scorecard). If Scorecard changes its behavior we can -# go back to use 'workflow_call' trigger. -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - analyze: - name: Analyze - permissions: - security-events: write - 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: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest] - include: - - os: ubuntu-latest - # Windows doesn't recognize 'CMAKE_BUILD_TYPE', it uses '--config' param in build command - extra_build_option: '-DCMAKE_BUILD_TYPE=Release' - - os: windows-latest - runs-on: ${{matrix.os}} - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Initialize CodeQL - uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2 - with: - languages: cpp - - - 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 - if: ${{ matrix.os == 'windows-latest' }} - run: vcpkg install - shell: pwsh # Specifies PowerShell as the shell for running the script. - - - name: Install apt packages - if: matrix.os == 'ubuntu-latest' - run: | - sudo apt-get update - sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev - - - name: Install pip packages - run: python3 -m pip install -r third_party/requirements.txt - - - name: Configure CMake - run: > - cmake - -B ${{env.BUILD_DIR}} - ${{matrix.extra_build_option}} - -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_JEMALLOC=ON - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON - -DUMF_BUILD_CUDA_PROVIDER=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build - run: cmake --build ${{env.BUILD_DIR}} --config Release -j - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml deleted file mode 100644 index dfa03fc4f4..0000000000 --- a/.github/workflows/coverity.yml +++ /dev/null @@ -1,77 +0,0 @@ -# Coverity check -name: Coverity - -on: - workflow_dispatch: - inputs: - cov_push_tarball: - description: 'Send Coverity tarball' - required: true - default: 'true' - type: boolean - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read - -jobs: - coverity: - name: Coverity - # run only on upstream; forks do not know Username/Password - if: github.repository == 'oneapi-src/unified-memory-framework' - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - ref: ${{ github.ref }} - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y cmake hwloc libhwloc-dev libjemalloc-dev libnuma-dev libtbb-dev - - - name: Download Coverity - run: | - wget -nv https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=oneapi-src%2Funified-memory-framework" -O coverity_tool.tgz - - - name: Extract Coverity - run: | - tar xzf coverity_tool.tgz - - - name: Configure CMake - run: > - cmake - -B ${{github.workspace}}/build - -DCMAKE_BUILD_TYPE=Release - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=OFF - -DUMF_TESTS_FAIL_ON_SKIP=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - - - name: Build - run: | - export COVERITY_DIR=$(find . -maxdepth 1 -type d -name "cov-analysis-linux64-*" | head -n 1) - if [ -n "$COVERITY_DIR" ]; then - export PATH="$PATH:$COVERITY_DIR/bin" - fi - cov-build --dir ${{github.workspace}}/cov-int cmake --build ${{github.workspace}}/build --config Release -j$(nproc) - - - name: Create tarball to analyze - run: > - tar czvf cov-int_umf.tgz cov-int - - - name: Push to Coverity Scan - if: ${{ github.event_name == 'schedule' || github.event.inputs.cov_push_tarball == 'true' }} - run: | - BRANCH_NAME=$(echo ${GITHUB_REF_NAME}) - COMMIT_ID=$(echo $GITHUB_SHA) - curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ - --form email=sys_bb-umf@intel.com \ - --form file=@cov-int_umf.tgz \ - --form version="$COMMIT_ID" \ - --form description="$BRANCH_NAME:$COMMIT_ID" \ - https://scan.coverity.com/builds\?project\=oneapi-src%2Funified-memory-framework diff --git a/.github/workflows/devdax.yml b/.github/workflows/devdax.yml deleted file mode 100644 index 3f2b3afc93..0000000000 --- a/.github/workflows/devdax.yml +++ /dev/null @@ -1,66 +0,0 @@ -# This workflow builds and tests the devdax memory provider. -# It requires a DAX device (e.g. /dev/dax0.0) configured in the OS. -# This DAX device should be specified using UMF_TESTS_DEVDAX_PATH and UMF_TESTS_DEVDAX_SIZE -# CI environment variables. - -name: DevDax - -on: [workflow_call] - -permissions: - contents: read - -env: - UMF_TESTS_DEVDAX_PATH : "/dev/dax0.0" - UMF_TESTS_DEVDAX_SIZE : 1054867456 - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - devdax: - name: Build - # run only on upstream; forks may not have a DAX device - if: github.repository == 'oneapi-src/unified-memory-framework' - strategy: - matrix: - build_type: [Debug, Release] - shared_library: ['ON', 'OFF'] - - runs-on: ["DSS-DEVDAX", "DSS-Ubuntu"] - steps: - - name: Check if the devdax exists - run: | - ndctl list -N --device-dax - ls -al ${{env.UMF_TESTS_DEVDAX_PATH}} - - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DCMAKE_C_COMPILER=gcc - -DCMAKE_CXX_COMPILER=g++ - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=OFF - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=OFF - -DUMF_BUILD_GPU_EXAMPLES=OFF - -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_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $(nproc) - - - name: Run only devdax tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{matrix.build_type}} -R devdax -V diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 6e128b6037..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,64 +0,0 @@ -# Deploy documentation to GitHub Pages -name: GitHubPages - -on: - push: - branches: ["main"] - -# Cancel previous in-progress workflow, only the latest run is relevant -concurrency: - group: "docs" - cancel-in-progress: true - -permissions: - contents: read - -jobs: - build: - name: Build docs - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install doxygen - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - - name: Install pip requirements - run: python3 -m pip install -r third_party/requirements.txt - - - name: Setup PATH for python - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Build the documentation - working-directory: scripts - run: python3 generate_docs.py - - - name: Upload artifact - uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 - with: - path: docs/html - - deploy: - name: Deploy docs to GitHub Pages - needs: build - - permissions: - pages: write - id-token: write - - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Deploy the documentation to GitHub Pages - id: deployment - uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 # v4.0.3 diff --git a/.github/workflows/fast.yml b/.github/workflows/fast.yml deleted file mode 100644 index 997c4441c9..0000000000 --- a/.github/workflows/fast.yml +++ /dev/null @@ -1,152 +0,0 @@ -# Fast builds -name: FastBuild - -on: workflow_call - -permissions: - contents: read - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - FastBuild: - name: Fast builds - 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 libjemalloc-dev 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 libjemalloc-dev 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 - - - name: check /DEPENDENTLOADFLAG (Windows only) - if: matrix.os == 'windows-latest' - run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/Release/umf.dll - shell: pwsh - - - name: check /DEPENDENTLOADFLAG in umf_proxy.dll - if: matrix.os == 'windows-latest' - run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/src/proxy_lib/Release/umf_proxy.dll - shell: pwsh - - # 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 diff --git a/.github/workflows/gpu.yml b/.github/workflows/gpu.yml deleted file mode 100644 index 279f977b1b..0000000000 --- a/.github/workflows/gpu.yml +++ /dev/null @@ -1,168 +0,0 @@ -# This workflow builds and tests providers using GPU memory. It requires -# appropriately labelled self-hosted runners installed on systems with the -# correct GPU and drivers - -name: GPU - -on: [workflow_call] - -permissions: - contents: read - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - gpu: - name: Build - env: - BUILD_TYPE: Release - VCPKG_PATH: "${{github.workspace}}/../../../../vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/../../../../vcpkg/packages/tbb_x64-windows;${{github.workspace}}/../../../../vcpkg/packages/jemalloc_x64-windows" - # run only on upstream; forks will not have the HW - if: github.repository == 'oneapi-src/unified-memory-framework' - strategy: - matrix: - shared_library: ['ON', 'OFF'] - os: ['Ubuntu', 'Windows'] - include: - - os: 'Ubuntu' - compiler: {c: gcc, cxx: g++} - number_of_processors: '$(nproc)' - - os: 'Windows' - compiler: {c: cl, cxx: cl} - number_of_processors: '$Env:NUMBER_OF_PROCESSORS' - - runs-on: ["DSS-LEVEL_ZERO", "DSS-${{matrix.os}}"] - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Get information about platform - if: matrix.os == 'Ubuntu' - run: .github/scripts/get_system_info.sh - - - name: Configure build for Win - if: matrix.os == 'Windows' - run: > - cmake - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=ON - -DUMF_BUILD_GPU_EXAMPLES=ON - -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=ON - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Configure build for Ubuntu - if: matrix.os == 'Ubuntu' - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=ON - -DUMF_BUILD_GPU_EXAMPLES=ON - -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=ON - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} -j ${{matrix.number_of_processors}} - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --test-dir test - - - name: Run examples - working-directory: ${{env.BUILD_DIR}} - run: ctest --output-on-failure --test-dir examples -C ${{env.BUILD_TYPE}} - - - name: Run benchmarks - working-directory: ${{env.BUILD_DIR}} - run: ctest --output-on-failure --test-dir benchmark -C ${{env.BUILD_TYPE}} --exclude-regex umf-bench-multithreaded - - gpu-CUDA: - name: Build - env: - BUILD_TYPE: Release - # run only on upstream; forks will not have the HW - if: github.repository == 'oneapi-src/unified-memory-framework' - strategy: - matrix: - shared_library: ['ON', 'OFF'] - # TODO add windows - os: ['Ubuntu'] - include: - - os: 'Ubuntu' - compiler: {c: gcc, cxx: g++} - number_of_processors: '$(nproc)' - - runs-on: ["DSS-CUDA", "DSS-${{matrix.os}}"] - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Get information about platform - if: matrix.os == 'Ubuntu' - run: .github/scripts/get_system_info.sh - - - name: Configure build for Ubuntu - if: matrix.os == 'Ubuntu' - run: > - cmake -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} - -DUMF_BUILD_BENCHMARKS=ON - -DUMF_BUILD_TESTS=ON - -DUMF_BUILD_GPU_TESTS=ON - -DUMF_BUILD_GPU_EXAMPLES=ON - -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=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} -j ${{matrix.number_of_processors}} - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure --test-dir test - - - name: Run examples - working-directory: ${{env.BUILD_DIR}} - run: ctest --output-on-failure --test-dir examples -C ${{env.BUILD_TYPE}} - - - name: Run benchmarks - working-directory: ${{env.BUILD_DIR}} - run: ctest --output-on-failure --test-dir benchmark -C ${{env.BUILD_TYPE}} --exclude-regex umf-bench-multithreaded diff --git a/.github/workflows/multi_numa.yml b/.github/workflows/multi_numa.yml deleted file mode 100644 index a9433018e3..0000000000 --- a/.github/workflows/multi_numa.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Runs tests on multi-numa machine -name: MultiNuma - -on: [workflow_call] - -permissions: - contents: read - -jobs: - multi_numa: - name: ${{matrix.os}} - # run only on upstream; forks will not have the HW - if: github.repository == 'oneapi-src/unified-memory-framework' - - strategy: - matrix: - os: [ubuntu-22.04, rhel-9.1] - runs-on: ["DSS-MULTI-NUMA", "DSS-${{matrix.os}}"] - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Get information about platform - run: .github/scripts/get_system_info.sh - - - name: Configure build - run: > - cmake - -B ${{github.workspace}}/build - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_C_COMPILER=gcc - -DCMAKE_CXX_COMPILER=g++ - -DUMF_BUILD_SHARED_LIBRARY=OFF - -DUMF_BUILD_BENCHMARKS=OFF - -DUMF_BUILD_TESTS=ON - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Run tests - if: matrix.os != 'rhel-9.1' - working-directory: ${{github.workspace}}/build - run: ctest --output-on-failure --test-dir test - - # On RHEL, hwloc version is just a little too low. - # Skip some tests until we upgrade hwloc and update CMake to properly handle local hwloc installation. - # TODO: fix issue #560 - - name: Run tests (on RHEL) - if: matrix.os == 'rhel-9.1' - working-directory: ${{github.workspace}}/build - run: | - ctest --output-on-failure --test-dir test -E "umf-provider_os_memory_multiple_numa_nodes" - ./test/umf_test-provider_os_memory_multiple_numa_nodes \ - --gtest_filter="-*checkModeLocal/*:*checkModePreferredEmptyNodeset/*:testNuma.checkModeInterleave" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index 89317cc637..0000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,90 +0,0 @@ -# Various non-standard tests, requiring e.g. longer run -name: Nightly - -# This job is run at 00:00 UTC every day or on demand. -on: - workflow_dispatch: - schedule: - - cron: '0 0 * * *' - -permissions: - contents: read - -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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - 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: 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" - - valgrind: - name: Valgrind - strategy: - fail-fast: false - matrix: - tool: ['memcheck', 'drd', 'helgrind'] - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y cmake hwloc libhwloc-dev libjemalloc-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_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}} diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml deleted file mode 100644 index 02b7adf9f8..0000000000 --- a/.github/workflows/pr_push.yml +++ /dev/null @@ -1,112 +0,0 @@ -# Checks required for a PR to merge. This workflow mostly call other workflows. -name: PR/push - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - CodeStyle: - name: Coding style - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y black cmake clang-format-15 cmake-format libhwloc-dev - - - name: Configure CMake - run: > - cmake - -B ${{github.workspace}}/build - -DUMF_FORMAT_CODE_STYLE=ON - -DUMF_BUILD_TESTS=OFF - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=OFF - - - name: Check C/C++ formatting - run: cmake --build build --target clang-format-check - - - name: Check CMake formatting - run: | - cmake --build build --target cmake-format-apply - git diff --exit-code - - - name: Check Python formatting - run: cmake --build build --target black-format-check - - DocsBuild: - name: Build docs - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install doxygen - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - - name: Install pip requirements - run: python3 -m pip install -r third_party/requirements.txt - - - name: Setup PATH for python - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Build the documentation - working-directory: scripts - run: python3 generate_docs.py - - Spellcheck: - uses: ./.github/workflows/spellcheck.yml - FastBuild: - name: Fast builds - needs: [Spellcheck, CodeStyle] - uses: ./.github/workflows/fast.yml - Build: - name: Basic builds - needs: [FastBuild] - uses: ./.github/workflows/basic.yml - DevDax: - needs: [FastBuild] - uses: ./.github/workflows/devdax.yml - Sanitizers: - needs: [FastBuild] - uses: ./.github/workflows/sanitizers.yml - Qemu: - needs: [FastBuild] - uses: ./.github/workflows/qemu.yml - Benchmarks: - needs: [Build] - uses: ./.github/workflows/benchmarks.yml - ProxyLib: - needs: [Build] - uses: ./.github/workflows/proxy_lib.yml - GPU: - needs: [Build] - uses: ./.github/workflows/gpu.yml - Valgrind: - needs: [Build] - uses: ./.github/workflows/valgrind.yml - MultiNuma: - needs: [Build] - uses: ./.github/workflows/multi_numa.yml diff --git a/.github/workflows/proxy_lib.yml b/.github/workflows/proxy_lib.yml deleted file mode 100644 index 678b40eff1..0000000000 --- a/.github/workflows/proxy_lib.yml +++ /dev/null @@ -1,73 +0,0 @@ -# Builds libumf_proxy and runs tests with it -name: Proxy library - -on: workflow_call - -permissions: - contents: read - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -jobs: - proxy-ubuntu: - name: Ubuntu - - strategy: - matrix: - build_type: [Release, Debug] - compiler: [{c: gcc, cxx: g++}] - proxy_lib_pool: ['SCALABLE', 'JEMALLOC'] - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-22.04' }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y cmake libhwloc-dev libjemalloc-dev libtbb-dev - - - name: Set ptrace value for IPC test - run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" - - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_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_BUILD_BENCHMARKS=OFF - -DUMF_BUILD_TESTS=ON - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=OFF - -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - -DUMF_PROXY_LIB_BASED_ON_POOL=${{matrix.proxy_lib_pool}} - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} -j $(nproc) - - - name: Run "ctest --output-on-failure" with proxy library - working-directory: ${{env.BUILD_DIR}} - run: LD_PRELOAD=./lib/libumf_proxy.so ctest --output-on-failure - - - name: Run "./test/umf_test-memoryPool" with proxy library - working-directory: ${{env.BUILD_DIR}} - run: LD_PRELOAD=./lib/libumf_proxy.so ./test/umf_test-memoryPool - - - name: Run "/usr/bin/ls" with proxy library - working-directory: ${{env.BUILD_DIR}} - run: LD_PRELOAD=./lib/libumf_proxy.so /usr/bin/ls - - - name: Run "/usr/bin/date" with proxy library - working-directory: ${{env.BUILD_DIR}} - run: LD_PRELOAD=./lib/libumf_proxy.so /usr/bin/date diff --git a/.github/workflows/qemu.yml b/.github/workflows/qemu.yml deleted file mode 100644 index fa3089b673..0000000000 --- a/.github/workflows/qemu.yml +++ /dev/null @@ -1,107 +0,0 @@ -# Builds project on qemu with custom hmat settings -name: Qemu - -on: workflow_call - -permissions: - contents: read - -jobs: - qemu-build: - name: Qemu - runs-on: ubuntu-22.04 - - steps: - - name: Checkout UMF - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - path: umf - - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y qemu-system genisoimage qemu-utils \ - libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils - pip install -r umf/scripts/qemu/requirements.txt - - - name: Add user to kvm group - run: sudo usermod -a -G kvm,libvirt $USER - - - name: Run ssh-keygen - run: ssh-keygen -b 4096 -N '' -f ~/.ssh/id_rsa - - - name: Generate iso with user info - run: | - pub_key=$(cat ~/.ssh/id_rsa.pub) - - cat > user-data << EOF - #cloud-config - - # Add a 'testuser' user to the system with a password - users: - - default - - name: testuser - gecos: Test User - primary_group: wheel - groups: users - sudo: ALL=(ALL) NOPASSWD:ALL - lock_passwd: false - ssh-authorized-keys: - - $pub_key - shell: /usr/bin/bash - - # Set local logins - chpasswd: - list: | - root:password - testuser:password - expire: False - EOF - - cat > meta-data << EOF - instance-id: qemu-test - local-hostname: qemu-test - EOF - - sudo -Sk genisoimage -output ubuntu-cloud-init.iso -volid cidata -joliet -rock ./user-data ./meta-data - - - name: Download ubuntu image - run: wget https://cloud-images.ubuntu.com/releases/lunar/release/ubuntu-23.04-server-cloudimg-amd64.img - - - name: Resize image - run: qemu-img resize ./ubuntu-23.04-server-cloudimg-amd64.img +4G - - - name: Build UMF in QEMU - run: | - umf/scripts/qemu/start_qemu.sh default.xml - - # Copy UMF repository's content into the home dir in QEMU - rsync -az -e "ssh -p 2222" ${{github.workspace}}/umf/ testuser@127.0.0.1:/home/testuser/ - ssh testuser@127.0.0.1 -p 2222 -t "sudo chown -R testuser:users /home/testuser" - - ssh testuser@127.0.0.1 -p 2222 -t "bash /home/testuser/scripts/qemu/run-build.sh" - ssh testuser@127.0.0.1 -p 2222 -t "sudo shutdown -h now" - - - name: Run tests in QEMU - run: | - for config_file in umf/scripts/qemu/configs/*.xml; do - config_name=$(basename $config_file) - - while ps -aux | grep qemu-system-x86_64 | grep -q -v grep; do - echo "Waiting for QEMU to shut down..." - sleep 5 - done - - echo "\n ### Testing ${config_name} ###" - umf/scripts/qemu/start_qemu.sh ${config_name} - - ssh testuser@127.0.0.1 -p 2222 -t "bash /home/testuser/scripts/qemu/run-tests.sh" - ssh testuser@127.0.0.1 -p 2222 -t "sudo shutdown -h now" - done diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml deleted file mode 100644 index 2c63ebd51b..0000000000 --- a/.github/workflows/sanitizers.yml +++ /dev/null @@ -1,144 +0,0 @@ -# Check code with compilers' sanitizers -name: Sanitizers - -on: workflow_call - -env: - BUILD_DIR : "${{github.workspace}}/build" - INSTL_DIR : "${{github.workspace}}/../install-dir" - -permissions: - contents: read - -jobs: - ubuntu-build: - name: Ubuntu - strategy: - matrix: - compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}] - # TSAN is mutually exclusive with other sanitizers - sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}] - runs-on: ubuntu-22.04 - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev - - - name: Install oneAPI basekit - if: matrix.compiler.cxx == 'icpx' - run: | - sudo apt-get install -y gpg-agent wget - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update - sudo apt-get install -y intel-oneapi-ippcp-devel intel-oneapi-ipp-devel intel-oneapi-common-oneapi-vars intel-oneapi-compiler-dpcpp-cpp - - - - name: Set ptrace value for IPC test - run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" - - - name: Configure build - run: > - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_BUILD_TYPE=Debug - -DUMF_BUILD_SHARED_LIBRARY=OFF - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -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 - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_USE_ASAN=${{matrix.sanitizers.asan}} - -DUMF_USE_UBSAN=${{matrix.sanitizers.ubsan}} - -DUMF_USE_TSAN=${{matrix.sanitizers.tsan}} - -DUMF_BUILD_EXAMPLES=ON - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} - cmake --build ${{env.BUILD_DIR}} -j $(nproc) - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: | - ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} - ctest --output-on-failure - - windows-build: - name: cl and clang-cl on Windows - 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: - compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}] - # Only ASAN is supported - sanitizers: [{asan: ON}] - runs-on: windows-2022 - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - # Use the latest MSVC toolset available, when compiling UMF with ASan. - # Running binaries compiled with older toolsets results in a - # 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from - # the same toolset as the compiler being used. - # https://github.com/actions/runner-images/issues/8891 - - name: Setup MSVC dev command prompt - if: matrix.sanitizers.asan == 'ON' - uses: TheMrMilchmann/setup-msvc-dev@48edcef51a12c80d7e62ace57aae1417795e511c # v3.0.0 - with: - arch: x64 - toolset: '14' - - - name: Initialize vcpkg - uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 - with: - vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 - vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg - vcpkgJsonGlob: '**/vcpkg.json' - - - name: Install dependencies - run: vcpkg install - shell: pwsh # Specifies PowerShell as the shell for running the script. - - # TODO enable level zero provider - - name: Configure build - run: > - cmake - -B ${{env.BUILD_DIR}} - -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DUMF_BUILD_SHARED_LIBRARY=OFF - -DUMF_FORMAT_CODE_STYLE=OFF - -DUMF_DEVELOPER_MODE=ON - -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON - -DUMF_USE_ASAN=${{matrix.sanitizers.asan}} - -DUMF_BUILD_EXAMPLES=ON - -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_CUDA_PROVIDER=OFF - -DUMF_TESTS_FAIL_ON_SKIP=ON - - - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config Debug -j $Env:NUMBER_OF_PROCESSORS - - - name: Run tests - working-directory: ${{env.BUILD_DIR}} - run: ctest -C Debug --output-on-failure diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index b28bb150e7..0000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Scorecard analysis, looking for vulnerabilities and bad practices in the repo. -name: Scorecard - -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - workflow_dispatch: - schedule: - # Runs at 01:00 UTC on Saturday. - - cron: '0 1 * * 6' - push: - branches: [ "main" ] - -permissions: read-all - -jobs: - analyze: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Run analysis - uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 - with: - results_file: scorecard_results.sarif - results_format: sarif - publish_results: true - - # Upload the results as artifacts to the repository Actions tab. - - name: Upload artifact - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 4.3.1 - with: - name: Scorecard results - path: scorecard_results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8 - with: - sarif_file: scorecard_results.sarif diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml deleted file mode 100644 index dbd6f1c8e6..0000000000 --- a/.github/workflows/spellcheck.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Checks spelling issues in the repo -name: SpellCheck - -on: workflow_call - -permissions: - contents: read - -jobs: - analyze: - name: Run spell check - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Run a spell check - uses: crate-ci/typos@b63f421581dce830bda2f597a678cb7776b41877 # v1.18.2 - with: - config: ./.github/workflows/.spellcheck-conf.toml diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml deleted file mode 100644 index 21a76d0cd0..0000000000 --- a/.github/workflows/trivy.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Runs linter for Docker files -name: Trivy - -# Due to lower score on Scorecard we're running this separately from -# "PR/push" workflow. For some reason permissions weren't properly set -# or recognized (by Scorecard). If Scorecard changes its behavior we can -# use 'workflow_call' trigger. -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - paths: - - '.github/docker/*Dockerfile' - - '.github/workflows/trivy.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - trivy: - name: Trivy - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - permissions: - security-events: write - - steps: - - name: Clone the git repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Run Trivy - uses: aquasecurity/trivy-action@84384bd6e777ef152729993b8145ea352e9dd3ef # v0.17.0 - with: - scan-type: 'config' - hide-progress: false - format: 'sarif' - output: 'trivy-results.sarif' - exit-code: 1 # Fail if issue found - # file with suppressions: .trivyignore (in root dir) - - - name: Print report and trivyignore file - run: | - echo "### Trivy ignore content:" - cat .trivyignore - echo "### Trivy report:" - cat trivy-results.sarif - - - name: Upload results - uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0 - with: - sarif_file: 'trivy-results.sarif' diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml deleted file mode 100644 index 40d4e65352..0000000000 --- a/.github/workflows/valgrind.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Valgrind - -on: workflow_call - -permissions: - contents: read - -jobs: - valgrind: - name: Valgrind - strategy: - fail-fast: false - matrix: - tool: ['memcheck', 'drd', 'helgrind'] - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y cmake hwloc libhwloc-dev libjemalloc-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_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}}