From 02428c5b8f19a31faf2e9b719da89700126cb35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:02:35 -0600 Subject: [PATCH 01/11] Move Haskell based version to bootstrap/ --- Setup.hs => bootstrap/Setup.hs | 0 {app => bootstrap/app}/Main.hs | 0 package.yaml => bootstrap/package.yaml | 0 {src => bootstrap/src}/Build.hs | 0 {src => bootstrap/src}/Fpm.hs | 0 stack.yaml => bootstrap/stack.yaml | 0 stack.yaml.lock => bootstrap/stack.yaml.lock | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename Setup.hs => bootstrap/Setup.hs (100%) rename {app => bootstrap/app}/Main.hs (100%) rename package.yaml => bootstrap/package.yaml (100%) rename {src => bootstrap/src}/Build.hs (100%) rename {src => bootstrap/src}/Fpm.hs (100%) rename stack.yaml => bootstrap/stack.yaml (100%) rename stack.yaml.lock => bootstrap/stack.yaml.lock (100%) diff --git a/Setup.hs b/bootstrap/Setup.hs similarity index 100% rename from Setup.hs rename to bootstrap/Setup.hs diff --git a/app/Main.hs b/bootstrap/app/Main.hs similarity index 100% rename from app/Main.hs rename to bootstrap/app/Main.hs diff --git a/package.yaml b/bootstrap/package.yaml similarity index 100% rename from package.yaml rename to bootstrap/package.yaml diff --git a/src/Build.hs b/bootstrap/src/Build.hs similarity index 100% rename from src/Build.hs rename to bootstrap/src/Build.hs diff --git a/src/Fpm.hs b/bootstrap/src/Fpm.hs similarity index 100% rename from src/Fpm.hs rename to bootstrap/src/Fpm.hs diff --git a/stack.yaml b/bootstrap/stack.yaml similarity index 100% rename from stack.yaml rename to bootstrap/stack.yaml diff --git a/stack.yaml.lock b/bootstrap/stack.yaml.lock similarity index 100% rename from stack.yaml.lock rename to bootstrap/stack.yaml.lock From c48caf28ae84da0cfa1beca49bd54076ace3e192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:03:59 -0600 Subject: [PATCH 02/11] Update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca629b8e74..54244fad0c 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: From 87d0320a51381b05d3c04db8b6c663d5741f888a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:05:39 -0600 Subject: [PATCH 03/11] Update paths in package.yaml --- bootstrap/package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap/package.yaml b/bootstrap/package.yaml index 7cf11c6dc2..ec5ecf2f00 100644 --- a/bootstrap/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 From f9bef4a6f5f68bab6fe22cefee0fed3f16bbf635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:07:11 -0600 Subject: [PATCH 04/11] Add a link to the test directory --- bootstrap/test | 1 + 1 file changed, 1 insertion(+) create mode 120000 bootstrap/test diff --git a/bootstrap/test b/bootstrap/test new file mode 120000 index 0000000000..419df4f96d --- /dev/null +++ b/bootstrap/test @@ -0,0 +1 @@ +../test \ No newline at end of file From 928d50e1564ae74b7cf0f420f6f581aeea86dd57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:09:42 -0600 Subject: [PATCH 05/11] Update CI --- .github/workflows/CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ca1ba0340c..fd2d9b18b5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,8 +63,10 @@ jobs: - name: Build run: | + cd bootstrap stack build - name: Run tests run: | + cd bootstrap stack test From f5be437dbee6578b3012deb69090e4b3757aa778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:16:57 -0600 Subject: [PATCH 06/11] Add initial Fortran based fpm Generated using fpm new --with-executable fpm rm -rf fpm/.git rm -rf fpm/.gitignore --- fpm/README.md | 3 +++ fpm/app/main.f90 | 7 +++++++ fpm/fpm.toml | 6 ++++++ fpm/src/fpm.f90 | 10 ++++++++++ 4 files changed, 26 insertions(+) create mode 100644 fpm/README.md create mode 100644 fpm/app/main.f90 create mode 100644 fpm/fpm.toml create mode 100644 fpm/src/fpm.f90 diff --git a/fpm/README.md b/fpm/README.md new file mode 100644 index 0000000000..e412d68a60 --- /dev/null +++ b/fpm/README.md @@ -0,0 +1,3 @@ +# fpm + +My cool new project! diff --git a/fpm/app/main.f90 b/fpm/app/main.f90 new file mode 100644 index 0000000000..0f03e95b49 --- /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 0000000000..34a32ad6bc --- /dev/null +++ b/fpm/fpm.toml @@ -0,0 +1,6 @@ +name = "fpm" +version = "0.1.0" +license = "license" +author = "Jane Doe" +maintainer = "jane.doe@example.com" +copyright = "2020 Jane Doe" diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90 new file mode 100644 index 0000000000..d5403194a0 --- /dev/null +++ b/fpm/src/fpm.f90 @@ -0,0 +1,10 @@ +module fpm + implicit none + private + + public :: say_hello +contains + subroutine say_hello + print *, "Hello, fpm!" + end subroutine say_hello +end module fpm From a807b644304ab18fc2943ad0e237b362c22e7e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:20:34 -0600 Subject: [PATCH 07/11] Update README and fpm.toml --- fpm/README.md | 5 +++-- fpm/fpm.toml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/fpm/README.md b/fpm/README.md index e412d68a60..d993787fa2 100644 --- a/fpm/README.md +++ b/fpm/README.md @@ -1,3 +1,4 @@ -# fpm +# Fortran Package Manager -My cool new project! +This is the Fortran Package Manager, implemented in Fortran as an fpm package. +Use fpm to build it. diff --git a/fpm/fpm.toml b/fpm/fpm.toml index 34a32ad6bc..c07eeba305 100644 --- a/fpm/fpm.toml +++ b/fpm/fpm.toml @@ -1,6 +1,6 @@ name = "fpm" version = "0.1.0" -license = "license" -author = "Jane Doe" -maintainer = "jane.doe@example.com" -copyright = "2020 Jane Doe" +license = "MIT" +author = "fpm maintainers" +maintainer = "" +copyright = "2020 fpm contributors" From 5adfb0741c5c0acccbc046a48501ab28a290c1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 09:21:30 -0600 Subject: [PATCH 08/11] Print initial text --- fpm/src/fpm.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90 index d5403194a0..0d1e6bf512 100644 --- a/fpm/src/fpm.f90 +++ b/fpm/src/fpm.f90 @@ -5,6 +5,6 @@ module fpm public :: say_hello contains subroutine say_hello - print *, "Hello, fpm!" + print *, "Fortran Package Manager (fpm)" end subroutine say_hello end module fpm From 3f9dcf1b12b4221392e2a212e3220340ca15e6ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 11:53:41 -0600 Subject: [PATCH 09/11] CI: build and run the Fortran based fpm --- .github/workflows/CI.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fd2d9b18b5..32ead94aa1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -61,12 +61,19 @@ 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: Run tests on Haskell fpm run: | cd bootstrap stack test + + - name: Build and run Fortran fpm + run: | + cd fpm + fpm build + fpm run From f3fb461f1e89ad351bf8d28eb16ff7f98fc23895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 12:03:05 -0600 Subject: [PATCH 10/11] CI: put fpm to $PATH on macOS --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 32ead94aa1..ec1afdab01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -67,6 +67,11 @@ jobs: stack build stack install + - name: macOS: put fpm to PATH + if: contains(matrix.os, 'macos') + run: | + cp /Users/runner/.local/bin/fpm /usr/local/bin + - name: Run tests on Haskell fpm run: | cd bootstrap From 55d59057173235daac3eee96de78b0b35412d0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 21 Jul 2020 12:24:15 -0600 Subject: [PATCH 11/11] Put fpm to PATH on Windows --- .github/workflows/CI.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ec1afdab01..f4e2878389 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -67,11 +67,16 @@ jobs: stack build stack install - - name: macOS: put fpm to PATH + - 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