name: ICX and IFX

on:
  push:
    branches:
      - main
  pull_request:

env:
  LINUX_CPP_COMPONENTS: intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
  LINUX_FORTRAN_COMPONENTS: intel-oneapi-compiler-fortran

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-24.04]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - name: Install Intel compilers
        uses: rscohn2/setup-oneapi@v0
        with:
          components: |
            icx
            ifx
      - name: Build and test libCEED
        run: |
          source /opt/intel/oneapi/setvars.sh
          export CC=icx CXX=icx FC=ifx
          export OPENMP=1
          make info
          make -j2
          PROVE_OPTS=-v make prove -j2

