Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace gfortran in CI with flang-new #200

Merged
merged 4 commits into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 11 additions & 26 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Build with LLVM Flang

on: [push, pull_request]

Expand All @@ -8,11 +8,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-12, ubuntu-24.04]
os: [ubuntu-24.04]
fail-fast: true
container: gmao/llvm-flang:latest
env:
FC: gfortran
GCC_V: 14
FC: flang-new
CC: clang

steps:
- name: Checkout code
Expand All @@ -22,28 +23,12 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Dependencies MacOS
if: contains(matrix.os, 'mac')
run: |
brew install gcc@${GCC_V}
sudo ln -s $(which gfortran-${GCC_V}) $(dirname $(which gfortran-${GCC_V}))/gfortran

- name: Install on Ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y build-essential gfortran-14 gcc-14 g++-14

- name: Build and Test MacOS
if: contains(matrix.os, 'mac')
run: |
export PATH="${HOME}/.local/bin:$PATH"
./setup.sh

- name: Build and Test Ubuntu
- name: Build and Test with LLVM Flang
if: contains(matrix.os, 'ubuntu')
run: |
fpm --version
export FPM_FC=gfortran-14
export FPM_CC=gcc-14
fpm test
$FC --version
$CC --version
export FPM_FC=$FC
export FPM_CC=$CC
fpm test --flag "-mmlir -allow-assumed-rank -O3"
Loading