1
+ name : fpm
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ gcc-build :
7
+ runs-on : ${{ matrix.os }}
8
+ strategy :
9
+ fail-fast : false
10
+ matrix :
11
+ os : [ubuntu-latest]
12
+ gcc_v : [10] # Version of GFortran we want to use.
13
+ include :
14
+ - os : ubuntu-latest
15
+ os-arch : linux-x86_64
16
+
17
+ env :
18
+ FC : gfortran
19
+ GCC_V : ${{ matrix.gcc_v }}
20
+
21
+ steps :
22
+ - name : Checkout code
23
+ uses : actions/checkout@v1
24
+
25
+ - name : Install GFortran macOS
26
+ if : contains(matrix.os, 'macos')
27
+ run : |
28
+ ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran
29
+ which gfortran-${GCC_V}
30
+ which gfortran
31
+
32
+ - name : Install GFortran Linux
33
+ if : contains(matrix.os, 'ubuntu')
34
+ run : |
35
+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
36
+ --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
37
+ --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
38
+
39
+ - name : Install fpm
40
+ uses : fortran-lang/setup-fpm@v3
41
+ with :
42
+ fpm-version : ' v0.10.0'
43
+
44
+ - name : Build the library
45
+ run : |
46
+ gfortran --version
47
+ fpm build
48
+
49
+ - name : Run tests
50
+ run : |
51
+ gfortran --version
52
+ fpm test
53
+
54
+ msys2-build :
55
+ runs-on : windows-latest
56
+ defaults :
57
+ run :
58
+ shell : msys2 {0}
59
+
60
+ steps :
61
+ - uses : actions/checkout@v2
62
+ - uses : msys2/setup-msys2@v2
63
+ with :
64
+ msystem : MINGW64
65
+ update : true
66
+ path-type : inherit
67
+ install : |
68
+ mingw-w64-x86_64-gcc-fortran
69
+ mingw-w64-x86_64-fpm
70
+ mingw-w64-x86_64-openblas
71
+ mingw-w64-x86_64-lapack
72
+
73
+ - name : fpm build
74
+ run : |
75
+ gfortran --version
76
+ fpm --version
77
+ fpm build
78
+
79
+ - name : fpm test
80
+ run : |
81
+ fpm test
82
+
83
+ intel-build :
84
+ runs-on : ubuntu-latest
85
+ strategy :
86
+ fail-fast : false
87
+
88
+ env :
89
+ FPM_FC : ifx
90
+ FC : ifx
91
+
92
+ steps :
93
+ - name : Checkout code
94
+ uses : actions/checkout@v3
95
+
96
+ - name : Add Intel repository (Linux)
97
+ run : |
98
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
99
+ sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
100
+ rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
101
+ echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
102
+ sudo apt-get update
103
+
104
+ - name : Install Intel oneAPI compiler (Linux)
105
+ run : |
106
+ sudo apt-get install intel-oneapi-compiler-fortran
107
+
108
+ - name : Setup Intel oneAPI environment
109
+ run : |
110
+ source /opt/intel/oneapi/setvars.sh
111
+ printenv >> $GITHUB_ENV
112
+
113
+ - name : Install fpm
114
+ uses : fortran-lang/setup-fpm@v3
115
+ with :
116
+ fpm-version : ' v0.10.0'
117
+
118
+ - name : fpm build
119
+ run : |
120
+ ifx --version
121
+ fpm --version
122
+ fpm build --profile debug --flag "-warn nointerfaces"
123
+
124
+ - name : fpm test
125
+ run : |
126
+ fpm test --profile debug --flag "-warn nointerfaces"
0 commit comments