aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-07-21 13:29:32 -0600
committerGitHub <noreply@github.com>2020-07-21 13:29:32 -0600
commit2dcd2df3692b8769558428ae0ae77d15fcc804f4 (patch)
tree58b1c7ce207d83d9801f743bcc8e213a2f631a3a
parentac873ef55037b554019a04ffc1f104d8d0a7b0f5 (diff)
parent55d59057173235daac3eee96de78b0b35412d0e6 (diff)
downloadfpm-2dcd2df3692b8769558428ae0ae77d15fcc804f4.tar.gz
fpm-2dcd2df3692b8769558428ae0ae77d15fcc804f4.zip
Merge pull request #131 from certik/f
Initial Fortran infrastructure
-rw-r--r--.github/workflows/CI.yml23
-rw-r--r--README.md3
-rw-r--r--bootstrap/Setup.hs (renamed from Setup.hs)0
-rw-r--r--bootstrap/app/Main.hs (renamed from app/Main.hs)0
-rw-r--r--bootstrap/package.yaml (renamed from package.yaml)4
-rw-r--r--bootstrap/src/Build.hs (renamed from src/Build.hs)0
-rw-r--r--bootstrap/src/Fpm.hs (renamed from src/Fpm.hs)0
-rw-r--r--bootstrap/stack.yaml (renamed from stack.yaml)0
-rw-r--r--bootstrap/stack.yaml.lock (renamed from stack.yaml.lock)0
l---------bootstrap/test1
-rw-r--r--fpm/README.md4
-rw-r--r--fpm/app/main.f907
-rw-r--r--fpm/fpm.toml6
-rw-r--r--fpm/src/fpm.f9010
14 files changed, 53 insertions, 5 deletions
diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index ca1ba03..f4e2878 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -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
diff --git a/README.md b/README.md
index ca629b8..54244fa 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,9 @@ cd fpm
### Build and Test fpm
-Build fpm using:
+Bootstrap fpm using:
```bash
+cd bootstrap
stack build
```
To test:
diff --git a/Setup.hs b/bootstrap/Setup.hs
index 9a994af..9a994af 100644
--- a/Setup.hs
+++ b/bootstrap/Setup.hs
diff --git a/app/Main.hs b/bootstrap/app/Main.hs
index 4897901..4897901 100644
--- a/app/Main.hs
+++ b/bootstrap/app/Main.hs
diff --git a/package.yaml b/bootstrap/package.yaml
index 7cf11c6..ec5ecf2 100644
--- a/package.yaml
+++ b/bootstrap/package.yaml
@@ -7,8 +7,8 @@ maintainer: "example@example.com"
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
diff --git a/src/Build.hs b/bootstrap/src/Build.hs
index ffbf264..ffbf264 100644
--- a/src/Build.hs
+++ b/bootstrap/src/Build.hs
diff --git a/src/Fpm.hs b/bootstrap/src/Fpm.hs
index 60f4aac..60f4aac 100644
--- a/src/Fpm.hs
+++ b/bootstrap/src/Fpm.hs
diff --git a/stack.yaml b/bootstrap/stack.yaml
index 68dcaaa..68dcaaa 100644
--- a/stack.yaml
+++ b/bootstrap/stack.yaml
diff --git a/stack.yaml.lock b/bootstrap/stack.yaml.lock
index 15bfc22..15bfc22 100644
--- a/stack.yaml.lock
+++ b/bootstrap/stack.yaml.lock
diff --git a/bootstrap/test b/bootstrap/test
new file mode 120000
index 0000000..419df4f
--- /dev/null
+++ b/bootstrap/test
@@ -0,0 +1 @@
+../test \ No newline at end of file
diff --git a/fpm/README.md b/fpm/README.md
new file mode 100644
index 0000000..d993787
--- /dev/null
+++ b/fpm/README.md
@@ -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.
diff --git a/fpm/app/main.f90 b/fpm/app/main.f90
new file mode 100644
index 0000000..0f03e95
--- /dev/null
+++ b/fpm/app/main.f90
@@ -0,0 +1,7 @@
+program main
+ use fpm, only: say_hello
+
+ implicit none
+
+ call say_hello
+end program main
diff --git a/fpm/fpm.toml b/fpm/fpm.toml
new file mode 100644
index 0000000..c07eeba
--- /dev/null
+++ b/fpm/fpm.toml
@@ -0,0 +1,6 @@
+name = "fpm"
+version = "0.1.0"
+license = "MIT"
+author = "fpm maintainers"
+maintainer = ""
+copyright = "2020 fpm contributors"
diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90
new file mode 100644
index 0000000..0d1e6bf
--- /dev/null
+++ b/fpm/src/fpm.f90
@@ -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