Skip to content

Commit db4f1f0

Browse files
authored
Merge branch 'main' into custom-path-to-config
2 parents de1fcdd + d3dd5d4 commit db4f1f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+6112
-433
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/CI.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest, macos-11, windows-latest]
25-
gcc_v: [10] # Version of GFortran we want to use.
25+
gcc_v: [10,11,12,13] # Version of GFortran we want to use.
2626
include:
2727
- os: ubuntu-latest
2828
os-arch: linux-x86_64
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Checkout code
46-
uses: actions/checkout@v1
46+
uses: actions/checkout@v4
4747

4848
- name: Install GFortran macOS
4949
if: contains(matrix.os, 'macos')
@@ -81,7 +81,7 @@ jobs:
8181

8282
# Phase 1: Bootstrap fpm with existing version
8383
- name: Install fpm
84-
uses: fortran-lang/setup-fpm@v3
84+
uses: fortran-lang/setup-fpm@v5
8585
with:
8686
fpm-version: 'v0.8.0'
8787

@@ -194,7 +194,7 @@ jobs:
194194
- build
195195

196196
steps:
197-
- uses: actions/checkout@v2
197+
- uses: actions/checkout@v4
198198

199199
- name: Download Artifacts
200200
uses: actions/download-artifact@v2
@@ -277,7 +277,7 @@ jobs:
277277
env:
278278
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH && contains(github.ref, secrets.DEPLOY_BRANCH) && 1 || 0 }}
279279

280-
- uses: actions/checkout@v2
280+
- uses: actions/checkout@v4
281281
if: ${{ github.event_name == 'push' }}
282282

283283
- name: Download Artifacts

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
build-and-deploy:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v1
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
1111
with:
1212
python-version: '3.x'
1313
- name: Install dependencies

.github/workflows/meta.yml

+16-20
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
mpi: openmpi
3636
- os: ubuntu-latest
3737
mpi: mpich
38-
- os: windows-latest
39-
mpi: msmpi
4038
- os: macos-latest
4139
mpi: openmpi
4240
- os: macos-latest
@@ -45,7 +43,7 @@ jobs:
4543

4644
steps:
4745
- name: Checkout code
48-
uses: actions/checkout@v1
46+
uses: actions/checkout@v4
4947

5048
- name: (Ubuntu) setup gcc version
5149
if: contains(matrix.os,'ubuntu')
@@ -69,7 +67,6 @@ jobs:
6967
wget
7068
unzip
7169
curl
72-
gcc-fortran
7370
7471
- name: (Windows) Setup VS Build environment
7572
if: contains(matrix.os,'windows') && contains(matrix.mpi,'intel')
@@ -87,7 +84,7 @@ jobs:
8784
Remove-Item "oneAPI" -Force -Recurse
8885
8986
- name: (Ubuntu) Install gfortran
90-
if: contains(matrix.os,'ubuntu') && (!contains(matrix.mpi,'intel'))
87+
if: contains(matrix.os,'ubuntu')
9188
run: |
9289
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
9390
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
@@ -107,16 +104,14 @@ jobs:
107104
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
108105
timeout-minutes: 1
109106
run: |
110-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
111-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
112-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
113-
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
107+
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
108+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
114109
sudo apt-get update
115110
116111
- name: (Ubuntu) Install Intel oneAPI
117112
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
118-
timeout-minutes: 5
119-
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi intel-oneapi-mpi-devel intel-oneapi-mkl ninja-build
113+
timeout-minutes: 15
114+
run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2023.1.0 intel-oneapi-compiler-fortran-2023.1.0 intel-oneapi-mpi-devel ninja-build
120115

121116
- name: (Ubuntu) Setup Intel oneAPI environment
122117
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
@@ -153,6 +148,7 @@ jobs:
153148
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
154149
run: |
155150
echo "C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
151+
echo "/c/Program Files/Microsoft MPI/Bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
156152
echo "MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_ENV -Append
157153
158154
- name: (Windows) load OneAPI environment variables
@@ -203,7 +199,7 @@ jobs:
203199
204200
# Phase 1: Bootstrap fpm with existing version
205201
- name: Install fpm
206-
uses: fortran-lang/setup-fpm@v3
202+
uses: fortran-lang/setup-fpm@v5
207203
with:
208204
fpm-version: 'v0.8.0'
209205

@@ -213,14 +209,6 @@ jobs:
213209
mv $(which fpm) fpm-bootstrap${{ matrix.exe }}
214210
echo "BOOTSTRAP=$PWD/fpm-bootstrap" >> $GITHUB_ENV
215211
216-
- name: Use Intel compiler for the metapackage tests
217-
if: contains(matrix.mpi,'intel')
218-
shell: bash
219-
run: |
220-
echo "FPM_FC=ifort" >> $GITHUB_ENV
221-
echo "FPM_CC=icc" >> $GITHUB_ENV
222-
echo "FPM_CXX=icpc" >> $GITHUB_ENV
223-
224212
- name: (macOS) Use gcc/g++ instead of Clang for C/C++
225213
if: contains(matrix.os,'macOS')
226214
shell: bash
@@ -304,6 +292,14 @@ jobs:
304292
env:
305293
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}${{ matrix.exe }}
306294

295+
- name: Use Intel compiler for the metapackage tests
296+
if: contains(matrix.mpi,'intel')
297+
shell: bash
298+
run: |
299+
echo "FPM_FC=ifx" >> $GITHUB_ENV
300+
echo "FPM_CC=icx" >> $GITHUB_ENV
301+
echo "FPM_CXX=icpx" >> $GITHUB_ENV
302+
307303
- name: Run metapackage tests using the release version
308304
shell: bash
309305
run: |

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
FORMAT: ${{ matrix.format }}
1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout code
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848
with:
4949
fetch-depth: 0
5050

@@ -67,7 +67,7 @@ jobs:
6767
patch -p1 < ./ci/single-file.patch
6868
6969
- name: Install fpm
70-
uses: fortran-lang/setup-fpm@v3
70+
uses: fortran-lang/setup-fpm@v5
7171
with:
7272
fpm-version: 'v0.8.0'
7373

@@ -124,7 +124,7 @@ jobs:
124124
env:
125125
DEPLOY_BRANCH: ${{ secrets.DEPLOY_BRANCH && contains(github.ref, secrets.DEPLOY_BRANCH) && 1 || 0 }}
126126

127-
- uses: actions/checkout@v2
127+
- uses: actions/checkout@v4
128128
if: ${{ github.event_name == 'push' }}
129129

130130
- name: Download Artifacts

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ non-Fortran related package manager.
3333

3434
**Website: <https://fpm.fortran-lang.org/>**
3535

36-
## [Download](https://fpm.fortran-lang.org/en/install/index.html)
36+
## [Download](https://fpm.fortran-lang.org/install/index.html)
3737

3838
Fpm is available on many platforms and through multiple package managers, see our Documentation
39-
webpage for a list of **[All Supported Installations](https://fpm.fortran-lang.org/en/install/index.html)**.
39+
webpage for a list of **[All Supported Installations](https://fpm.fortran-lang.org/install/index.html)**.
4040

4141
The easiest installation routes are shown below.
4242

@@ -86,9 +86,9 @@ Binary distributions are available for MacOS 11 (Catalina) and 12 (Big Sur) for
8686
Fpm should be available and functional after those steps.
8787
For more details checkout the tap [here](https://github.com/fortran-lang/homebrew-fortran).
8888

89-
## [Get started](https://fpm.fortran-lang.org/en/tutorial/index.html)
89+
## [Get started](https://fpm.fortran-lang.org/tutorial/index.html)
9090

91-
**Follow our [Quickstart Tutorial](https://fpm.fortran-lang.org/en/tutorial/hello-fpm.html) to get familiar with fpm**.
91+
**Follow our [Quickstart Tutorial](https://fpm.fortran-lang.org/tutorial/hello-fpm.html) to get familiar with fpm**.
9292

9393
### Start a new project
9494

@@ -118,7 +118,7 @@ arguments can also be passed to the executable(s) or test(s) with the option
118118
`-- some arguments`.
119119

120120
See additional instructions in the [Packaging guide](PACKAGING.md) or
121-
the [manifest reference](https://fpm.fortran-lang.org/en/spec/manifest.html).
121+
the [manifest reference](https://fpm.fortran-lang.org/spec/manifest.html).
122122

123123
<!--
124124
### Bootstrapping instructions

app/main.f90

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ program main
44
fpm_cmd_settings, &
55
fpm_new_settings, &
66
fpm_build_settings, &
7+
fpm_export_settings, &
78
fpm_run_settings, &
89
fpm_test_settings, &
910
fpm_install_settings, &
@@ -15,6 +16,7 @@ program main
1516
use fpm_filesystem, only: exists, parent_dir, join_path
1617
use fpm, only: cmd_build, cmd_run, cmd_clean
1718
use fpm_cmd_install, only: cmd_install
19+
use fpm_cmd_export, only: cmd_export
1820
use fpm_cmd_new, only: cmd_new
1921
use fpm_cmd_update, only : cmd_update
2022
use fpm_cmd_publish, only: cmd_publish
@@ -76,6 +78,8 @@ program main
7678
call cmd_run(settings,test=.false.)
7779
type is (fpm_test_settings)
7880
call cmd_run(settings,test=.true.)
81+
type is (fpm_export_settings)
82+
call cmd_export(settings)
7983
type is (fpm_install_settings)
8084
call cmd_install(settings)
8185
type is (fpm_update_settings)

ci/run_tests.sh

+8
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ pushd preprocess_cpp_deps
150150
"$fpm" build
151151
popd
152152

153+
pushd preprocess_cpp_suffix
154+
"$fpm" run
155+
popd
156+
157+
pushd preprocess_per_dependency
158+
"$fpm" run
159+
popd
160+
153161
pushd preprocess_hello
154162
"$fpm" build
155163
popd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
program test_preprocess_suffix
2+
use preprocess_cpp
3+
#ifndef TESTMACRO
4+
stop -1
5+
#else
6+
stop 0
7+
#endif
8+
end program test_preprocess_suffix
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name = "preprocess_cpp_suffix"
2+
version = "1"
3+
4+
[preprocess]
5+
[preprocess.cpp]
6+
macros = ["TESTMACRO", "TESTMACRO2=3", "TESTMACRO3={version}"]
7+
suffixes = ["fpp"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module preprocess_cpp
2+
implicit none
3+
private
4+
5+
public :: say_hello
6+
contains
7+
subroutine say_hello
8+
print *, "Hello, preprocess_cpp!"
9+
#ifndef TESTMACRO
10+
This breaks the build.
11+
#endif
12+
13+
#if TESTMACRO2 != 3
14+
This breaks the build.
15+
#endif
16+
17+
#if TESTMACRO3 != 1
18+
This breaks the build.
19+
#endif
20+
21+
end subroutine say_hello
22+
end module preprocess_cpp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
program hello_fpm
2+
use utils, only: say_hello
3+
integer :: ierr
4+
5+
call say_hello(ierr)
6+
stop ierr ! ierr==0 if DEPENDENCY_MACRO is defined
7+
8+
end program hello_fpm
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = "utils"
2+
3+
[preprocess]
4+
[preprocess.cpp]
5+
macros = ["X=1"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module utils
2+
3+
implicit none
4+
5+
contains
6+
7+
subroutine say_hello(ierr)
8+
integer, intent(out) :: ierr
9+
10+
ierr = -1
11+
#ifdef DEPENDENCY_MACRO
12+
ierr = 0
13+
#endif
14+
15+
print *, "Dependency macro ", merge(" IS","NOT",ierr==0)," defined"
16+
17+
end subroutine say_hello
18+
19+
end module utils
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name = "preprocess_cpp_deps"
2+
3+
[dependencies]
4+
utils = { path = "crate/utils" , preprocess.cpp.macros=["DEPENDENCY_MACRO"] }

fpm.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "fpm"
2-
version = "0.9.0"
2+
version = "0.10.1"
33
license = "MIT"
44
author = "fpm maintainers"
55
maintainer = ""
@@ -17,7 +17,9 @@ M_CLI2.rev = "7264878cdb1baff7323cc48596d829ccfe7751b8"
1717
fortran-regex.git = "https://github.com/perazz/fortran-regex"
1818
fortran-regex.tag = "1.1.2"
1919
jonquil.git = "https://github.com/toml-f/jonquil"
20-
jonquil.rev = "4c27c8c1e411fa8790dffcf8c3fa7a27b6322273"
20+
jonquil.rev = "4fbd4cf34d577c0fd25e32667ee9e41bf231ece8"
21+
fortran-shlex.git = "https://github.com/perazz/fortran-shlex"
22+
fortran-shlex.tag = "1.0.1"
2123

2224
[[test]]
2325
name = "cli-test"

install.sh

100644100755
File mode changed.

manifest-reference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 301 - Moved
22

3-
This document now lives at https://fpm.fortran-lang.org/en/spec/manifest.html.
3+
This document now lives at https://fpm.fortran-lang.org/spec/manifest.html

src/filesystem_utilities.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <sys/stat.h>
22
#include <dirent.h>
33

4-
#if defined(__APPLE__) && !defined(__aarch64__) && !defined(__POWERPC__)
4+
#if defined(__APPLE__) && !defined(__aarch64__) && !defined(__ppc__) && !defined(__i386__)
55
DIR * opendir$INODE64( const char * dirName );
66
struct dirent * readdir$INODE64( DIR * dir );
77
#define opendir opendir$INODE64

0 commit comments

Comments
 (0)