ci:windows enable #23
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
name: oneapi-linux | |
env: | |
CC: icx | |
CXX: icpx | |
FC: ifx | |
LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp | |
LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran | |
LINUX_MKL_COMPONENTS: intel-oneapi-mkl intel-oneapi-mkl-devel | |
LINUX_MPI_COMPONENTS: intel-oneapi-mpi intel-oneapi-mpi-devel | |
# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml | |
CTEST_NO_TESTS_ACTION: error | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
CMAKE_BUILD_TYPE: Release | |
CTEST_PARALLEL_LEVEL: 0 | |
# oneAPI Debug triggers asan errors on Linux in general on any project | |
CMAKE_INSTALL_PREFIX: ~/libs | |
CMAKE_PREFIX_PATH: ~/libs | |
on: | |
push: | |
paths: | |
- "**.c" | |
- "**.cpp" | |
- "**.f90" | |
- "**.F90" | |
- "**.cmake" | |
- "cmake/libraries.json" | |
- "CMakePresets.json" | |
- "**/CMakeLists.txt" | |
- "!cmake/gnu.cmake" | |
- ".github/workflows/oneapi-linux.yml" | |
# paths ignore starting with "!" | |
- "!docs/**" | |
- "!**/cray.cmake" | |
workflow_dispatch: | |
# avoid wasted runs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
# this must be before oneAPI script commands else the scripts do not exist on the image | |
- name: cache install oneAPI | |
id: cache-install | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/opt/intel/oneapi | |
key: oneapi-apt | |
- name: non-cache install oneAPI | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
timeout-minutes: 8 | |
# 5 minutes times out sometimes | |
run: | | |
sh -c .github/workflows/oneapi_setup_apt_repo_linux.sh | |
sudo apt install --no-install-recommends ${{ env.LINUX_FORTRAN_COMPONENTS }} ${{ env.LINUX_CPP_COMPONENTS }} ${{ env.LINUX_MPI_COMPONENTS }} | |
- name: Setup Intel oneAPI environment | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
printenv >> $GITHUB_ENV | |
- name: CMake Configure | |
run: cmake --preset default -G Ninja | |
- name: Upload log failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: oneapi-${{ runner.os }}-CMakeConfigureLog.yaml | |
path: build/CMakeFiles/CMakeConfigureLog.yaml | |
- name: build | |
run: cmake --build --preset default | |
- name: build failed | |
if: ${{ failure() }} | |
run: cmake --build --preset default -j1 -v | |
- name: unit test | |
run: ctest --preset default -V | |
- name: exclude unused files from cache | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
run: sh -c .github/workflows/oneapi_cache_exclude_linux.sh |