Skip to content

Commit edabfa7

Browse files
committed
ci:oneapi latest
1 parent 1b6ab5d commit edabfa7

File tree

3 files changed

+73
-14
lines changed

3 files changed

+73
-14
lines changed

.github/workflows/oneapi-linux.yml

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
name: oneapi-linux
22

33
env:
4+
FC: ifx
5+
# https://github.com/oneapi-src/oneapi-ci/blob/master/.github/workflows/build_all.yml
46
CTEST_NO_TESTS_ACTION: error
5-
CMAKE_BUILD_PARALLEL_LEVEL: 4
67
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
812

913
on:
1014
push:
@@ -16,27 +20,60 @@ on:
1620
- "**.cmake"
1721
- "**/CMakeLists.txt"
1822
- ".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
1933

2034

2135
jobs:
2236

2337
linux:
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 10
2440

2541
strategy:
2642
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]
3344
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
3650
with:
37-
compiler: intel
38-
version: '2024.1'
51+
path: |
52+
/opt/intel/oneapi
53+
key: oneapi-${{ matrix.oneapi }}-apt
3954

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
4176

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
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# SPDX-FileCopyrightText: 2020 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
7+
#shellcheck disable=SC2010
8+
LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)
9+
10+
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/compiler/lib/ia32_lin
11+
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/bin/ia32
12+
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/emu
13+
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/oclfpga
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# This script sets up the Intel oneAPI apt repository on a Linux system.
3+
# https://www.intel.com/content/www/us/en/docs/oneapi/installation-guide-linux/2025-1/base-apt.html#BASE-APT
4+
5+
curl -sS -L https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
6+
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
7+
8+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
9+
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/oneAPI.list" -o APT::Get::List-Cleanup="0"

0 commit comments

Comments
 (0)