Skip to content

Commit

Permalink
ci: add Intel oneAPI actions (HDFGroup#2949)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed May 18, 2023
1 parent 6e5c4a5 commit 9191944
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/linux-icx-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Linux autoconf icx

on:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool libtool-bin
- name: Add oneAPI to apt
shell: bash
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
- name: Install oneAPI dpcpp and fortran compiler
shell: bash
run: |
sudo apt update
sudo apt install -y intel-oneapi-compiler-dpcpp-cpp
sudo apt install -y intel-oneapi-compiler-fortran
sudo apt install -y intel-oneapi-mpi-devel
- name: Install oneAPI MKL library
shell: bash
run: |
sudo apt install -y intel-oneapi-mkl-devel
- name: Test serial
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
./autogen.sh
./configure --enable-fortran CXX=dpcpp CC=icx FC=ifx
make -j
make check -j
sudo make install
sudo make uninstall
- name: Test parallel
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
./autogen.sh
./configure --enable-fortran --enable-parallel CXX=mpiicpc CC=mpiicc FC=mpiifort
make -j
make check -j
sudo make install
sudo make uninstall
78 changes: 78 additions & 0 deletions .github/workflows/linux-icx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: linux CMake icx

on:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: add oneAPI to apt
shell: bash
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
- name: install oneAPI dpcpp and fortran compiler
shell: bash
run: |
sudo apt update
sudo apt install -y intel-oneapi-compiler-dpcpp-cpp
sudo apt install -y intel-oneapi-compiler-fortran
sudo apt install -y intel-oneapi-mpi-devel
- name: install oneAPI MKL library
shell: bash
run: |
sudo apt install -y intel-oneapi-mkl-devel
- name: configure
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
cmake -S . -B build \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX=install \
-DHDF5_BUILD_FORTRAN=ON \
-DHDF5_ENABLE_PARALLEL=ON \
-DHDF5_BUILD_HL_LIB=ON \
-DCMAKE_CXX_COMPILER=dpcpp \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_Fortran_COMPILER=ifx \
-DMKL_ROOT="/opt/intel/oneapi/mkl/latest" \
-DTBB_ROOT="/opt/intel/oneapi/tbb/latest"
- name: build
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
cmake --build build
- name: test
shell: bash
run: |
source /opt/intel/oneapi/setvars.sh
export SYCL_DEVICE_FILTER=opencl.cpu
ctest --test-dir build --output-on-failure
sudo cmake --install .

0 comments on commit 9191944

Please sign in to comment.