Test flang build

This commit is contained in:
Leonard Lausen 2020-06-09 06:25:45 +00:00
parent 430e8b45fe
commit 4cb1db0e3b
1 changed files with 27 additions and 5 deletions

View File

@ -9,6 +9,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]
fortran: [gfortran, flang]
build: [cmake, make] build: [cmake, make]
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -24,7 +25,7 @@ jobs:
# Restore any ccache cache entry, if none for # Restore any ccache cache entry, if none for
# ${{ runner.os }}-ccache-${{ github.sha }} exists # ${{ runner.os }}-ccache-${{ github.sha }} exists
restore-keys: | restore-keys: |
${{ runner.os }}-ccache ${{ runner.os }}-ccache-
- name: Print system information - name: Print system information
run: | run: |
@ -49,8 +50,8 @@ jobs:
fi fi
ccache -M 300M # Limit the ccache size; Github's overall cache limit is 5GB ccache -M 300M # Limit the ccache size; Github's overall cache limit is 5GB
- name: Build - name: gfortran build
if: matrix.build == 'make' if: matrix.build == 'make' && matrix.fortran == 'gfortran'
run: | run: |
if [ "$RUNNER_OS" == "Linux" ]; then if [ "$RUNNER_OS" == "Linux" ]; then
export PATH="/usr/lib/ccache:${PATH}" export PATH="/usr/lib/ccache:${PATH}"
@ -63,8 +64,29 @@ jobs:
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0
- name: CMake build - name: flang build
if: matrix.build == 'cmake' if: matrix.build == 'make' && matrix.fortran == 'flang'
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
export PATH="/usr/lib/ccache:${PATH}"
elif [ "$RUNNER_OS" == "macOS" ]; then
exit 0
else
echo "$RUNNER_OS not supported"
exit 1
fi
cd /usr/
sudo wget -nv https://github.com/flang-compiler/flang/releases/download/flang_20190329/flang-20190329-x86-70.tgz
sudo tar xf flang-20190329-x86-70.tgz
sudo rm flang-20190329-x86-70.tgz
cd -
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC=flang
- name: CMake gfortran build
if: matrix.build == 'cmake' && matrix.fortran == 'gfortran'
run: | run: |
if [ "$RUNNER_OS" == "Linux" ]; then if [ "$RUNNER_OS" == "Linux" ]; then
export PATH="/usr/lib/ccache:${PATH}" export PATH="/usr/lib/ccache:${PATH}"