Skip to content

Commit 2ad9b06

Browse files
author
Jim-215-Fisher
committed
Merge branch 'master' into Distribution-Normal
2 parents e0d6dde + eb596a9 commit 2ad9b06

File tree

113 files changed

+18252
-641
lines changed

Some content is hidden

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

113 files changed

+18252
-641
lines changed

.github/ISSUE_TEMPLATE/01_bug.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Bug Report
2+
description: Something is not working
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description
9+
placeholder: Please include steps to reproduce your issue, provide example code snippets if possible
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: expected
14+
attributes:
15+
label: Expected Behaviour
16+
placeholder: What did you expect to happen instead
17+
validations:
18+
required: true
19+
- type: input
20+
id: stdlib-version
21+
attributes:
22+
label: Version of stdlib
23+
placeholder: 86ed2f3af570e2e09bdf03f1b74cdc4c4b13b43d, ...
24+
validations:
25+
required: true
26+
- type: input
27+
id: platform
28+
attributes:
29+
label: Platform and Architecture
30+
placeholder: MacOS/ARM, Windows, OpenBSD, ...
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: additional
35+
attributes:
36+
label: Additional Information
37+
placeholder: Further relevant context, i.e. links to other issues
38+
validations:
39+
required: false
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Proposal
2+
description: Suggestion for new functionality in stdlib
3+
labels: [idea]
4+
body:
5+
- type: textarea
6+
id: motivation
7+
attributes:
8+
label: Motivation
9+
placeholder: |
10+
What is the purpose of this proposal. Please provide usage examples for the new functionality as well.
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: prior-art
15+
attributes:
16+
label: Prior Art
17+
placeholder: |
18+
Include links and references to other package manager or build systems if available.
19+
validations:
20+
required: false
21+
- type: textarea
22+
id: additional
23+
attributes:
24+
label: Additional Information
25+
placeholder: Further relevant context, i.e. links to other issues
26+
validations:
27+
required: false
28+

.github/ISSUE_TEMPLATE/03_free.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: Free Form
3+
about: If the topic doesn't fit anything above and is not suitable for the lists below
4+
---

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
contact_links:
2+
- name: Stdlib discussion board
3+
url: https://github.com/fortran-lang/stdlib/discussions
4+
about: Discussion about stdlib related topics
5+
- name: Fortran-lang discourse
6+
url: https://fortran-lang.discourse.group/
7+
about: Discussion about all things Fortran
8+
- name: Fortran-lang mailing list
9+
url: https://groups.io/g/fortran-lang
10+
about: Mailinglist for the Fortran language

.github/workflows/CI.yml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: CI
33
on: [push, pull_request]
44

55
env:
6-
CI: "ON" # We can detect this in the build system and other vendors implement it
76
CMAKE_BUILD_PARALLEL_LEVEL: "2" # 2 cores on each GHA VM, enable parallel builds
87
CTEST_OUTPUT_ON_FAILURE: "ON" # This way we don't need a flag to ctest
98
CTEST_PARALLEL_LEVEL: "2"
@@ -21,14 +20,14 @@ jobs:
2120
fail-fast: false
2221
matrix:
2322
os: [ubuntu-latest, macos-latest]
24-
gcc_v: [7, 8, 9, 10] # Version of GFortran we want to use.
23+
gcc_v: [9, 10, 11] # Version of GFortran we want to use.
2524
env:
2625
FC: gfortran-${{ matrix.gcc_v }}
2726
GCC_V: ${{ matrix.gcc_v }}
2827

2928
steps:
3029
- name: Checkout code
31-
uses: actions/checkout@v1
30+
uses: actions/checkout@v2
3231

3332
- name: Set up Python 3.x
3433
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc.
@@ -50,7 +49,7 @@ jobs:
5049
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V}
5150
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
5251
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
53-
--slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V}
52+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
5453
5554
- name: Install GFortran macOS
5655
if: contains( matrix.os, 'macos')
@@ -62,20 +61,19 @@ jobs:
6261
run: >-
6362
cmake -Wdev
6463
-DCMAKE_BUILD_TYPE=Release
65-
-DCMAKE_MAXIMUM_RANK=4
64+
-DCMAKE_MAXIMUM_RANK:String=4
6665
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
6766
-S . -B build
6867
6968
- name: Build and compile
70-
run: cmake --build build
69+
run: cmake --build build --parallel
7170

7271
- name: catch build fail
7372
run: cmake --build build --verbose --parallel 1
7473
if: failure()
7574

7675
- name: test
77-
run: ctest --parallel --output-on-failure
78-
working-directory: build
76+
run: ctest --test-dir build --parallel --output-on-failure
7977

8078
- name: Install project
8179
run: cmake --install build
@@ -99,14 +97,18 @@ jobs:
9997
strategy:
10098
fail-fast: false
10199
matrix:
102-
os: [ubuntu-20.04]
100+
os: [ubuntu-latest, macos-latest]
103101
fc: [ifort]
104102
env:
103+
MACOS_HPCKIT_URL: >-
104+
https://registrationcenter-download.intel.com/akdlm/irc_nas/17398/m_HPCKit_p_2021.1.0.2681_offline.dmg
105+
MACOS_FORTRAN_COMPONENTS: >-
106+
intel.oneapi.mac.ifort-compiler
105107
FC: ${{ matrix.fc }}
106108

107109
steps:
108110
- name: Checkout code
109-
uses: actions/checkout@v1
111+
uses: actions/checkout@v2
110112

111113
- name: Set up Python 3.x
112114
uses: actions/setup-python@v1
@@ -117,7 +119,21 @@ jobs:
117119
if: contains(matrix.os, 'ubuntu')
118120
run: ci/install_cmake.sh
119121

120-
- name: Add Intel repository
122+
- name: Prepare for cache restore (OSX)
123+
if: contains(matrix.os, 'macos')
124+
run: |
125+
sudo mkdir -p /opt/intel
126+
sudo chown $USER /opt/intel
127+
128+
- name: Cache Intel install (OSX)
129+
if: contains(matrix.os, 'macos')
130+
id: cache-install
131+
uses: actions/cache@v2
132+
with:
133+
path: /opt/intel/oneapi
134+
key: install-${{ env.MACOS_HPCKIT_URL }}-${{ env.MACOS_FORTRAN_COMPONENTS }}
135+
136+
- name: Add Intel repository (Linux)
121137
if: contains(matrix.os, 'ubuntu')
122138
run: |
123139
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
@@ -126,10 +142,31 @@ jobs:
126142
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
127143
sudo apt-get update
128144
129-
- name: Install Intel oneAPI compiler
145+
- name: Install Intel oneAPI compiler (Linux)
130146
if: contains(matrix.os, 'ubuntu')
131147
run: |
132148
sudo apt-get install intel-oneapi-compiler-fortran
149+
150+
- name: Install Intel oneAPI compiler (OSX)
151+
if: contains(matrix.os, 'macos') && steps.cache-install.outputs.cache-hit != 'true'
152+
run: |
153+
curl --output webimage.dmg --url "$URL" --retry 5 --retry-delay 5
154+
hdiutil attach webimage.dmg
155+
if [ -z "$COMPONENTS" ]; then
156+
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --eula=accept --continue-with-optional-error=yes --log-dir=.
157+
installer_exit_code=$?
158+
else
159+
sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --continue-with-optional-error=yes --log-dir=.
160+
installer_exit_code=$?
161+
fi
162+
hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet
163+
exit $installer_exit_code
164+
env:
165+
URL: ${{ env.MACOS_HPCKIT_URL }}
166+
COMPONENTS: ${{ env.MACOS_FORTRAN_COMPONENTS }}
167+
168+
- name: Setup Intel oneAPI environment
169+
run: |
133170
source /opt/intel/oneapi/setvars.sh
134171
printenv >> $GITHUB_ENV
135172
@@ -140,7 +177,7 @@ jobs:
140177
run: >-
141178
cmake -Wdev
142179
-DCMAKE_BUILD_TYPE=Release
143-
-DCMAKE_MAXIMUM_RANK=4
180+
-DCMAKE_MAXIMUM_RANK:String=4
144181
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
145182
-S . -B build
146183

.github/workflows/PR-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Check out code.
9-
uses: actions/checkout@v1
9+
uses: actions/checkout@v2
1010
- name: misspell
1111
uses: reviewdog/action-misspell@v1
1212
with:

.github/workflows/ci_windows.yml

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,10 @@ name: CI_windows
33
on: [push, pull_request]
44

55
env:
6-
CI: "ON"
76
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
7+
CMAKE_GENERATOR: Ninja
88

99
jobs:
10-
Build:
11-
runs-on: windows-latest
12-
strategy:
13-
fail-fast: false
14-
15-
steps:
16-
- uses: actions/checkout@v1
17-
18-
- name: Install fypp
19-
run: pip install fypp
20-
21-
- run: cmake -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -Wdev -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace" -DCMAKE_MAXIMUM_RANK=4
22-
23-
env:
24-
FC: gfortran
25-
CC: gcc
26-
CXX: g++
27-
28-
- name: CMake build
29-
run: cmake --build build --parallel
30-
31-
- name: catch build fail
32-
run: cmake --build build --verbose --parallel 1
33-
if: failure()
34-
35-
- name: CTest
36-
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
37-
working-directory: build
38-
39-
- uses: actions/upload-artifact@v1
40-
if: failure()
41-
with:
42-
name: WindowsCMakeTestlog
43-
path: build/Testing/Temporary/LastTest.log
44-
4510
msys2-build:
4611
runs-on: windows-latest
4712
strategy:
@@ -70,6 +35,7 @@ jobs:
7035
mingw-w64-${{ matrix.arch }}-gcc-fortran
7136
mingw-w64-${{ matrix.arch }}-python
7237
mingw-w64-${{ matrix.arch }}-python-pip
38+
mingw-w64-${{ matrix.arch }}-python-setuptools
7339
mingw-w64-${{ matrix.arch }}-cmake
7440
mingw-w64-${{ matrix.arch }}-ninja
7541
@@ -92,13 +58,12 @@ jobs:
9258
run: pip install fypp
9359

9460
- run: >-
95-
cmake -G Ninja
96-
-DCMAKE_SH="CMAKE_SH-NOTFOUND"
61+
cmake
9762
-Wdev
9863
-B build
9964
-DCMAKE_BUILD_TYPE=Debug
10065
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
101-
-DCMAKE_MAXIMUM_RANK=4
66+
-DCMAKE_MAXIMUM_RANK:String=4
10267
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
10368
env:
10469
FC: gfortran
@@ -113,8 +78,7 @@ jobs:
11378
if: failure()
11479

11580
- name: CTest
116-
run: ctest --output-on-failure --parallel -V -LE quadruple_precision
117-
working-directory: build
81+
run: ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
11882

11983
- uses: actions/upload-artifact@v1
12084
if: failure()

.github/workflows/fpm-deployment.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: fpm-deployment
2+
3+
on: [push, pull_request]
4+
env:
5+
GCC_V: "10"
6+
7+
jobs:
8+
Build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout 🛎️
13+
uses: actions/[email protected]
14+
15+
- name: Set up Python 3.x
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.x
19+
20+
- name: Install fypp
21+
run: pip install --upgrade fypp
22+
23+
- name: Generate stdlib-fpm package 🔧
24+
run: |
25+
bash ./ci/fpm-deployment.sh
26+
27+
- name: Install GFortran
28+
run: |
29+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100 \
30+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }} \
31+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}
32+
33+
- name: Install fpm latest release
34+
uses: fortran-lang/setup-fpm@v3
35+
with:
36+
github-token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Run fpm test ⚙
39+
run: |
40+
cp -r stdlib-fpm stdlib-fpm-test
41+
cd stdlib-fpm-test
42+
fpm test
43+
fpm test --profile release
44+
45+
# Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch.
46+
- name: Deploy 🚀
47+
uses: JamesIves/[email protected]
48+
if: github.event_name != 'pull_request'
49+
with:
50+
BRANCH: stdlib-fpm
51+
FOLDER: stdlib-fpm

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ API-doc/
3939

4040
# Build directory for out-of-tree builds
4141
/build
42+
/stdlib-fpm
4243

4344
# Emacs backup files
4445
*~
46+
47+
# Files generated by tests
48+
*log*.txt
49+
*test*.txt
50+
scratch.txt

0 commit comments

Comments
 (0)