summaryrefslogtreecommitdiffstats
path: root/.github/workflows/intel-auto.yml
blob: 8f767e7824bda8e8d3632b58fb01d2ae36a5a4dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: hdf5 dev autotools icx

on:
  workflow_call:
    inputs:
      build_mode:
        description: "release vs. debug build"
        required: true
        type: string

permissions:
  contents: read

jobs:
  intel_oneapi_linux:
    name: "linux-oneapi ${{ inputs.build_mode }}"
    runs-on: ubuntu-latest
    steps:
      - name: Get Sources
        uses: actions/checkout@v4.1.1

      - name: Install Dependencies
        shell: bash
        run: |
          sudo apt-get update
          sudo apt-get install autoconf automake libtool libtool-bin libaec-dev

      - name: Install oneAPI (Linux)
        uses: fortran-lang/setup-fortran@v1
        id: setup-fortran
        with:
          compiler: intel
          version: '2024.0'

      - name: Autotools Configure
        shell: bash
        env:
          FC: ${{ steps.setup-fortran.outputs.fc }}
          CC: ${{ steps.setup-fortran.outputs.cc }}
          CXX: ${{ steps.setup-fortran.outputs.cxx }}
        run: |
          sh ./autogen.sh
          mkdir "${{ runner.workspace }}/build"
          cd "${{ runner.workspace }}/build"
          $GITHUB_WORKSPACE/configure \
            --enable-build-mode=${{ inputs.build_mode }} \
            --enable-shared \
            --disable-fortran

      - name: Autotools Build
        shell: bash
        env:
          FC: ${{ steps.setup-fortran.outputs.fc }}
          CC: ${{ steps.setup-fortran.outputs.cc }}
          CXX: ${{ steps.setup-fortran.outputs.cxx }}
        run: |
          make -j3
        working-directory: ${{ runner.workspace }}/build

      - name: Autotools Run Tests
        shell: bash
        env:
          FC: ${{ steps.setup-fortran.outputs.fc }}
          CC: ${{ steps.setup-fortran.outputs.cc }}
          CXX: ${{ steps.setup-fortran.outputs.cxx }}
        run: |
          make check -j2
        working-directory: ${{ runner.workspace }}/build

      - name: Autotools Install
        shell: bash
        env:
          FC: ${{ steps.setup-fortran.outputs.fc }}
          CC: ${{ steps.setup-fortran.outputs.cc }}
          CXX: ${{ steps.setup-fortran.outputs.cxx }}
        run: |
          make install
        working-directory: ${{ runner.workspace }}/build

      - name: Autotools Verify Install
        shell: bash
        env:
          FC: ${{ steps.setup-fortran.outputs.fc }}
          CC: ${{ steps.setup-fortran.outputs.cc }}
          CXX: ${{ steps.setup-fortran.outputs.cxx }}
        run: |
          make check-install
        working-directory: ${{ runner.workspace }}/build