|
97 | 97 | strategy:
|
98 | 98 | fail-fast: false
|
99 | 99 | matrix:
|
100 |
| - os: [ubuntu-latest, macos-latest] |
| 100 | + os: [ubuntu-latest] |
| 101 | + fc: [ifx] |
| 102 | + cc: [icx] |
| 103 | + cxx: [icpx] |
| 104 | + env: |
| 105 | + FC: ${{ matrix.fc }} |
| 106 | + CC: ${{ matrix.cc }} |
| 107 | + CXX: ${{ matrix.cxx }} |
| 108 | + |
| 109 | + steps: |
| 110 | + - name: Checkout code |
| 111 | + uses: actions/checkout@v2 |
| 112 | + |
| 113 | + - name: Set up Python 3.x |
| 114 | + uses: actions/setup-python@v1 |
| 115 | + with: |
| 116 | + python-version: 3.x |
| 117 | + |
| 118 | + - name: Add Intel repository (Linux) |
| 119 | + if: contains(matrix.os, 'ubuntu') |
| 120 | + run: | |
| 121 | + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null |
| 122 | + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list |
| 123 | + sudo apt-get update |
| 124 | +
|
| 125 | + - name: Install Intel oneAPI compiler (Linux) |
| 126 | + if: contains(matrix.os, 'ubuntu') |
| 127 | + run: | |
| 128 | + sudo apt-get install intel-oneapi-compiler-fortran |
| 129 | + sudo apt-get install intel-oneapi-compiler-dpcpp-cpp |
| 130 | +
|
| 131 | + - name: Install Intel oneAPI compiler (OSX) |
| 132 | + if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true' |
| 133 | + run: | |
| 134 | + curl --output webimage.dmg --url "$URL" --retry 5 --retry-delay 5 |
| 135 | + hdiutil attach webimage.dmg |
| 136 | + if [ -z "$COMPONENTS" ]; then |
| 137 | + sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --eula=accept --continue-with-optional-error=yes --log-dir=. |
| 138 | + installer_exit_code=$? |
| 139 | + else |
| 140 | + sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --continue-with-optional-error=yes --log-dir=. |
| 141 | + installer_exit_code=$? |
| 142 | + fi |
| 143 | + hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet |
| 144 | + exit $installer_exit_code |
| 145 | +
|
| 146 | + - name: Setup Intel oneAPI environment |
| 147 | + run: | |
| 148 | + source /opt/intel/oneapi/setvars.sh |
| 149 | + printenv >> $GITHUB_ENV |
| 150 | +
|
| 151 | + - name: Install fypp |
| 152 | + run: pip install --upgrade fypp |
| 153 | + |
| 154 | + - name: Configure with CMake |
| 155 | + run: >- |
| 156 | + cmake -Wdev |
| 157 | + -DCMAKE_BUILD_TYPE=Release |
| 158 | + -DCMAKE_MAXIMUM_RANK:String=4 |
| 159 | + -DCMAKE_INSTALL_PREFIX=$PWD/_dist |
| 160 | + -S . -B build |
| 161 | +
|
| 162 | + - name: Build and compile |
| 163 | + run: cmake --build build |
| 164 | + |
| 165 | + - name: catch build fail |
| 166 | + run: cmake --build build --verbose --parallel 1 |
| 167 | + if: failure() |
| 168 | + |
| 169 | + - name: test |
| 170 | + run: ctest --parallel --output-on-failure --no-tests=error |
| 171 | + working-directory: build |
| 172 | + |
| 173 | + - name: Install project |
| 174 | + run: cmake --install build |
| 175 | + |
| 176 | + intel-build-osx: |
| 177 | + runs-on: ${{ matrix.os }} |
| 178 | + strategy: |
| 179 | + fail-fast: false |
| 180 | + matrix: |
| 181 | + os: [macos-latest] |
101 | 182 | fc: [ifort]
|
102 | 183 | cc: [icc]
|
103 | 184 | cxx: [icpc]
|
@@ -132,21 +213,6 @@ jobs:
|
132 | 213 | path: /opt/intel/oneapi
|
133 | 214 | key: install-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_FORTRAN_COMPONENTS }}
|
134 | 215 |
|
135 |
| - - name: Add Intel repository (Linux) |
136 |
| - if: contains(matrix.os, 'ubuntu') |
137 |
| - run: | |
138 |
| - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
139 |
| - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
140 |
| - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB |
141 |
| - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list |
142 |
| - sudo apt-get update |
143 |
| -
|
144 |
| - - name: Install Intel oneAPI compiler (Linux) |
145 |
| - if: contains(matrix.os, 'ubuntu') |
146 |
| - run: | |
147 |
| - sudo apt-get install intel-oneapi-compiler-fortran |
148 |
| - sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic |
149 |
| -
|
150 | 216 | - name: Install Intel oneAPI compiler (OSX)
|
151 | 217 | if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
|
152 | 218 | run: |
|
|
0 commit comments