Skip to content

Commit 6057264

Browse files
committed
ci template
1 parent 690f0d2 commit 6057264

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.github/workflows/ci_linux.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
paths:
66
- "**.build"
77
- "**.txt"
8+
- "**.cmake"
89
- "**.f90"
910
- ".github/workflows/ci_linux.yml"
1011
pull_request:
1112
paths:
1213
- "**.build"
1314
- "**.txt"
15+
- "**.cmake"
1416
- "**.f90"
1517
- ".github/workflows/ci_linux.yml"
1618

@@ -23,8 +25,11 @@ jobs:
2325
- uses: actions/setup-python@v1
2426
with:
2527
python-version: '3.x'
28+
2629
- run: pip install -r requirements.txt
27-
- run: sudo apt install -yq --no-install-recommends gfortran libhdf5-dev
30+
- run: |
31+
sudo apt update -yq
32+
sudo apt install -yq --no-install-recommends ninja-build gfortran libhdf5-dev
2833
2934
- run: meson setup build
3035
env:
@@ -50,16 +55,20 @@ jobs:
5055
runs-on: ubuntu-latest
5156
steps:
5257
- uses: actions/checkout@v1
53-
- run: sudo apt install -yq --no-install-recommends gfortran libhdf5-dev
58+
- uses: actions/setup-python@v1
59+
with:
60+
python-version: '3.x'
61+
62+
- run: |
63+
pip install cmake
64+
sudo apt update -yq
65+
sudo apt install -yq --no-install-recommends gfortran libhdf5-dev
66+
5467
- name: CMake configure
55-
run: |
56-
mkdir build
57-
cd build
58-
cmake ..
68+
run: cmake -B build
5969
env:
6070
FC: gfortran
6171
- run: cmake --build build --parallel
62-
6372
- uses: actions/upload-artifact@v1
6473
if: failure()
6574
with:

.github/workflows/ci_mac.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
paths:
66
- "**.build"
77
- "**.txt"
8+
- "**.cmake"
89
- "**.f90"
910
- ".github/workflows/ci_mac.yml"
1011
pull_request:
1112
paths:
1213
- "**.build"
1314
- "**.txt"
15+
- "**.cmake"
1416
- "**.f90"
1517
- ".github/workflows/ci_mac.yml"
1618

@@ -23,23 +25,16 @@ jobs:
2325
- uses: actions/setup-python@v1
2426
with:
2527
python-version: '3.x'
26-
# FIXME: need Meson 0.53 to have better MacOS HDF5 finding
27-
- run: |
28-
git clone https://github.com/mesonbuild/meson
29-
pip install -e meson
30-
working-directory: /tmp
3128

3229
- run: pip install -r requirements.txt
33-
- run: brew install pkg-config gcc hdf5
30+
- run: brew install pkg-config gcc hdf5 ninja
3431

3532
- run: meson setup build
3633
env:
3734
FC: gfortran-9
3835
CC: gcc-9
3936

4037
- run: ninja -C build
41-
42-
# this catches configuration and build log
4338
- uses: actions/upload-artifact@v1
4439
if: failure()
4540
with:

cmake/install.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ DESTINATION include)
1111

1212
include(CMakePackageConfigHelpers)
1313

14-
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/${PROJECT_NAME}Config.cmake.in
14+
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Config.cmake.in
1515
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
1616
INSTALL_DESTINATION lib)
1717

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
meson >= 0.52
2-
ninja
1+
meson >= 0.52

0 commit comments

Comments
 (0)