diff --git a/.github/actions/install-oneapi/cache_exclude_linux.sh b/.github/actions/install-oneapi/cache_exclude_linux.sh new file mode 100644 index 0000000000..e9365ab80d --- /dev/null +++ b/.github/actions/install-oneapi/cache_exclude_linux.sh @@ -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 diff --git a/.github/actions/install-oneapi/install_linux.sh b/.github/actions/install-oneapi/install_linux.sh new file mode 100644 index 0000000000..c39b0a5131 --- /dev/null +++ b/.github/actions/install-oneapi/install_linux.sh @@ -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 diff --git a/.github/workflows/ubuntu-latest-oneapi.yml b/.github/workflows/ubuntu-latest-oneapi.yml index 3a0b7430b1..02bf9f05a3 100644 --- a/.github/workflows/ubuntu-latest-oneapi.yml +++ b/.github/workflows/ubuntu-latest-oneapi.yml @@ -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: @@ -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 @@ -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