Skip to content
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

fix: merge conflicts #1

Merged
merged 347 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
347 commits
Select commit Hold shift + click to select a range
43b670e
remove unnecessary verbosity
perazz Apr 21, 2023
8d6cc28
Revert "remove unnecessary verbosity"
perazz Apr 21, 2023
53719bf
fix run api
perazz Apr 21, 2023
b7c71e3
add ubuntu
perazz Apr 27, 2023
3632e1d
unix -fpp macro fix
perazz Apr 27, 2023
831f284
base ifort implementation
perazz Apr 27, 2023
ecc2916
bump fortran-regex to 1.1.2 due to ifort issue
perazz Apr 27, 2023
f738753
add 'runner' task
perazz Apr 27, 2023
60a33a2
simplify compiler path search
perazz Apr 27, 2023
c2d444b
remove compiler prefix for C, C++
perazz Apr 27, 2023
1cad824
fix linker flags for ifort with c/c++ main program
perazz Apr 27, 2023
929d9cf
Merge branch 'main' into metapackages
perazz Apr 27, 2023
f6e93ec
introduce ubuntu+intelmpi
perazz Apr 27, 2023
13850e6
install mpi sdk
perazz Apr 27, 2023
f2aec4b
install as sudo
perazz Apr 27, 2023
9b87b08
use Intel Classic action
perazz May 2, 2023
a319e80
use ifort compiler
perazz May 2, 2023
557b5f7
export custom compiler via `FPM_FC`
perazz May 2, 2023
0eb4f7f
Update meta.yml
perazz May 2, 2023
0499185
Update meta.yml
perazz May 2, 2023
cd3dd01
local env
perazz May 2, 2023
9feec04
Update meta.yml
perazz May 2, 2023
c17c3ff
Update meta.yml
perazz May 2, 2023
a5ba917
Update meta.yml
perazz May 2, 2023
0e24c34
use $FC
perazz May 2, 2023
1269d72
Update meta.yml
perazz May 2, 2023
20a3416
export all intel vars
perazz May 2, 2023
b426f34
IntelMPI: enable search via `I_MPI_ROOT`
perazz May 2, 2023
1330d84
use standard Intel compiler
perazz May 2, 2023
20d0b30
intel-classic 2023.0
perazz May 2, 2023
b403264
2022.0.2
perazz May 2, 2023
3d539e1
2021.1.1
perazz May 2, 2023
ef57e4f
install mpi
perazz May 2, 2023
eb02be5
install mpi as sudo
perazz May 2, 2023
9c8ff2f
download latest api
perazz May 2, 2023
ec2d800
ifort: export FPM compiler flags
perazz May 2, 2023
83bb67b
ifort compiler fixes: test_manifest.f90
perazz May 2, 2023
f7ee4fa
do not bootstrap FPM with Ifort
perazz May 2, 2023
0ce5e08
do not override $FPM_FC
perazz May 2, 2023
0c584cb
test ubuntu+openmpi
perazz May 2, 2023
c7e5a51
add verbosity
perazz May 2, 2023
f739665
request implicit typing
perazz May 2, 2023
9c2bc68
Update meta.yml
perazz May 2, 2023
c39ef5a
add feature flags to the linker
perazz May 2, 2023
a85c3bd
Revert "add feature flags to the linker"
perazz May 2, 2023
8efb375
restore mac builds
perazz May 2, 2023
82b992b
GCC: do not care about linker order
perazz May 2, 2023
8b992dc
intel crash fix
perazz May 2, 2023
ee3fb61
restore ubuntu openmpi
perazz May 2, 2023
83f6a79
C, C++ examples: add implicit features
perazz May 2, 2023
812edce
ubuntu MPICH
perazz May 2, 2023
cf986e3
print version line
perazz May 2, 2023
caf0dc1
wrap version string extractor
perazz May 2, 2023
25ac71f
fix linker library order for mac
perazz May 2, 2023
59c5dbd
start-group
perazz May 2, 2023
04a7024
activate windows + msmpi
perazz May 2, 2023
c958e37
cleanup debugging messages
perazz May 2, 2023
f724a26
test msmpi
perazz May 2, 2023
c608c96
cleanup
perazz May 2, 2023
4ca8e8d
try both which, where on WSL
perazz May 2, 2023
0ff6be9
fix verbose
perazz May 2, 2023
3feaae3
cleanup MPI wrapper function
perazz May 3, 2023
08ed7e6
regex version: move to `fpm_versioning`
perazz May 3, 2023
cd2a02f
remove_newline_characters: move to `fpm_strings`
perazz May 3, 2023
da1a585
test macOS only
perazz May 3, 2023
a0f0f59
env syntax
perazz May 3, 2023
fc580e3
restore MPICH+macOS, set gcc for C/C++
perazz May 3, 2023
d9aa848
remove link gfortran-10
perazz May 3, 2023
8a273e7
print version
perazz May 3, 2023
c1cfbd5
use all gcc-13 compilers
perazz May 3, 2023
c966c3d
missing $
perazz May 3, 2023
4766e1b
get_dos_path: move to `fpm_filesystem`
perazz May 3, 2023
9184cbf
dummy links to gcc-9 for bootstrapping
perazz May 3, 2023
0611616
fpm bootstrap needs gcc-10
perazz May 3, 2023
3d2f242
remove metapackages from the standard tests
perazz May 3, 2023
36770e5
restore other os/MPI configs
perazz May 3, 2023
8a3e375
gcc-13 not available on Ubuntu-latest
perazz May 3, 2023
beab356
switch GCC_V
perazz May 3, 2023
b695b70
Windows: also check in the default Microsoft MPI folder
perazz May 3, 2023
750f0d2
Implement wildcard `"*"`
perazz May 3, 2023
3ad4222
set MSMPI_BIN
perazz May 3, 2023
a707c00
remove return
perazz May 3, 2023
40f2522
fix MS-MPI 10.1.2 link
perazz May 3, 2023
2212c66
windows Intel CI init
perazz May 4, 2023
84202de
Update meta.yml
perazz May 4, 2023
6540d56
use intel action
perazz May 4, 2023
19e4c02
Update meta.yml
perazz May 4, 2023
a4ac1db
Download Intel OneAPI installer
perazz May 5, 2023
ace990e
finish installing, delete temp
perazz May 5, 2023
fc12ee9
Update meta.yml
perazz May 5, 2023
c75d990
install
perazz May 5, 2023
fb0ad93
add environment variables
perazz May 5, 2023
ebd2331
set Intel environment
perazz May 5, 2023
dd90f55
turn off Intel + Windows action for now
perazz May 6, 2023
fadc272
do not run fpm tests with Intel compiler here
perazz May 6, 2023
5cbc90a
Update meta.yml
perazz May 6, 2023
76b34ea
metapackage manifests shortened
perazz May 7, 2023
c350228
Address reviews
perazz May 11, 2023
aa96545
Merge branch 'main' into metapackages
perazz May 11, 2023
0b4ad66
merging fix
perazz May 11, 2023
2ebb568
(macOS) only install gfortran if not already available
perazz May 11, 2023
69f0650
use libgcc_s.1.1.dylib if libgcc_s.1.dylib not available (gcc>=13)
perazz May 11, 2023
f3b76a4
Update meta.yml
perazz May 11, 2023
2f497aa
macOS test
perazz May 11, 2023
4855192
Update meta.yml
perazz May 11, 2023
5d664a4
Update meta.yml
perazz May 11, 2023
2f1e3a9
fix link to gfortran
perazz May 11, 2023
02adf0f
restore all environments
perazz May 11, 2023
ce8334a
test windows only
perazz May 11, 2023
1db2549
increase line buffer length to Windows max
perazz May 11, 2023
9977834
restore all environments
perazz May 11, 2023
6ea9999
bump version to 0.8.2
perazz May 11, 2023
87bec7f
Release version 0.8.2
perazz May 11, 2023
79373b9
MS_MPI: make DOS path
perazz May 11, 2023
7dca2e8
add many checks
perazz May 11, 2023
0fcca0e
echo runner folder
perazz May 11, 2023
1a948be
refactor windows search
perazz May 11, 2023
bad1556
Update fpm_meta.f90
perazz May 11, 2023
f8e13ee
cleanup debugging prints
perazz May 11, 2023
5a16564
build: changed file ext to enable preprocessor (#911)
gnikit May 14, 2023
9ff4495
Use get_tmp_filename
May 15, 2023
2d9ef15
Merge pull request #912 from fortran-lang/not-get-tmp-from-env
minhqdao May 15, 2023
6abbde1
fallback to 0.8.0 if install.sh fails to fetch github
perazz May 15, 2023
b5f033d
`install.sh`: fallback to 0.8.0 if in trouble fetching github (#913)
perazz May 15, 2023
40b0c35
Return char* instead of int (#914)
minhqdao May 19, 2023
a3d689f
Fix failing tests with Intel compiler (#901)
perazz May 21, 2023
69d26bf
fortran-lang `minpack`
perazz May 25, 2023
f3f4d41
Merge branch 'main' into metapackages
perazz May 25, 2023
6d6411c
always search `.exe` runner versions
perazz May 25, 2023
24bdea2
Merge branch 'metapackages' of https://github.com/perazz/fpm into met…
perazz May 25, 2023
e7d7ac8
Clean up fpm help new and add --help and --version to fpm help publish
May 27, 2023
17fb88c
Rename --show-form-data to --show-upload-data
May 27, 2023
4aed890
Clean up fpm help list
May 27, 2023
2f2e471
Include steps in help
May 28, 2023
c3823ce
Check for non-empty token
May 28, 2023
a7097ae
Improve error message for git dependencies
May 28, 2023
41166f8
Add link to documentation for package usage
May 28, 2023
c5ab931
Require module-naming
May 28, 2023
757e003
Merge pull request #915 from fortran-lang/add-publish-to-fpm-help
minhqdao May 29, 2023
8eadf4a
Clean up code and delete file after use
May 29, 2023
9c64d18
Add dry run option, add tests
May 29, 2023
0115206
Add back return
May 29, 2023
0c860f2
Remove these these
May 30, 2023
91c425e
Add verbose mode and --token TOKEN to --dry-run example
May 30, 2023
4c0d5a6
Do not imply manual upload
May 30, 2023
cc7cedb
Only use one string
May 30, 2023
2e1e486
Metapackages (#859)
perazz May 31, 2023
1bae477
parse `non_intrinsic` and `intrinsic` `use`d modules
perazz Jun 1, 2023
0ae912b
tests for `non_intrinsic` parsing
perazz Jun 1, 2023
3780d2b
cleanup
perazz Jun 1, 2023
89f2004
add example package
perazz Jun 1, 2023
2dd4222
add to CI
perazz Jun 1, 2023
467eff4
fix use identification
perazz Jun 1, 2023
7f3f7ad
Update fpm_source_parsing.f90
perazz Jun 1, 2023
54528c6
fix intrinsic module parsing in the next line
perazz Jun 1, 2023
44d2b3c
cleanup
perazz Jun 1, 2023
c966c6b
search `%MSMPI%` also in `get_mpi_runner`
perazz Jun 2, 2023
c7c421a
Fpm release v0.9.0 (#922)
perazz Jun 2, 2023
08523b5
search MPI runner in `%MS_MPI%` and `PATH` also in `get_mpi_runner` …
perazz Jun 2, 2023
b20b3dc
Merge pull request #918 from fortran-lang/add-dry-run-to-publish
minhqdao Jun 3, 2023
a10bddb
allow overriding metapackages with standard deps
perazz Jun 8, 2023
f8c7282
fix logic
perazz Jun 8, 2023
9a46ce4
add metapackage overriding tests
perazz Jun 8, 2023
c80cdfd
add `mpi` and `mpi_f08` to the list of external modules
perazz Jun 8, 2023
c9072d9
MPI: add `mpi` and `mpi_f08` to the list of external modules (#930)
perazz Jun 8, 2023
e5a4562
Fix typo
Jun 9, 2023
92254f7
Merge pull request #932 from fortran-lang/fix-module-naming-typo
minhqdao Jun 9, 2023
1075f02
document run(3f) and markdown errata
urbanjost Jun 10, 2023
2ada9fa
start example directory
urbanjost Jun 10, 2023
69edccf
correct example
urbanjost Jun 10, 2023
98eb021
remove example/
urbanjost Jun 10, 2023
bd1a54d
Add developer documentation for run(3f) and example program (#933)
perazz Jun 10, 2023
6d33e74
Allow overriding metapackages with standard dependency syntax (#928)
perazz Jun 10, 2023
3c0bbcb
do not preprocess with `trim(adjustl(line))`
perazz Jun 11, 2023
af077f2
document arguments
perazz Jun 11, 2023
6e3ca2b
fix error messages in test
perazz Jun 11, 2023
fde7e7c
MPI: check run command only on `run` and `test` apps
perazz Jun 14, 2023
08dbd95
fix invalid verbosity
perazz Jun 14, 2023
0c68c36
remove verbosity
perazz Jun 14, 2023
535f5ff
Update src/fpm_meta.f90
perazz Jun 14, 2023
c020044
Parse `intrinsic` and `non_intrinsic` `use`d modules (#920)
perazz Jun 14, 2023
0e5ad5c
do not use `error` for mpi runner search
perazz Jun 14, 2023
32875ce
Merge branch 'mpi_runner_onrunonly' of https://github.com/perazz/fpm …
perazz Jun 14, 2023
83d0c4a
Add verbose output to git_archive
Jun 15, 2023
c983e48
Add verbose printout to package upload
Jun 15, 2023
ea7b0c7
Use deferred type parameter
Jun 15, 2023
faeba62
resolution for :
urbanjost Jun 16, 2023
b7e5613
resolution for :
urbanjost Jun 16, 2023
3827548
Merge branch 'main' of https://github.com/urbanjost/fpm into main
urbanjost Jun 16, 2023
b31bd0f
Merge branch 'main' of https://github.com/urbanjost/fpm into main
urbanjost Jun 16, 2023
813c5e8
Merge branch 'main' of https://github.com/urbanjost/fpm into main
urbanjost Jun 16, 2023
85bb164
Merge branch 'main' of https://github.com/urbanjost/fpm into main
urbanjost Jun 16, 2023
20f1d86
Merge branch 'main' of https://github.com/urbanjost/fpm into main
urbanjost Jun 16, 2023
bac6f60
Remove ENV_VARIABLE() as it duplicates the functionality of GET_ENV()
urbanjost Jun 16, 2023
f0337ab
change test_os.f90 accordingly
urbanjost Jun 16, 2023
969a452
Merge pull request #940 from fortran-lang/fix-convert-to-absolute-path
minhqdao Jun 17, 2023
40b7888
add `runner_args` to cli
perazz Jun 17, 2023
8485e94
add runner_command function
perazz Jun 17, 2023
4a515eb
Revert "add `runner_args` to cli"
perazz Jun 17, 2023
413073f
Revert "add runner_command function"
perazz Jun 17, 2023
86e3d18
add `runner-args` option
perazz Jun 17, 2023
d3c3a16
fix app args
perazz Jun 17, 2023
f4d9222
Remove arbitrary limit on width of input files, (#941)
perazz Jun 17, 2023
f3d2c13
Use run
Jun 17, 2023
533c9ea
Merge branch 'main' into add-verbose-outputs
Jun 17, 2023
21a71de
Do not initialize stat
Jun 17, 2023
1b38b98
Change verbose to echo
Jun 18, 2023
953c576
Nit
Jun 18, 2023
d69203e
use clang as the brew compiler
perazz Jun 18, 2023
e279d45
fix comment
perazz Jun 18, 2023
b937d64
Refactor
Jun 18, 2023
702ee64
try homebrew-no-auto-update
perazz Jun 18, 2023
2a4dba5
make all homebrew variables `1` instead of `"ON"`
perazz Jun 18, 2023
be67bc6
do not check installed dependents
perazz Jun 18, 2023
e70422f
Merge pull request #946 from fortran-lang/just-refactorings
minhqdao Jun 19, 2023
9be4b9c
Merge branch 'main' into add-verbose-outputs
Jun 19, 2023
210aafc
use `clang` in lieu of `gcc` as C compiler for homebrew-openmpi actio…
perazz Jun 19, 2023
50d3187
Merge branch 'main' into dupenv
perazz Jun 19, 2023
bf88610
fpm_filesystem.F90: fix broken resolve conflicts
perazz Jun 19, 2023
5333702
Remove ENV_VARIABLE() as it duplicates the functionality of GET_ENV()…
perazz Jun 19, 2023
16221b1
Merge pull request #938 from fortran-lang/add-verbose-outputs
minhqdao Jun 19, 2023
16aca47
update jonquil version
urbanjost Jun 21, 2023
33adb0e
Update jonquil version to prevent out-of-bounds error (#947)
perazz Jun 21, 2023
f87fac1
Clean up clean command
Jun 21, 2023
ee397ac
Merge pull request #948 from fortran-lang/clean-up-clean-command
minhqdao Jun 22, 2023
d8efee4
Merge branch 'main' into mpi_runner_onrunonly
perazz Jun 27, 2023
3f511db
MPI: check presence of a runner command only with `run` and `test` ap…
perazz Jun 27, 2023
e9cddad
add `preprocess_config` to the dependency struct
perazz Jul 4, 2023
c480ca1
enable check for `child` node in toml, not only string values
perazz Jul 4, 2023
44076f4
create simple test program
perazz Jul 4, 2023
5550f5e
verify cached preprocessors
perazz Jul 4, 2023
28c3fd9
compare preprocessing configs in the cached manifest
perazz Jul 4, 2023
011877f
fix example macro input
perazz Jul 4, 2023
e29f394
add package test to CI
perazz Jul 4, 2023
826b182
fix unallocated preprocess in test
perazz Jul 4, 2023
3df03c2
cleanup
perazz Jul 4, 2023
69d3ea7
fix unallocated targets array
perazz Jul 7, 2023
cfd77ce
Fix unallocated targets array (#954)
perazz Jul 7, 2023
39fdc09
Dependency-level macro setting (#952)
perazz Jul 10, 2023
ce92996
remove `/en/` locale from paths
perazz Aug 9, 2023
6811dfe
Fix broken links in `README.md` (#959)
perazz Aug 9, 2023
3f98e65
add `-Ofast` optimization flags for intel compiler (release profile)
perazz Sep 14, 2023
6ebc226
add flags also to `ifx`
perazz Sep 14, 2023
1a5ffb6
replace `Ofast` with `O3`
perazz Sep 15, 2023
498bc48
Add `-O3` optimization flags for Intel compiler, release profile (#964)
perazz Sep 17, 2023
268da22
fix: make install script executable
everythingfunctional Oct 11, 2023
c4d0e03
ci(meta-windows): try without gcc-fortran
everythingfunctional Oct 12, 2023
4c1a93f
Merge pull request #965 from everythingfunctional/fix-install-script
everythingfunctional Oct 12, 2023
86e17fb
Merge branch 'main' into fpm_model_perazz
henilp105 Dec 19, 2023
7999654
fix
henilp105 Dec 19, 2023
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
310 changes: 310 additions & 0 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
name: metapackage-tests

on:
push:
paths:
- 'src/*meta*.f90' # On push, only launch job if something has changed in the metapackages
- 'src/fpm/*meta*.f90'
- 'src/fpm/manifest/*meta*.f90'
- 'src/ci/meta_tests.sh'
- 'src/.github/workflows/meta.yml'
pull_request:
release:
types: [published]

env:
CI: "ON" # We can detect this in the build system and other vendors implement it
HOMEBREW_NO_ANALYTICS: 1 # Make Homebrew installation a little quicker
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
HOMEBREW_NO_GITHUB_API: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1

jobs:

build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
mpi: intel
- os: ubuntu-latest
mpi: openmpi
- os: ubuntu-latest
mpi: mpich
- os: windows-latest
mpi: msmpi
- os: macos-latest
mpi: openmpi
- os: macos-latest
mpi: mpich


steps:
- name: Checkout code
uses: actions/checkout@v1

- name: (Ubuntu) setup gcc version
if: contains(matrix.os,'ubuntu')
run: |
echo "GCC_V=10" >> $GITHUB_ENV

- name: (macOS) setup gcc version
if: contains(matrix.os,'macos')
run: |
echo "GCC_V=13" >> $GITHUB_ENV

- name: (Windows) Install MSYS2
uses: msys2/setup-msys2@v2
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
with:
msystem: MINGW64
update: true
install: >-
git
base-devel
wget
unzip
curl

- name: (Windows) Setup VS Build environment
if: contains(matrix.os,'windows') && contains(matrix.mpi,'intel')
uses: seanmiddleditch/gha-setup-vsdevenv@master

- name: (Windows) Retrieve Intel toolchain
if: contains(matrix.os,'windows') && contains(matrix.mpi,'intel')
shell: pwsh
working-directory: C:\TEMP
run: |
curl.exe --output webimage.exe --url https://registrationcenter-download.intel.com/akdlm/irc_nas/19085/w_HPCKit_p_2023.0.0.25931_offline.exe --retry 5 --retry-delay 5
Start-Process -FilePath "webimage.exe" -ArgumentList "-s -x -f oneAPI --log extract.log" -Wait
Remove-Item "webimage.exe" -Force
Start-Process -FilePath "oneAPI\bootstrapper.exe" -ArgumentList "-s --action install --eula=accept --components=""intel.oneapi.win.cpp-compiler:intel.oneapi.win.ifort-compiler:intel.oneapi.win.mpi.devel"" -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=." -Wait
Remove-Item "oneAPI" -Force -Recurse

- name: (Ubuntu) Install gfortran
if: contains(matrix.os,'ubuntu') && (!contains(matrix.mpi,'intel'))
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}

- name: (Ubuntu) Install OpenMPI
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'openmpi')
run: |
sudo apt install -y -q openmpi-bin libopenmpi-dev

- name: (Ubuntu) Install MPICH
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'mpich')
run: |
sudo apt install -y -q mpich

- name: (Ubuntu) Retrieve Intel toolchain
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
timeout-minutes: 1
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update

- name: (Ubuntu) Install Intel oneAPI
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi intel-oneapi-mpi-devel intel-oneapi-mkl ninja-build

- name: (Ubuntu) Setup Intel oneAPI environment
if: contains(matrix.os,'ubuntu') && contains(matrix.mpi,'intel')
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV

- name: (Windows) Put MSYS2_MinGW64 on PATH
if: contains(matrix.os,'windows') && (!contains(matrix.mpi,'intel'))
# there is not yet an environment variable for this path from msys2/setup-msys2
run: echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: (Windows) download MS-MPI setup (SDK is from MSYS2)
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
# run: curl -L -O https://github.com/microsoft/Microsoft-MPI/releases/download/v10.1.2/msmpisetup.exe 10.1.1
run: curl -L -O https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe # 10.1.2

- name: (Windows) Install mpiexec.exe (-force needed to bypass GUI on headless)
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
run: .\msmpisetup.exe -unattend -force

- name: (Windows) test that mpiexec.exe exists
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
# can't use MSMPI_BIN as Actions doesn't update PATH from msmpisetup.exe
run: Test-Path "C:\Program Files\Microsoft MPI\Bin\mpiexec.exe" -PathType leaf

- name: (Windows) test that OneAPI is installed
if: contains(matrix.os,'windows') && contains(matrix.mpi,'intel')
run: |
Test-Path -Path "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" -PathType leaf
Test-Path -Path "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat" -PathType leaf

- name: (Windows) put MSMPI_BIN on PATH (where mpiexec is)
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
run: |
echo "C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: (Windows) load OneAPI environment variables
if: contains(matrix.os,'windows') && contains(matrix.mpi,'intel')
shell: cmd
run: |
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat"

- name: (Windows) Install MSYS2 msmpi package
if: contains(matrix.os,'windows') && contains(matrix.mpi,'msmpi')
shell: msys2 {0}
run: pacman --noconfirm -S mingw-w64-x86_64-msmpi

- name: (macOS) Set up Homebrew
if: contains(matrix.os,'macos')
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: (macOS) Install Homebrew gfortran
if: contains(matrix.os, 'macos')
run: |
# Only install gcc if not already available
which gfortran-${{ env.GCC_V }} || brew install gcc@${{ env.GCC_V }}
which gfortran-${{ env.GCC_V }}
which gfortran || ln -s /usr/local/bin/gfortran-${{ env.GCC_V }} /usr/local/bin/gfortran
# Backport gfortran shared libraries to version 10 folder. This is necessary because all macOS releases of fpm
# have these paths hardcoded in the executable (no PIC?). Current bootstrap version 0.8.0 has gcc-10
mkdir /usr/local/opt/gcc@10
mkdir /usr/local/opt/gcc@10/lib
mkdir /usr/local/opt/gcc@10/lib/gcc
mkdir /usr/local/opt/gcc@10/lib/gcc/10
mkdir /usr/local/lib/gcc/10
ln -fs /usr/local/opt/gcc@${{ env.GCC_V }}/lib/gcc/${{ env.GCC_V }}/libquadmath.0.dylib /usr/local/opt/gcc@10/lib/gcc/10/libquadmath.0.dylib
ln -fs /usr/local/opt/gcc@${{ env.GCC_V }}/lib/gcc/${{ env.GCC_V }}/libgfortran.5.dylib /usr/local/opt/gcc@10/lib/gcc/10/libgfortran.5.dylib
# Newer gcc versions use libgcc_s.1.1.dylib
ln -fs /usr/local/lib/gcc/${{ env.GCC_V }}/libgcc_s.1.dylib /usr/local/lib/gcc/10/libgcc_s.1.dylib || ln -fs /usr/local/lib/gcc/${{ env.GCC_V }}/libgcc_s.1.1.dylib /usr/local/lib/gcc/10/libgcc_s.1.dylib

- name: (macOS) Install homebrew MPICH
if: contains(matrix.mpi,'mpich') && contains(matrix.os,'macos')
run: |
brew install mpich

- name: (macOS) Install homebrew OpenMPI
if: contains(matrix.mpi,'openmpi') && contains(matrix.os,'macos')
run: |
brew install openmpi #--cc=gcc-${{ env.GCC_V }} openmpi

# Phase 1: Bootstrap fpm with existing version
- name: Install fpm
uses: fortran-lang/setup-fpm@v3
with:
fpm-version: 'v0.8.0'

- name: Remove fpm from path
shell: bash
run: |
mv $(which fpm) fpm-bootstrap${{ matrix.exe }}
echo "BOOTSTRAP=$PWD/fpm-bootstrap" >> $GITHUB_ENV

- name: Use Intel compiler for the metapackage tests
if: contains(matrix.mpi,'intel')
shell: bash
run: |
echo "FPM_FC=ifort" >> $GITHUB_ENV
echo "FPM_CC=icc" >> $GITHUB_ENV
echo "FPM_CXX=icpc" >> $GITHUB_ENV

- name: (macOS) Use gcc/g++ instead of Clang for C/C++
if: contains(matrix.os,'macOS')
shell: bash
run: |
echo "FPM_FC=gfortran-${{ env.GCC_V }}" >> $GITHUB_ENV
echo "FPM_CC=gcc-${{ env.GCC_V }}" >> $GITHUB_ENV
echo "FPM_CXX=g++-${{ env.GCC_V }}" >> $GITHUB_ENV

- name: Build Fortran fpm (bootstrap)
shell: bash
run: |
${{ env.BOOTSTRAP }} build

- name: Run Fortran fpm (bootstrap)
shell: bash
run: |
${{ env.BOOTSTRAP }} run
${{ env.BOOTSTRAP }} run -- --version
${{ env.BOOTSTRAP }} run -- --help

- name: Test Fortran fpm (bootstrap)
if: (!contains(matrix.mpi,'intel'))
shell: bash
run: |
${{ env.BOOTSTRAP }} test

- name: Install Fortran fpm (bootstrap)
shell: bash
run: |
${{ env.BOOTSTRAP }} install

# Phase 2: Bootstrap fpm with itself
- name: Replace bootstrapping version
shell: bash
run: |
${{ env.BOOTSTRAP }} run --runner cp -- fpm-debug${{ matrix.exe }}
rm -v ${{ env.BOOTSTRAP }}
echo "FPM=$PWD/fpm-debug" >> $GITHUB_ENV

- name: Get version (normal)
if: github.event_name != 'release'
shell: bash
run: |
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Get version (release)
if: github.event_name == 'release'
shell: bash
run: |
VERSION=$(echo ${{ github.ref }} | cut -dv -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
FPM_VERSION=$(${{ env.FPM }} --version | grep -o '${{ env.REGEX }}')
[ "$VERSION" = "$FPM_VERSION" ]
env:
REGEX: '[0-9]\{1,4\}\.[0-9]\{1,4\}\.[0-9]\{1,4\}'

- name: Build Fortran fpm
shell: bash
run: |
${{ env.FPM }} build ${{ matrix.release-flags }}

- name: Run Fortran fpm
shell: bash
run: |
${{ env.FPM }} run ${{ matrix.release-flags }}
${{ env.FPM }} run ${{ matrix.release-flags }} -- --version
${{ env.FPM }} run ${{ matrix.release-flags }} -- --help

- name: Install Fortran fpm
shell: bash
run: |
${{ env.FPM }} install ${{ matrix.release-flags }}

- name: Package release version
shell: bash
run: |
${{ env.FPM }} run ${{ matrix.release-flags }} --runner cp -- ${{ env.EXE }}
rm -v ${{ env.FPM }}
echo "FPM_RELEASE=${{ env.EXE }}" >> $GITHUB_ENV
env:
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}${{ matrix.exe }}

- name: Run metapackage tests using the release version
shell: bash
run: |
ci/meta_tests.sh "$PWD/${{ env.FPM_RELEASE }}"

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ non-Fortran related package manager.

**Website: <https://fpm.fortran-lang.org/>**

## [Download](https://fpm.fortran-lang.org/en/install/index.html)
## [Download](https://fpm.fortran-lang.org/install/index.html)

Fpm is available on many platforms and through multiple package managers, see our Documentation
webpage for a list of **[All Supported Installations](https://fpm.fortran-lang.org/en/install/index.html)**.
webpage for a list of **[All Supported Installations](https://fpm.fortran-lang.org/install/index.html)**.

The easiest installation routes are shown below.

Expand Down Expand Up @@ -86,9 +86,9 @@ Binary distributions are available for MacOS 11 (Catalina) and 12 (Big Sur) for
Fpm should be available and functional after those steps.
For more details checkout the tap [here](https://github.com/fortran-lang/homebrew-fortran).

## [Get started](https://fpm.fortran-lang.org/en/tutorial/index.html)
## [Get started](https://fpm.fortran-lang.org/tutorial/index.html)

**Follow our [Quickstart Tutorial](https://fpm.fortran-lang.org/en/tutorial/hello-fpm.html) to get familiar with fpm**.
**Follow our [Quickstart Tutorial](https://fpm.fortran-lang.org/tutorial/hello-fpm.html) to get familiar with fpm**.

### Start a new project

Expand Down Expand Up @@ -118,7 +118,7 @@ arguments can also be passed to the executable(s) or test(s) with the option
`-- some arguments`.

See additional instructions in the [Packaging guide](PACKAGING.md) or
the [manifest reference](https://fpm.fortran-lang.org/en/spec/manifest.html).
the [manifest reference](https://fpm.fortran-lang.org/spec/manifest.html).

<!--
### Bootstrapping instructions
Expand Down
46 changes: 46 additions & 0 deletions ci/meta_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -ex

# ***********************
# This script tests all example packages using any metapackage/system dependencies
# ***********************

cd "$(dirname $0)/.."

if [ "$1" ]; then
fpm="$1"
else
fpm=fpm
fi

# Build example packages
pushd example_packages/
rm -rf ./*/build

pushd metapackage_openmp
"$fpm" build --verbose
"$fpm" run --verbose
popd

pushd metapackage_stdlib
"$fpm" build --verbose
"$fpm" run --verbose
popd

pushd metapackage_minpack
"$fpm" build --verbose
"$fpm" run --verbose
popd

pushd metapackage_mpi
"$fpm" build --verbose
"$fpm" run --verbose
popd

pushd metapackage_mpi_c
"$fpm" build --verbose
"$fpm" run --verbose
popd

# Cleanup
rm -rf ./*/build
Loading
Loading