Skip to content

Commit dec06a4

Browse files
committed
Revert "Clean up CI, run all on push only"
This reverts commit abcd256.
1 parent 239a670 commit dec06a4

File tree

5 files changed

+144
-56
lines changed

5 files changed

+144
-56
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!--
2+
Thank you for contributing to stdlib.
3+
To help us get your pull request merged more quickly, please consider reviewing any of the already open pull requests.
4+
-->

.github/workflows/CI.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: CI
22

3-
on: push
3+
on: [push, pull_request]
44

55
env:
66
CMAKE_BUILD_PARALLEL_LEVEL: "2" # 2 cores on each GHA VM, enable parallel builds
77
CTEST_OUTPUT_ON_FAILURE: "ON" # This way we don't need a flag to ctest
88
CTEST_PARALLEL_LEVEL: "2"
9-
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
9+
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
1010
HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker
1111
HOMEBREW_NO_AUTO_UPDATE: "ON"
1212
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
@@ -21,71 +21,71 @@ jobs:
2121
matrix:
2222
os: [ubuntu-latest, macos-12]
2323
toolchain:
24-
- { compiler: gcc, version: 10 }
25-
- { compiler: gcc, version: 11 }
26-
- { compiler: gcc, version: 12 }
27-
- { compiler: gcc, version: 13 }
28-
- { compiler: intel, version: "2024.1" }
29-
- { compiler: intel-classic, version: "2021.9" }
24+
- {compiler: gcc, version: 10}
25+
- {compiler: gcc, version: 11}
26+
- {compiler: gcc, version: 12}
27+
- {compiler: gcc, version: 13}
28+
- {compiler: intel, version: '2024.1'}
29+
- {compiler: intel-classic, version: '2021.9'}
3030
build: [cmake]
3131
include:
3232
- os: ubuntu-latest
3333
build: cmake-inline
3434
toolchain:
35-
- { compiler: gcc, version: 10 }
35+
- {compiler: gcc, version: 10}
3636
exclude:
3737
- os: macos-12
38-
toolchain: { compiler: intel, version: "2024.1" }
38+
toolchain: {compiler: intel, version: '2024.1'}
3939
- os: macos-12
40-
toolchain: { compiler: gcc, version: 13 }
40+
toolchain: {compiler: gcc, version: 13}
4141
env:
4242
BUILD_DIR: ${{ matrix.build == 'cmake' && 'build' || '.' }}
4343

4444
steps:
45-
- name: Checkout code
46-
uses: actions/checkout@v4
45+
- name: Checkout code
46+
uses: actions/checkout@v4
4747

48-
- name: Set up Python 3.x
49-
uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc.
50-
with:
51-
python-version: 3.x
48+
- name: Set up Python 3.x
49+
uses: actions/setup-python@v5 # Use pip to install latest CMake, & FORD/Jin2For, etc.
50+
with:
51+
python-version: 3.x
5252

53-
- name: Install fypp
54-
run: pip install --upgrade fypp ninja
53+
- name: Install fypp
54+
run: pip install --upgrade fypp ninja
5555

56-
- name: Setup Fortran compiler
57-
uses: fortran-lang/[email protected]
58-
id: setup-fortran
59-
with:
60-
compiler: ${{ matrix.toolchain.compiler }}
61-
version: ${{ matrix.toolchain.version }}
56+
- name: Setup Fortran compiler
57+
uses: fortran-lang/[email protected]
58+
id: setup-fortran
59+
with:
60+
compiler: ${{ matrix.toolchain.compiler }}
61+
version: ${{ matrix.toolchain.version }}
6262

63-
- name: Configure with CMake
64-
if: ${{ contains(matrix.build, 'cmake') }}
65-
run: >-
66-
cmake -Wdev -G Ninja
67-
-DCMAKE_BUILD_TYPE=Release
68-
-DCMAKE_MAXIMUM_RANK:String=4
69-
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
70-
-S . -B ${{ env.BUILD_DIR }}
63+
- name: Configure with CMake
64+
if: ${{ contains(matrix.build, 'cmake') }}
65+
run: >-
66+
cmake -Wdev -G Ninja
67+
-DCMAKE_BUILD_TYPE=Release
68+
-DCMAKE_MAXIMUM_RANK:String=4
69+
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
70+
-S . -B ${{ env.BUILD_DIR }}
7171
72-
- name: Build and compile
73-
if: ${{ contains(matrix.build, 'cmake') }}
74-
run: cmake --build ${{ env.BUILD_DIR }} --parallel
72+
- name: Build and compile
73+
if: ${{ contains(matrix.build, 'cmake') }}
74+
run: cmake --build ${{ env.BUILD_DIR }} --parallel
7575

76-
- name: catch build fail
77-
run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1
78-
if: ${{ failure() && contains(matrix.build, 'cmake') }}
76+
- name: catch build fail
77+
run: cmake --build ${{ env.BUILD_DIR }} --verbose --parallel 1
78+
if: ${{ failure() && contains(matrix.build, 'cmake') }}
7979

80-
- name: test
81-
if: ${{ contains(matrix.build, 'cmake') }}
82-
run: >-
83-
ctest
84-
--test-dir ${{ env.BUILD_DIR }}
85-
--parallel
86-
--output-on-failure
87-
--no-tests=error
80+
- name: test
81+
if: ${{ contains(matrix.build, 'cmake') }}
82+
run: >-
83+
ctest
84+
--test-dir ${{ env.BUILD_DIR }}
85+
--parallel
86+
--output-on-failure
87+
--no-tests=error
8888
89-
- name: Install project
90-
if: ${{ contains(matrix.build, 'cmake') }}
91-
run: cmake --install ${{ env.BUILD_DIR }}
89+
- name: Install project
90+
if: ${{ contains(matrix.build, 'cmake') }}
91+
run: cmake --install ${{ env.BUILD_DIR }}

.github/workflows/PR-review.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: PR-Review
2+
on: [pull_request]
3+
jobs:
4+
misspell:
5+
name: review-dog / misspell
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Check out code.
9+
uses: actions/checkout@v2
10+
- name: misspell
11+
uses: reviewdog/action-misspell@v1
12+
with:
13+
github_token: ${{ secrets.GITHUB_TOKEN }}
14+
locale: "US"
15+
reporter: github-pr-review
16+
level: warning
17+
ignore: colour

.github/workflows/doc-deployment.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build and Deploy Documents
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
LANG: "en_US.UTF-8"
7+
LC_ALL: "en_US.UTF-8"
8+
PIP_DISABLE_PIP_VERSION_CHECK: "ON"
9+
PIP_NO_CLEAN: "ON"
10+
PIP_PREFER_BINARY: "ON"
11+
TZ: "UTC"
12+
FORD_FILE: "API-doc-FORD-file.md"
13+
14+
jobs:
15+
Build-API-Docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v1
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install -v ford==7.0.5
26+
pip install fypp
27+
python --version
28+
ford --version
29+
fypp --version
30+
31+
- name: Skip graph and search unless deploying
32+
if: github.ref != 'refs/heads/master' && ! startsWith( github.ref, 'refs/tags/' )
33+
run: |
34+
sed -i 's/^[[:blank:]]*graph: *[Tt]rue/graph: false/' "${FORD_FILE}"
35+
echo "MAYBE_SKIP_SEARCH=--no-search" >> $GITHUB_ENV
36+
37+
- name: Build Docs
38+
run: |
39+
git fetch --all --tags
40+
ford -r $(git describe --always) --debug ${MAYBE_SKIP_SEARCH} "${FORD_FILE}"
41+
42+
- name: Upload Documentation
43+
uses: actions/upload-artifact@v2
44+
with:
45+
name: FORD-API-docs
46+
path: ./API-doc/
47+
48+
- name: Broken Link Check
49+
uses: technote-space/broken-link-checker-action@v1
50+
with:
51+
TARGET: file://${{ github.workspace }}/API-doc/index.html
52+
RECURSIVE: true
53+
ASSIGNEES: ${{ github.actor }}
54+
55+
- name: Deploy API Docs
56+
uses: peaceiris/actions-gh-pages@v3
57+
if: github.event_name == 'push' && github.repository == 'fortran-lang/stdlib' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/master' )
58+
with:
59+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
60+
cname: 'stdlib.fortran-lang.org'
61+
external_repository: fortran-lang/stdlib-docs
62+
publish_dir: ./API-doc
63+
publish_branch: master
64+
allow_empty_commit: true
65+
force_orphan: false
66+
commit_message: "From https://github.com/${{ github.repository }}/commit/${{ github.sha }} ${{ github.ref }}"

.github/workflows/fpm-deployment.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fpm-deployment
22

3-
on: push
3+
on: [push, pull_request]
44

55
jobs:
66
test:
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
include:
1212
- os: ubuntu-latest
13-
toolchain: { compiler: gcc, version: 13 }
13+
toolchain: {compiler: gcc, version: 13}
1414

1515
steps:
1616
- name: Checkout code
@@ -33,18 +33,19 @@ jobs:
3333
- name: Setup Fortran Package Manager
3434
uses: fortran-lang/setup-fpm@v5
3535
with:
36-
fpm-version: "v0.10.0"
36+
fpm-version: 'v0.10.0'
3737

3838
- run: | # Just for deployment: create stdlib-fpm folder
3939
python config/fypp_deployment.py --deploy_stdlib_fpm
4040
41-
- run: | # Use fpm gnu ci to check xdp and qp
41+
- run: | # Use fpm gnu ci to check xdp and qp
4242
python config/fypp_deployment.py --with_xdp --with_qp
4343
fpm test --profile release --flag '-DWITH_XDP -DWITH_QP'
4444
45-
# Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch.
45+
# Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch.
4646
- name: Deploy 🚀
4747
uses: JamesIves/[email protected]
48+
if: github.event_name != 'pull_request'
4849
with:
4950
BRANCH: stdlib-fpm
50-
FOLDER: stdlib-fpm
51+
FOLDER: stdlib-fpm

0 commit comments

Comments
 (0)