Skip to content

Initial Fortran infrastructure #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,29 @@ jobs:
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}

- name: Build
- name: Build Haskell fpm
run: |
cd bootstrap
stack build
stack install

- name: Run tests
- name: put fpm to PATH (macOS)
if: contains(matrix.os, 'macos')
run: |
cp /Users/runner/.local/bin/fpm /usr/local/bin

- name: put fpm to PATH (Windows)
if: contains(matrix.os, 'windows')
run: |
copy "C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe" "C:\Program Files\Git\usr\bin"

- name: Run tests on Haskell fpm
run: |
cd bootstrap
stack test

- name: Build and run Fortran fpm
run: |
cd fpm
fpm build
fpm run
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ cd fpm

### Build and Test fpm

Build fpm using:
Bootstrap fpm using:
```bash
cd bootstrap
stack build
```
To test:
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions package.yaml → bootstrap/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ maintainer: "[email protected]"
copyright: "2020 Author name here"

extra-source-files:
- README.md
- ChangeLog.md
- ../README.md
- ../ChangeLog.md

# Metadata used when publishing your package
# synopsis: Short description of your package
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions bootstrap/test
4 changes: 4 additions & 0 deletions fpm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fortran Package Manager

This is the Fortran Package Manager, implemented in Fortran as an fpm package.
Use fpm to build it.
7 changes: 7 additions & 0 deletions fpm/app/main.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
program main
use fpm, only: say_hello

implicit none

call say_hello
end program main
6 changes: 6 additions & 0 deletions fpm/fpm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name = "fpm"
version = "0.1.0"
license = "MIT"
author = "fpm maintainers"
maintainer = ""
copyright = "2020 fpm contributors"
10 changes: 10 additions & 0 deletions fpm/src/fpm.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module fpm
implicit none
private

public :: say_hello
contains
subroutine say_hello
print *, "Fortran Package Manager (fpm)"
end subroutine say_hello
end module fpm