Skip to content

Commit 523de8d

Browse files
authored
Merge pull request #1 from minhqdao/simplify-ci
Simplify CI
2 parents 91dcc50 + 557e65e commit 523de8d

File tree

6 files changed

+104
-211
lines changed

6 files changed

+104
-211
lines changed

.github/PULL_REQUEST_TEMPLATE.md

-4
This file was deleted.

.github/workflows/CI.yml

+50-50
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on: push
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.10" }
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

-17
This file was deleted.

.github/workflows/ci_windows.yml

+48-67
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: CI_windows
22

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

55
env:
6-
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
6+
CTEST_TIME_TIMEOUT: "5" # some failures hang forever
77
CMAKE_GENERATOR: Ninja
88

99
jobs:
@@ -12,79 +12,60 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
include: [
16-
{ msystem: MSYS, arch: x86_64 },
17-
{ msystem: MINGW64, arch: x86_64 },
18-
{ msystem: MINGW32, arch: i686 }
19-
]
15+
include:
16+
[
17+
{ msystem: MSYS, arch: x86_64 },
18+
{ msystem: MINGW64, arch: x86_64 },
19+
{ msystem: MINGW32, arch: i686 },
20+
]
2021
defaults:
2122
run:
2223
shell: msys2 {0}
2324
steps:
24-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v2
2526

26-
- name: Setup MinGW native environment
27-
uses: msys2/setup-msys2@v2
28-
if: contains(matrix.msystem, 'MINGW')
29-
with:
30-
msystem: ${{ matrix.msystem }}
31-
update: false
32-
install: >-
33-
git
34-
mingw-w64-${{ matrix.arch }}-gcc
35-
mingw-w64-${{ matrix.arch }}-gcc-fortran
36-
mingw-w64-${{ matrix.arch }}-python
37-
mingw-w64-${{ matrix.arch }}-python-pip
38-
mingw-w64-${{ matrix.arch }}-python-setuptools
39-
mingw-w64-${{ matrix.arch }}-cmake
40-
mingw-w64-${{ matrix.arch }}-ninja
27+
- name: Setup environment
28+
uses: msys2/setup-msys2@v2
29+
with:
30+
msystem: ${{ matrix.msystem }}
31+
update: false
32+
install: >-
33+
git
34+
mingw-w64-${{ matrix.arch }}-gcc
35+
mingw-w64-${{ matrix.arch }}-gcc-fortran
36+
mingw-w64-${{ matrix.arch }}-python
37+
mingw-w64-${{ matrix.arch }}-python-fypp
38+
mingw-w64-${{ matrix.arch }}-cmake
39+
mingw-w64-${{ matrix.arch }}-ninja
4140
42-
- name: Setup msys POSIX environment
43-
uses: msys2/setup-msys2@v2
44-
if: contains(matrix.msystem, 'MSYS')
45-
with:
46-
msystem: MSYS
47-
update: false
48-
install: >-
49-
git
50-
mingw-w64-x86_64-gcc
51-
mingw-w64-x86_64-gcc-fortran
52-
python
53-
python-pip
54-
cmake
55-
ninja
41+
- run: >-
42+
PATH=$PATH:/mingw64/bin/ cmake
43+
-Wdev
44+
-B build
45+
-DCMAKE_BUILD_TYPE=Debug
46+
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
47+
-DCMAKE_MAXIMUM_RANK:String=4
48+
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
49+
env:
50+
FC: gfortran
51+
CC: gcc
52+
CXX: g++
5653
57-
- name: Install fypp
58-
run: pip install fypp
54+
- name: CMake build
55+
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel
5956

60-
- run: >-
61-
PATH=$PATH:/mingw64/bin/ cmake
62-
-Wdev
63-
-B build
64-
-DCMAKE_BUILD_TYPE=Debug
65-
-DCMAKE_Fortran_FLAGS_DEBUG="-Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace"
66-
-DCMAKE_MAXIMUM_RANK:String=4
67-
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
68-
env:
69-
FC: gfortran
70-
CC: gcc
71-
CXX: g++
57+
- name: catch build fail
58+
run: PATH=$PATH:/mingw64/bin/ cmake --build build --verbose --parallel 1
59+
if: failure()
7260

73-
- name: CMake build
74-
run: PATH=$PATH:/mingw64/bin/ cmake --build build --parallel
61+
- name: CTest
62+
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
7563

76-
- name: catch build fail
77-
run: PATH=$PATH:/mingw64/bin/ cmake --build build --verbose --parallel 1
78-
if: failure()
64+
- uses: actions/upload-artifact@v1
65+
if: failure()
66+
with:
67+
name: WindowsCMakeTestlog
68+
path: build/Testing/Temporary/LastTest.log
7969

80-
- name: CTest
81-
run: PATH=$PATH:/mingw64/bin/ ctest --test-dir build --output-on-failure --parallel -V -LE quadruple_precision
82-
83-
- uses: actions/upload-artifact@v1
84-
if: failure()
85-
with:
86-
name: WindowsCMakeTestlog
87-
path: build/Testing/Temporary/LastTest.log
88-
89-
- name: Install project
90-
run: PATH=$PATH:/mingw64/bin/ cmake --install build
70+
- name: Install project
71+
run: PATH=$PATH:/mingw64/bin/ cmake --install build

.github/workflows/doc-deployment.yml

-66
This file was deleted.

0 commit comments

Comments
 (0)