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