From 4266aa9f16a49e50a814fd286d07480a4d7a409e Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Wed, 16 Oct 2024 12:27:43 -0400 Subject: [PATCH 1/2] Add Intel oneAPI container recipe --- .../containers/CentOS9-devel-oneAPI.def | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 devel-tools/containers/CentOS9-devel-oneAPI.def diff --git a/devel-tools/containers/CentOS9-devel-oneAPI.def b/devel-tools/containers/CentOS9-devel-oneAPI.def new file mode 100755 index 000000000..12d960a3a --- /dev/null +++ b/devel-tools/containers/CentOS9-devel-oneAPI.def @@ -0,0 +1,31 @@ + +BootStrap: localimage +From: CentOS9-devel.sif + + +%help + Development environment for CentOS Stream Linux 9 with Intel oneAPI installed + + +%setup + cat > ${APPTAINER_ROOTFS}/etc/yum.repos.d/oneAPI.repo << EOF +[oneAPI] +name=IntelĀ® oneAPI repository +baseurl=https://yum.repos.intel.com/oneapi +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +EOF + + +%post + dnf -y update + dnf -y install intel-basekit intel-hpckit + cat > /etc/profile.d/oneapi.sh << EOF +if [ -z "${ONEAPI_ROOT}" ] ; then + echo "Usage of Intel oneAPI is subject to the license agreement at: https://www.intel.com/content/www/us/en/developer/articles/license/end-user-license-agreement.html" + source /opt/intel/oneapi/setvars.sh > /dev/null +fi +EOF + chmod 644 /etc/profile.d/oneapi.sh From b67a4e1480c8cd24db2115f94dddfcda50dc6a09 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Wed, 16 Oct 2024 12:27:29 -0400 Subject: [PATCH 2/2] Add Intel oneAPI CI job --- .github/workflows/test-library.yml | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/.github/workflows/test-library.yml b/.github/workflows/test-library.yml index 3c14ecc56..faa8e3e26 100644 --- a/.github/workflows/test-library.yml +++ b/.github/workflows/test-library.yml @@ -511,6 +511,89 @@ jobs: cmake3 -D CMAKE_CXX_STANDARD=11 -P devel-tools/build_test_library.cmake + build-linux-x86_64-intel: + name: Linux x86_64 (Intel oneAPI) + runs-on: ubuntu-latest + needs: basicchecks + env: + CCACHE: ccache + CMAKE_GENERATOR: Ninja + CCACHE_DIR: ${{ github.workspace }}/ccache + steps: + - uses: actions/checkout@v4 + + - name: Load compiler ccache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/ccache + key: ${{ runner.os }}-build-oneapi-${{ github.sha }} + restore-keys: ${{ runner.os }}-build-oneapi- + + - name: Get small downloadable packages + uses: actions/checkout@v4 + with: + repository: 'Colvars/build-tools-packages' + ref: 'master' + path: 'devel-tools/packages' + + - name: Install Apptainer + shell: bash + run: | + sudo add-apt-repository -y ppa:apptainer/ppa + sudo apt update + sudo apt install -y apptainer-suid + + - name: Get container images for build dependencies + shell: bash + working-directory: devel-tools + run: | + apptainer pull CentOS9-devel-oneAPI.sif oras://ghcr.io/colvars/devel-containers:CentOS9-devel-oneAPI + + - name: Intel oneAPI 2024.2, C++11 + shell: bash + env: + CC: icx + CXX: icpx + CXX_STANDARD: 11 + BASH_ENV: "/etc/profile.d/oneapi.sh" + run: | + apptainer exec ${{github.workspace}}/devel-tools/CentOS9-devel-oneAPI.sif \ + bash -c "cmake -D CMAKE_CXX_STANDARD=${CXX_STANDARD} -P devel-tools/build_test_library.cmake" + + - name: Intel oneAPI 2024.2, C++14 + shell: bash + env: + CC: icx + CXX: icpx + CXX_STANDARD: 14 + BASH_ENV: "/etc/profile.d/oneapi.sh" + run: | + apptainer exec ${{github.workspace}}/devel-tools/CentOS9-devel-oneAPI.sif \ + bash -c "cmake -D CMAKE_CXX_STANDARD=${CXX_STANDARD} -P devel-tools/build_test_library.cmake" + + - name: Intel oneAPI 2024.2, C++17 + shell: bash + env: + CC: icx + CXX: icpx + CXX_STANDARD: 17 + BASH_ENV: "/etc/profile.d/oneapi.sh" + run: | + apptainer exec ${{github.workspace}}/devel-tools/CentOS9-devel-oneAPI.sif \ + bash -c "cmake -D CMAKE_CXX_STANDARD=${CXX_STANDARD} -P devel-tools/build_test_library.cmake" + + - name: Intel oneAPI 2024.2, C++20 + shell: bash + env: + CC: icx + CXX: icpx + CXX_STANDARD: 20 + BASH_ENV: "/etc/profile.d/oneapi.sh" + run: | + apptainer exec ${{github.workspace}}/devel-tools/CentOS9-devel-oneAPI.sif \ + bash -c "cmake -D CMAKE_CXX_STANDARD=${CXX_STANDARD} -P devel-tools/build_test_library.cmake" + + build-windows-x86_64-msvc: name: Windows x86_64 (MSVC) runs-on: windows-latest