Skip to content

Commit

Permalink
Merge pull request #95 from rscohn2/dev/icx
Browse files Browse the repository at this point in the history
test icpx compiler
  • Loading branch information
crtrott authored Nov 23, 2021
2 parents 14bd404 + 59f266b commit a0aa4d9
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,30 @@ env:
jobs:
build-mdspan:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- compiler_driver: g++
compiler_prefix: /usr/bin
- compiler_driver: icpx
compiler_prefix: /opt/intel/oneapi/compiler/latest/linux/bin
compiler_url: https://registrationcenter-download.intel.com/akdlm/irc_nas/18209/l_dpcpp-cpp-compiler_p_2021.4.0.3201_offline.sh
name: ${{ matrix.compiler_driver }}
steps:

- name: Cache icpx install
if: ${{ matrix.compiler_driver == 'icpx' }}
id: cache-icpx
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: oneapi-${{ matrix.compile_url}}
- name: Install icpx
if: ${{ matrix.compiler_driver == 'icpx' && steps.cache-icpx.outputs.cache-hit != 'true' }}
run: |
curl --url ${{ matrix.compiler_url }} --output download.sh
sudo sh -x download.sh -s -a -s --action install --eula accept
- name: Install gtest manually
run: sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/*.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a

Expand All @@ -25,12 +46,12 @@ jobs:
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: 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
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
shell: bash
working-directory: ${{github.workspace}}/mdspan-build
run: make
run: make -j

- name: Test
working-directory: ${{github.workspace}}/mdspan-build
Expand Down

0 comments on commit a0aa4d9

Please sign in to comment.