|
1 | 1 | name: oneapi-linux
|
2 | 2 |
|
3 | 3 | env:
|
| 4 | + FC: ifx |
| 5 | +# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml |
4 | 6 | CTEST_NO_TESTS_ACTION: error
|
5 |
| - CMAKE_BUILD_PARALLEL_LEVEL: 4 |
6 | 7 | CMAKE_BUILD_TYPE: Release
|
7 |
| - CTEST_PARALLEL_LEVEL: 0 |
| 8 | + CMAKE_GENERATOR: Ninja |
| 9 | +# don't need Ninja but it prints the command lines by default which is good for debugging |
| 10 | + |
| 11 | + # debug triggers asan build errors, peculiar to GitHub Actions |
8 | 12 |
|
9 | 13 | on:
|
10 | 14 | push:
|
|
16 | 20 | - "**.cmake"
|
17 | 21 | - "**/CMakeLists.txt"
|
18 | 22 | - ".github/workflows/oneapi-linux.yml"
|
| 23 | + - ".github/workflows/oneapi*.sh" |
| 24 | + - "!memcheck.cmake" |
| 25 | + - "!coverage.cmake" |
| 26 | + - "!example/*" |
| 27 | + workflow_dispatch: |
| 28 | + |
| 29 | +# avoid wasted runs |
| 30 | +concurrency: |
| 31 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 32 | + cancel-in-progress: true |
19 | 33 |
|
20 | 34 |
|
21 | 35 | jobs:
|
22 | 36 |
|
23 | 37 | linux:
|
| 38 | + runs-on: ubuntu-latest |
| 39 | + timeout-minutes: 10 |
24 | 40 |
|
25 | 41 | strategy:
|
26 | 42 | matrix:
|
27 |
| - os: [ubuntu-latest] |
28 |
| -# Windows takes tens of minutes to install oneAPI |
29 |
| - |
30 |
| - runs-on: ${{ matrix.os }} |
31 |
| - timeout-minutes: 10 |
32 |
| - |
| 43 | + oneapi: [2025.1] |
33 | 44 | steps:
|
34 |
| - - uses: fortran-lang/setup-fortran@v1 |
35 |
| - id: setup-fortran |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + |
| 47 | + - name: cache install oneAPI |
| 48 | + id: cache-install |
| 49 | + uses: actions/cache@v4 |
36 | 50 | with:
|
37 |
| - compiler: intel |
38 |
| - version: '2024.1' |
| 51 | + path: | |
| 52 | + /opt/intel/oneapi |
| 53 | + key: oneapi-${{ matrix.oneapi }}-apt |
39 | 54 |
|
40 |
| - - uses: actions/checkout@v4 |
| 55 | + - name: non-cache install oneAPI |
| 56 | + if: steps.cache-install.outputs.cache-hit != 'true' |
| 57 | + timeout-minutes: 5 |
| 58 | + run: | |
| 59 | + .github/workflows/oneapi_setup_apt_repo_linux.sh |
| 60 | + sudo apt install --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-${{ matrix.oneapi }} intel-oneapi-compiler-fortran-${{ matrix.oneapi }} |
| 61 | +
|
| 62 | + - name: Setup Intel oneAPI environment |
| 63 | + run: | |
| 64 | + source /opt/intel/oneapi/setvars.sh |
| 65 | + printenv >> $GITHUB_ENV |
| 66 | +
|
| 67 | + - name: Configure, build, test CMake workflow |
| 68 | + run: cmake --workflow default |
| 69 | + |
| 70 | + - name: Upload log failure |
| 71 | + if: failure() |
| 72 | + uses: actions/upload-artifact@v4 |
| 73 | + with: |
| 74 | + name: oneapi-${{ matrix.onapi }}-${{ runner.os }}-CMakeConfigureLog.yaml |
| 75 | + path: build/CMakeFiles/CMakeConfigureLog.yaml |
41 | 76 |
|
42 |
| - - run: cmake --workflow --preset default |
| 77 | + - name: exclude unused files from cache |
| 78 | + if: steps.cache-install.outputs.cache-hit != 'true' |
| 79 | + run: .github/workflows/oneapi_cache_exclude_linux.sh |
0 commit comments