diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ca1ba0340c..f4e2878389 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 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: 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 97% rename from package.yaml rename to bootstrap/package.yaml index 7cf11c6dc2..ec5ecf2f00 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 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 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 diff --git a/fpm/README.md b/fpm/README.md new file mode 100644 index 0000000000..d993787fa2 --- /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 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..c07eeba305 --- /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 0000000000..0d1e6bf512 --- /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