Skip to content

Commit 2dcd2df

Browse files
authored
Merge pull request #131 from certik/f
Initial Fortran infrastructure
2 parents ac873ef + 55d5905 commit 2dcd2df

File tree

14 files changed

+53
-5
lines changed

14 files changed

+53
-5
lines changed

.github/workflows/CI.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,29 @@ jobs:
6161
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
6262
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
6363
64-
- name: Build
64+
- name: Build Haskell fpm
6565
run: |
66+
cd bootstrap
6667
stack build
68+
stack install
6769
68-
- name: Run tests
70+
- name: put fpm to PATH (macOS)
71+
if: contains(matrix.os, 'macos')
72+
run: |
73+
cp /Users/runner/.local/bin/fpm /usr/local/bin
74+
75+
- name: put fpm to PATH (Windows)
76+
if: contains(matrix.os, 'windows')
6977
run: |
78+
copy "C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe" "C:\Program Files\Git\usr\bin"
79+
80+
- name: Run tests on Haskell fpm
81+
run: |
82+
cd bootstrap
7083
stack test
84+
85+
- name: Build and run Fortran fpm
86+
run: |
87+
cd fpm
88+
fpm build
89+
fpm run

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ cd fpm
2828

2929
### Build and Test fpm
3030

31-
Build fpm using:
31+
Bootstrap fpm using:
3232
```bash
33+
cd bootstrap
3334
stack build
3435
```
3536
To test:
File renamed without changes.
File renamed without changes.

package.yaml renamed to bootstrap/package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ maintainer: "[email protected]"
77
copyright: "2020 Author name here"
88

99
extra-source-files:
10-
- README.md
11-
- ChangeLog.md
10+
- ../README.md
11+
- ../ChangeLog.md
1212

1313
# Metadata used when publishing your package
1414
# synopsis: Short description of your package
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

bootstrap/test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../test

fpm/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Fortran Package Manager
2+
3+
This is the Fortran Package Manager, implemented in Fortran as an fpm package.
4+
Use fpm to build it.

fpm/app/main.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
program main
2+
use fpm, only: say_hello
3+
4+
implicit none
5+
6+
call say_hello
7+
end program main

fpm/fpm.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name = "fpm"
2+
version = "0.1.0"
3+
license = "MIT"
4+
author = "fpm maintainers"
5+
maintainer = ""
6+
copyright = "2020 fpm contributors"

fpm/src/fpm.f90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module fpm
2+
implicit none
3+
private
4+
5+
public :: say_hello
6+
contains
7+
subroutine say_hello
8+
print *, "Fortran Package Manager (fpm)"
9+
end subroutine say_hello
10+
end module fpm

0 commit comments

Comments
 (0)