[TEST] Test standalone examples #36
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| pull_request: | |
| 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}} -V --test-dir test | |
| - name: Run examples | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: ctest -V --test-dir examples -C ${{env.BUILD_TYPE}} | |
| - name: Run standalone examples | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: ctest -V -R standalone -C ${{env.BUILD_TYPE}} | |
| 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}} -V --test-dir test | |
| - name: Run examples | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: ctest -V --test-dir examples -C ${{env.BUILD_TYPE}} | |
| - name: Run standalone examples | |
| working-directory: ${{env.BUILD_DIR}} | |
| run: ctest -V -R umf_standalone_examples -C ${{env.BUILD_TYPE}} |