diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8fffb951..06e5e884 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -43,27 +43,45 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/mdspan-build - + - name: Check Out uses: actions/checkout@v2 with: path: ${{github.workspace}}/mdspan-src - + - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/mdspan-build - run: CXX=${{ matrix.compiler_prefix}}/${{ matrix.compiler_driver }} cmake $GITHUB_WORKSPACE/mdspan-src -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install -DMDSPAN_ENABLE_TESTS=ON -DMDSPAN_ENABLE_EXAMPLES=ON - - - name: Build + run: CXX=${{ matrix.compiler_prefix}}/${{ matrix.compiler_driver }} cmake $GITHUB_WORKSPACE/mdspan-src -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install -DMDSPAN_ENABLE_TESTS=ON -DMDSPAN_ENABLE_EXAMPLES=ON ${{ matrix.enable_backend }} + + - name: Build (icpx) + if: ${{ matrix.compiler_driver == 'icpx' }} + shell: bash + working-directory: ${{github.workspace}}/mdspan-build + run: | + . /opt/intel/oneapi/setvars.sh + make -j + + - name: Build (non-icpx) + if: ${{ matrix.compiler_driver != 'icpx' }} shell: bash working-directory: ${{github.workspace}}/mdspan-build run: make -j - - - name: Test + + - name: Test (icpx) + if: ${{ matrix.compiler_driver == 'icpx' }} working-directory: ${{github.workspace}}/mdspan-build shell: bash - run: ctest - + run: | + . /opt/intel/oneapi/setvars.sh + ctest --output-on-failure + + - name: Test (non-icpx) + if: ${{ matrix.compiler_driver != 'icpx' }} + working-directory: ${{github.workspace}}/mdspan-build + shell: bash + run: ctest --output-on-failure + - name: Install shell: bash working-directory: ${{github.workspace}}/mdspan-build diff --git a/tests/offload_utils.hpp b/tests/offload_utils.hpp index a71ae060..a986aa65 100644 --- a/tests/offload_utils.hpp +++ b/tests/offload_utils.hpp @@ -15,7 +15,11 @@ //@HEADER #ifdef _MDSPAN_HAS_SYCL +#if __has_include() #include +#else +#include +#endif #endif #ifdef _MDSPAN_HAS_HIP