Skip to content

Commit 35130ad

Browse files
authored
Merge pull request #81 from sourceryinstitute/test-with-flang
test(CI): add flang build
2 parents 04bc9d8 + a9ec96b commit 35130ad

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# *** License Agreement ***
2+
#
3+
# Fiats Copyright (c) 2022-2025, The Regents of the University of
4+
# California, through Lawrence Berkeley National Laboratory (subject to
5+
# receipt of any required approvals from the U.S. Dept. of Energy).
6+
# All rights reserved.
7+
#
8+
# Redistribution and use in source and binary forms, with or without
9+
# modification, are permitted provided that the following conditions are met:
10+
#
11+
# (1) Redistributions of source code must retain the above copyright notice,
12+
# this list of conditions and the following disclaimer.
13+
#
14+
# (2) Redistributions in binary form must reproduce the above copyright
15+
# notice, this list of conditions and the following disclaimer in the
16+
# documentation and/or other materials provided with the distribution.
17+
#
18+
# (3) Neither the name of the University of California, Lawrence Berkeley
19+
# National Laboratory, U.S. Dept. of Energy nor the names of its contributors
20+
# may be used to endorse or promote products derived from this software
21+
# without specific prior written permission.
22+
#
23+
#
24+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34+
# POSSIBILITY OF SUCH DAMAGE.
35+
#
36+
# You are under no obligation whatsoever to provide any bug fixes, patches,
37+
# or upgrades to the features, functionality or performance of the source
38+
# code ("Enhancements") to anyone; however, if you choose to make your
39+
# Enhancements available either publicly, or directly to Lawrence Berkeley
40+
# National Laboratory, without imposing a separate written license agreement
41+
# for such Enhancements, then you hereby grant the following license: a
42+
# non-exclusive, royalty-free perpetual license to install, use, modify,
43+
# prepare derivative works, incorporate into other computer software,
44+
# distribute, and sublicense such enhancements or derivative works thereof,
45+
# in binary and source code form.
46+
47+
name: Build with LLVM Flang
48+
49+
on: [push, pull_request]
50+
51+
52+
jobs:
53+
Build:
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
matrix:
57+
os: [ubuntu-24.04]
58+
fail-fast: true
59+
container: gmao/llvm-flang:latest
60+
env:
61+
FC: flang-new
62+
CC: clang
63+
64+
steps:
65+
- name: Checkout code
66+
uses: actions/checkout@v3
67+
68+
- uses: fortran-lang/setup-fpm@main
69+
with:
70+
github-token: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- name: Build and Test with LLVM Flang
73+
if: contains(matrix.os, 'ubuntu')
74+
run: |
75+
fpm --version
76+
$FC --version
77+
$CC --version
78+
export FPM_FC=$FC
79+
export FPM_CC=$CC
80+
fpm test --flag "-mmlir -allow-assumed-rank -O3"

0 commit comments

Comments
 (0)