Skip to content

Commit

Permalink
add oneapi action
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Dec 10, 2024
1 parent 43857f7 commit a73248c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
13 changes: 13 additions & 0 deletions .github/actions/install-oneapi/cache_exclude_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

#shellcheck disable=SC2010
LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)

sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/compiler/lib/ia32_lin
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/bin/ia32
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/emu
sudo rm -rf /opt/intel/oneapi/compiler/"$LATEST_VERSION"/linux/lib/oclfpga
23 changes: 23 additions & 0 deletions .github/actions/install-oneapi/install_linux.sh
Original file line number Diff line number Diff line change
@@ -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 --log-dir=.
installer_exit_code=$?
else
sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --log-dir=.
installer_exit_code=$?
fi
rm -rf webimage_extracted
exit $installer_exit_code
11 changes: 5 additions & 6 deletions .github/workflows/ubuntu-latest-oneapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ concurrency:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
LINUX_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/96aa5993-5b22-4a9b-91ab-da679f422594/intel-oneapi-base-toolkit-2025.0.0.885_offline.sh
LINUX_DPCPP_COMPONENTS_WEB: intel.oneapi.lin.dpcpp-cpp-compiler
CACHE_NUMBER: 5
SAMPLES_TAG: 2025.0.0

jobs:
build_cycle_profiling:
Expand All @@ -24,6 +22,10 @@ jobs:
strategy:
matrix:
profiling: ['OFF', 'ON']
LINUX_BASEKIT_URL: [
'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/e6ff8e9c-ee28-47fb-abd7-5c524c983e1c/l_BaseKit_p_2024.2.1.100_offline.sh',
'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/96aa5993-5b22-4a9b-91ab-da679f422594/intel-oneapi-base-toolkit-2025.0.0.885_offline.sh'
]

steps:
- uses: actions/checkout@v4
Expand All @@ -35,15 +37,12 @@ jobs:
path: |
/opt/intel/oneapi/compiler
/opt/intel/oneapi/tbb
key: install-${{ env.CACHE_NUMBER }}-${{ env.LINUX_BASEKIT_URL }}-${{ env.LINUX_DPCPP_COMPONENTS_WEB }}-compiler-tbb-${{ hashFiles('**/scripts/cache_exclude_linux.sh') }}
key: install-${{ env.CACHE_NUMBER }}-${{ matrix.LINUX_BASEKIT_URL }}-${{ env.LINUX_DPCPP_COMPONENTS_WEB }}-compiler-tbb-${{ hashFiles('**/scripts/cache_exclude_linux.sh') }}

- name: install oneAPI
if: steps.cache-install.outputs.cache-hit != 'true'
run: scripts/install_linux.sh $LINUX_BASEKIT_URL $LINUX_DPCPP_COMPONENTS_WEB

- name: build oneAPI
run: scripts/build_linux.sh dpc++ $SAMPLES_TAG

- name: exclude unused files from oneAPI cache
if: steps.cache-install.outputs.cache-hit != 'true'
run: scripts/cache_exclude_linux.sh
Expand Down

0 comments on commit a73248c

Please sign in to comment.