ci:oneapi: correct package #10
This file contains 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 | |
FC: ifx | |
# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml | |
CTEST_NO_TESTS_ACTION: error | |
on: | |
push: | |
paths: | |
- "**.f90" | |
- "**.F90" | |
- "**.cmake" | |
- "**/CMakeLists.txt" | |
- ".github/workflows/oneapi-linux.yml" | |
- "!cmake/netcdf.cmake" | |
- "!cmake/netcdf-c.cmake" | |
- "!cmake/hdf5.cmake" | |
- "!scripts/**" | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache install oneAPI | |
id: cache-install | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/opt/intel/oneapi | |
key: install-oneapi-compiler | |
- name: non-cache install oneAPI | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
timeout-minutes: 5 | |
run: | | |
.github/workflows/oneapi_setup_apt_repo_linux.sh | |
sudo apt install intel-oneapi-compiler-dpcpp-cpp intel-oneapi-compiler-fortran | |
- name: Setup Intel oneAPI environment | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
printenv >> $GITHUB_ENV | |
- name: install Ninja | |
run: sudo apt install ninja-build | |
# install ninja needs to be own step as not cached by design | |
- name: Configure nc4fortran | |
run: >- | |
cmake | |
--preset multi | |
--install-prefix ${{ runner.temp }} | |
-DCMAKE_PREFIX_PATH=${{ runner.temp }} | |
- name: print config log | |
if: ${{ failure() }} | |
run: cat build/CMakeFiles/CMakeConfigureLog.yaml | |
- name: Debug workflow | |
run: cmake --workflow --preset debug | |
- name: Release workflow | |
run: cmake --workflow --preset release | |
- name: install package | |
run: cmake --install build | |
- name: configure examples | |
run: >- | |
cmake | |
-S example | |
-B example/build | |
-DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }} | |
# BUILD_SHARED_LIBS=false since as with any C++ / Fortran program with Intel compiler, | |
# need to have GCC environment carefully set | |
# so that underlying libstdc++ is compatible. | |
- name: exclude unused files from cache | |
if: steps.cache-install.outputs.cache-hit != 'true' | |
run: .github/workflows/oneapi_cache_exclude_linux.sh |