diff --git a/.github/workflows/ubuntu-latest-icc.yml b/.github/workflows/ubuntu-latest-icc.yml index 4b099e9..b5212fd 100644 --- a/.github/workflows/ubuntu-latest-icc.yml +++ b/.github/workflows/ubuntu-latest-icc.yml @@ -15,43 +15,46 @@ on: - improvement/** - bugfix/** +env: + LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17431/l_BaseKit_p_2021.1.0.2659_offline.sh + LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh + jobs: - gcc_tests: - if: >- - ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && - ! contains(toJSON(github.event.commits.*.message), '[skip github]') - - strategy: - matrix: - version: [10, 9, 8] - + build_linux_cpp: runs-on: ubuntu-latest - - name: GCC ${{ matrix.version }} - - container: - image: gcc:${{ matrix.version }} - - options: -v /usr/local:/host_usr_local - + defaults: + run: + shell: bash steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - - uses: friendlyanon/fetch-core-count@v1 - id: cores + env: + CXX: dpcpp - - name: CMake - run: echo "/host_usr_local/bin" >> $GITHUB_PATH + - name: cache install + id: cache-install + uses: actions/cache@v2 + with: + path: | + /opt/intel/oneapi/compiler + key: + install-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_CPP_COMPONENTS_WEB }}-compiler-${{ hashFiles('**/scripts/cache_exclude_linux.sh') }} - - name: Install dependencies - run: script/ci_install_deps.sh + - name: Install icc + run: scripts/ci_install_icc.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS_WEB - - name: Configure - run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + - name: Install dependencies + run: script/ci_install_deps.sh - - name: Build - run: cmake --build build -j ${{ steps.cores.outputs.count }} + - name: CMake + run: echo "/host_usr_local/bin" >> $GITHUB_PATH - - name: Run - working-directory: build - run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} + - name: Configure + run: cmake -S test -B build -D CMAKE_BUILD_TYPE=Debug + + - name: Build + run: cmake --build build -j ${{ steps.cores.outputs.count }} + + - name: Run + working-directory: build + run: ctest --output-on-failure -j ${{ steps.cores.outputs.count }} diff --git a/.github/workflows/win-msys2-clang.yml b/.github/workflows/win-msys2-clang.yml index 275f9f0..c13b862 100644 --- a/.github/workflows/win-msys2-clang.yml +++ b/.github/workflows/win-msys2-clang.yml @@ -17,6 +17,10 @@ on: jobs: windows-mingw: + if: >- + ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && + ! contains(toJSON(github.event.commits.*.message), '[skip github]') + name: ${{ matrix.msystem }} runs-on: windows-latest defaults: @@ -61,7 +65,9 @@ jobs: run: script/ci_install_deps.sh - name: Configure - run: cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build -DCMAKE_BUILD_TYPE=Debug + run: >- + cmake -DCMAKE_CXX_COMPILER=clang++ -S test -B build + -DCMAKE_BUILD_TYPE=Debug - name: Build run: cmake --build build -j ${{ steps.cores.outputs.count }} diff --git a/.github/workflows/win-msys2-gcc.yml b/.github/workflows/win-msys2-gcc.yml index 03bfdc4..8738bbd 100644 --- a/.github/workflows/win-msys2-gcc.yml +++ b/.github/workflows/win-msys2-gcc.yml @@ -17,6 +17,10 @@ on: jobs: windows-mingw: + if: >- + ! contains(toJSON(github.event.commits.*.message), '[skip ci]') && + ! contains(toJSON(github.event.commits.*.message), '[skip github]') + name: ${{ matrix.msystem }} runs-on: windows-latest defaults: diff --git a/script/ci_install_icc.sh b/script/ci_install_icc.sh new file mode 100755 index 0000000..4428dd9 --- /dev/null +++ b/script/ci_install_icc.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2020 Intel Corporation +# +# SPDX-License-Identifier: MIT + +URL=$1 +COMPONENTS=$2 + +curl --output webimage.sh --url "$URL" --retry 5 --retry-delay 5 +chmod +x webimage.sh +./webimage.sh -x -f webimage_extracted --log extract.log +rm -rf webimage.sh +WEBIMAGE_NAME=$(ls -1 webimage_extracted/) +if [ -z "$COMPONENTS" ]; then + sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --eula=accept --continue-with-optional-error=yes --log-dir=. + installer_exit_code=$? +else + sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --continue-with-optional-error=yes --log-dir=. + installer_exit_code=$? +fi +rm -rf webimage_extracted +exit $installer_exit_code