Skip to content

Commit 13e9b9e

Browse files
authored
Merge pull request #1 from LKedward/prune-haskell-only
Prune repository for Haskell only
2 parents 799fcac + 1d1ac6c commit 13e9b9e

File tree

124 files changed

+84
-16478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+84
-16478
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ on:
66
release:
77
types: [published]
88

9-
env:
10-
CI: "ON" # We can detect this in the build system and other vendors implement it
11-
HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker
12-
HOMEBREW_NO_AUTO_UPDATE: "ON"
13-
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
14-
HOMEBREW_NO_GITHUB_API: "ON"
15-
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
16-
RUST_BACKTRACE: "full" # Make Rust print full backtrace on error
17-
189
jobs:
1910
Build:
2011
runs-on: ${{ matrix.os }}
@@ -27,39 +18,18 @@ jobs:
2718
- os: ubuntu-latest
2819
STACK_CACHE: "/home/runner/.stack/"
2920
STACK_CACHE_VERSION: ""
30-
TEST_SCRIPT: ci/run_tests.sh
31-
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
32-
CHECK_VERSION_CMD: grep $(cat fpm_version)
33-
RELEASE_CMD: "cp -- fpm-$(cat fpm_version)-linux-x86_64"
34-
BOOTSTRAP_RELEASE_CMD: cp /home/runner/.local/bin/fpm fpm-haskell-$(cat fpm_version)-linux-x86_64
35-
HASH_CMD: ls fpm-*|xargs -i{} sh -c 'sha256sum $1 > $1.sha256' -- {}
36-
RELEASE_FLAGS: --flag --static --flag -g --flag -fbacktrace --flag -O3
3721

3822
- os: macos-latest
3923
STACK_CACHE: |
4024
/Users/runner/.stack/snapshots
4125
/Users/runner/.stack/setup-exe-src
4226
STACK_CACHE_VERSION: "v2"
43-
TEST_SCRIPT: ci/run_tests.sh
44-
GET_VERSION_CMD: echo ${{ github.ref }} | cut -dv -f2
45-
CHECK_VERSION_CMD: grep $(cat fpm_version)
46-
RELEASE_CMD: "cp -- fpm-$(cat fpm_version)-macos-x86_64"
47-
BOOTSTRAP_RELEASE_CMD: cp /Users/runner/.local/bin/fpm fpm-haskell-$(cat fpm_version)-macos-x86_64
48-
HASH_CMD: ls fpm-*|xargs -I{} sh -c 'shasum -a 256 $1 > $1.sha256' -- {}
49-
RELEASE_FLAGS: --flag -g --flag -fbacktrace --flag -O3
5027

5128
- os: windows-latest
5229
STACK_CACHE: |
5330
C:\Users\runneradmin\AppData\Roaming\stack
5431
C:\Users\runneradmin\AppData\Local\Programs\stack
5532
STACK_CACHE_VERSION: "v2"
56-
TEST_SCRIPT: ci\run_tests.bat
57-
GET_VERSION_CMD: ("${{ github.ref }}" -Split "v")[1]
58-
CHECK_VERSION_CMD: Select-String -Pattern Version | Where-Object { if ($_ -like -join("*",(Get-Content fpm_version),"*")) {echo $_} else {Throw} }
59-
RELEASE_CMD: copy -- (-join("fpm-",(Get-Content fpm_version),"-windows-x86_64.exe"))
60-
BOOTSTRAP_RELEASE_CMD: copy C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe (-join("fpm-haskell-",(Get-Content fpm_version),"-windows-x86_64.exe"))
61-
HASH_CMD: Get-ChildItem -File -Filter "fpm-*" | Foreach-Object {echo (Get-FileHash -Algorithm SHA256 $PSItem | Select-Object hash | Format-Table -HideTableHeaders | Out-String) > (-join($PSItem,".sha256"))}
62-
RELEASE_FLAGS: --flag --static --flag -g --flag -fbacktrace --flag -O3
6333

6434
env:
6535
FC: gfortran
@@ -82,12 +52,6 @@ jobs:
8252
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
8353
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
8454
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
85-
86-
- name: Get Time
87-
id: time
88-
uses: nanzm/[email protected]
89-
with:
90-
format: 'YYYY-MM'
9155
9256
- name: Setup github actions cache
9357
id: cache
@@ -96,60 +60,8 @@ jobs:
9660
path: ${{matrix.STACK_CACHE}}
9761
key: ${{ runner.os }}-${{ steps.time.outputs.time }}${{matrix.STACK_CACHE_VERSION}}
9862

99-
- name: Build Haskell fpm
63+
- name: Build and test Haskell fpm
10064
run: |
101-
cd bootstrap
10265
stack build
10366
stack install
104-
105-
- name: put fpm to PATH (macOS)
106-
if: contains(matrix.os, 'macos')
107-
run: |
108-
cp /Users/runner/.local/bin/fpm /usr/local/bin
109-
110-
- name: put fpm to PATH (Windows)
111-
if: contains(matrix.os, 'windows')
112-
run: |
113-
copy "C:\Users\runneradmin\AppData\Roaming\local\bin\fpm.exe" "C:\Program Files\Git\usr\bin"
114-
115-
- name: put fpm to PATH (Linux)
116-
if: contains(matrix.os, 'ubuntu')
117-
run: |
118-
sudo cp /home/runner/.local/bin/fpm /usr/local/bin
119-
120-
- name: Run tests on Haskell fpm
121-
run: |
122-
cd bootstrap
123-
stack test
124-
125-
- name: Build and test Fortran fpm
126-
run: ${{ matrix.TEST_SCRIPT }}
127-
128-
- name: Build and test Fortran fpm (release version)
129-
run: ${{ matrix.TEST_SCRIPT }} ${{ matrix.RELEASE_FLAGS }}
130-
131-
# ----- Upload binaries if creating a release -----
132-
- name: Check that fpm --version matches release tag
133-
if: github.event_name == 'release'
134-
run: |
135-
cd fpm
136-
${{ matrix.GET_VERSION_CMD }} > fpm_version
137-
fpm run -- "--version" | ${{ matrix.CHECK_VERSION_CMD }}
138-
139-
- name: Stage release files for upload
140-
if: github.event_name == 'release'
141-
run: |
142-
cd fpm
143-
fpm run ${{ matrix.RELEASE_FLAGS }} --runner ${{ matrix.RELEASE_CMD }}
144-
${{ matrix.BOOTSTRAP_RELEASE_CMD }}
145-
${{ matrix.HASH_CMD }}
146-
147-
- name: Upload assets
148-
if: github.event_name == 'release'
149-
uses: svenstaro/upload-release-action@v2
150-
with:
151-
repo_token: ${{ secrets.GITHUB_TOKEN }}
152-
file: fpm/fpm-*
153-
file_glob: true
154-
tag: ${{ github.ref }}
155-
overwrite: true
67+
stack test

.github/workflows/docs.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ requests.
99

1010
By contributing to *fpm*, you certify that you own or are allowed to share the
1111
content of your contribution under the
12-
[fpm license](https://github.com/fortran-lang/fpm/blob/master/LICENSE).
12+
[fpm license](LICENSE).
1313

1414
* [Style](#style)
1515
* [Reporting a bug](#reporting-a-bug)
@@ -33,7 +33,7 @@ Good bug reports are extremely valuable to us—thank you!
3333
Before opening a bug report:
3434

3535
1. Check if the issue has already been reported
36-
([issues](https://github.com/fortran-lang/fpm/issues)).
36+
([issues](https://github.com/fortran-lang/fpm-haskell/issues)).
3737
2. Check if it is still an issue or it has been fixed?
3838
Try to reproduce it with the latest version from the master branch.
3939
3. Isolate the problem and create a minimal test case.
@@ -64,7 +64,7 @@ It’s quite possible that we are not considering an unusually creative solution
6464
*fpm* is a community project. There is no one single person making final
6565
decisions. This is the workflow that we follow:
6666

67-
1. Open a [new issue](https://github.com/fortran-lang/fpm/issues/new) to
67+
1. Open a [new issue](https://github.com/fortran-lang/fpm-haskell/issues/new) to
6868
describe a bug or propose a new feature.
6969
Refer to the earlier sections on how to write a good bug report or feature
7070
request.
@@ -119,4 +119,4 @@ You can learn how from
119119

120120
Don’t know where to start?
121121
You can start by looking through the list of
122-
[open issues](https://github.com/fortran-lang/fpm/issues).
122+
[open issues](https://github.com/fortran-lang/fpm-haskell/issues).

ChangeLog.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 43 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Fortran Package Manager
1+
__This repository archives the legacy Haskell implementation of fpm and is not under active development.__
2+
3+
__See [fortran-lang/fpm](https://github.com/fortran-lang/fpm) for the active fpm implementation__
4+
5+
# Fortran Package Manager - Haskell
26

37
Fortran Package Manager (fpm) is a package manager and build system for Fortran.
48
Its key goal is to improve the user experience of Fortran programmers.
@@ -10,120 +14,64 @@ so if you're familiar with that tool, you will feel at home with fpm.
1014
Fpm's long term vision is to nurture and grow the ecosystem of modern Fortran
1115
applications and libraries.
1216

13-
Fpm is an early prototype and is evolving rapidly.
14-
You can use it to build and package your Fortran projects, as well as to use
15-
[existing fpm packages](https://github.com/fortran-lang/fpm-registry) as dependencies.
16-
Fpm's behavior and user interface may change as it evolves, however as fpm
17-
matures and we enter production, we will aim to stay backwards compatible.
18-
Please follow the [issues](https://github.com/fortran-lang/fpm/issues) to
19-
contribute and/or stay up to date with the development.
20-
Before opening a bug report or a feature suggestion, please read our
21-
[Contributor Guide](CONTRIBUTING.md). You can also discuss your ideas and queries with the community in [fpm discussions](https://github.com/fortran-lang/fpm/discussions), or more broadly on [Fortran-Lang Discourse](https://fortran-lang.discourse.group/)
22-
23-
Fortran Package Manager is not to be confused with
24-
[Jordan Sissel's fpm](https://github.com/jordansissel/fpm), a more general,
25-
non-Fortran related package manager.
26-
27-
## Getting started
28-
29-
### Setting up fpm
3017

31-
#### Binary download
32-
`x86-64` binaries are available [to download](https://github.com/fortran-lang/fpm/releases) for Windows, MacOS and Linux.
18+
## Building fpm-haskell
3319

34-
__Note:__ On Linux and MacOS, you will need to enable executable permission before you can use the binary.
20+
### Install Haskell
3521

36-
_e.g._ `$ chmod u+x fpm-v0.1.0-linux-x86_64`
22+
To install **Haskell Stack**, follow these [instructions](https://docs.haskellstack.org/en/stable/install_and_upgrade/),
23+
users without superuser (admin) permissions should follow the [manual installation](https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2) procedure.
3724

38-
#### Conda
25+
### Download this repository
3926

40-
Fpm is available on conda-forge, to add conda-forge to your channels use:
41-
42-
```
43-
conda config --add channels conda-forge
27+
```bash
28+
git clone https://github.com/fortran-lang/fpm-haskell
29+
cd fpm
4430
```
4531

46-
Fpm can be installed with:
32+
### Build and Test fpm
4733

34+
Build fpm using:
35+
```bash
36+
stack build
4837
```
49-
conda create -n fpm fpm
50-
conda activate fpm
38+
To test:
39+
```bash
40+
stack test
41+
```
42+
To install:
43+
```bash
44+
stack install
5145
```
5246

53-
The conda package manager can be installed from [miniforge](https://github.com/conda-forge/miniforge/releases)
54-
or from [miniconda](https://docs.conda.io/en/latest/miniconda.html).
55-
56-
#### Github Actions
57-
58-
To setup *fpm* within Github actions for automated testing, you can use the [fortran-lang/setup-fpm](https://github.com/marketplace/actions/setup-fpm) action.
59-
60-
#### Bootstraping on other platforms
47+
On Linux, the above command installs `fpm` to `${HOME}/.local/bin`.
6148

62-
For other platforms and architectures have a look at the [bootstrapping instructions](#bootstrapping-instructions).
49+
## Usage
6350

6451
### Creating a new project
6552

66-
Creating a new *fpm* project is as simple as running the command
67-
`fpm new project_name`. This will create a new folder in your current directory
68-
with the following contents and initialized as a git repository.
53+
Creating a new fpm project is as simple as running the command `fpm new project_name`.
54+
This will create a new folder in your current directory with the following contents
55+
and initialized as a git repository.
6956

70-
* `fpm.toml` with your projects name and some default standard meta-data
71-
* `README.md` with your projects name
72-
* `.gitignore`
73-
* `src/project_name.f90` with a simple hello world subroutine
74-
* `app/main.f90` (if `--with-executable` flag used) a program that calls the subroutine
75-
* `test/main.f90` (if `--with-test` flag used) an empty test program
57+
* `fpm.toml` with your project's name and some default standard meta-data
58+
* `README.md` with your project's name
59+
* `.gitgnore`
60+
* `src/project_name.f90` with a simple hello world subroutine
61+
* `app/main.f90` (if `--with-executable` flag used) a program that calls the subroutine
62+
* `test/main.f90` (if `--with-test` flag used) an empty test program
7663

77-
### Building your Fortran project with fpm
64+
## Building your Fortran project with fpm
7865

79-
*fpm* understands the basic commands:
66+
fpm understands the basic commands:
8067

81-
* `fpm build` build your library, executables and tests
82-
* `fpm run` run executables
83-
* `fpm test` run tests
68+
* `fpm build` - build your library, executables and tests
69+
* `fpm run` - run executables
70+
* `fpm test`- run tests
8471

8572
The command `fpm run` can optionally accept the name of the specific executable
86-
to run, as can `fpm test`; like `fpm run specific_executable`. Command line
73+
to run, as can `fpm test`; like `fpm run specifc_executable`. Command line
8774
arguments can also be passed to the executable(s) or test(s) with the option
88-
`-- some arguments`.
89-
90-
See additional instructions in the [Packaging guide](PACKAGING.md) or
91-
the [manifest reference](manifest-reference.md).
92-
93-
94-
### Bootstrapping instructions
75+
`--args "some arguments"`.
9576

96-
This guide explains the process of building *fpm* on a platform for the first time.
97-
If your platform and architecture are already supported, download the binary from the [release page](https://github.com/fortran-lang/fpm/releases) instead.
98-
99-
#### Download this repository
100-
101-
```bash
102-
$ git clone https://github.com/fortran-lang/fpm
103-
$ cd fpm/
104-
```
105-
106-
#### Build a bootstrap version of fpm
107-
108-
You can use the install script to bootstrap and install *fpm*:
109-
110-
```bash
111-
$ ./install.sh
112-
```
113-
114-
By default, the above command installs `fpm` to `${HOME}/.local/bin/`.
115-
To specify an alternative destination use the `--prefix=` flag, for example:
116-
117-
```bash
118-
$ ./install.sh --prefix=/usr/local
119-
```
120-
121-
which will install *fpm* to `/usr/local/bin`.
122-
123-
To test that everything is working as expected you can now build *fpm*
124-
with itself and run the tests with:
125-
126-
```bash
127-
$ cd fpm
128-
$ fpm test
129-
```
77+
See additional instructions in the [Packaging guide](PACKAGING.md).
File renamed without changes.
File renamed without changes.

bootstrap/test/example_packages

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)