forked from HDFGroup/hdf5
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.17 KB
/
mac-cmake-flang-mpich.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: mac-13 CMake llvm17 flang java parallel mpich
on:
workflow_dispatch:
push:
branches: [ develop ]
jobs:
build:
strategy:
matrix:
name: ["macOS Latest Clang"]
include:
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-13
build_type: "Release"
cpp: OFF
fortran: ON
java: ON
ts: OFF
hl: ON
parallel: ON
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
name: ${{ matrix.name }}
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- name: Install Dependencies (macOS)
run: brew install llvm mpich carlocab/personal/flang
- name: Get Sources
uses: actions/checkout@v4
- name: Configure
run: |
which flang-new
export FC="$(which flang-new)"
export CC="$(which clang)"
echo $CC
echo $FC
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake ${{ matrix.generator }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
-DHDF5_ENABLE_THREADSAFE:BOOL=${{ matrix.ts }} \
-DHDF5_BUILD_HL_LIB:BOOL=${{ matrix.hl }} \
-DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \
-DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} \
-DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} \
-DHDF5_BUILD_JAVA=${{ matrix.java }} \
-DMPIEXEC_MAX_NUMPROCS:STRING=2 \
$GITHUB_WORKSPACE
shell: bash
- name: Build
run: cmake --build . --config ${{ matrix.build_type }}
working-directory: ${{ runner.workspace }}/build
- name: Test
run: ctest --build . -C ${{ matrix.build_type }} -V
working-directory: ${{ runner.workspace }}/build
- name: Upload
uses: actions/upload-artifact@v2
with:
name: my-artifact
path: ${{ runner.workspace }}/build/CMakeCache.txt