forked from gromacs/gromacs
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (64 loc) · 2.07 KB
/
build_cmake.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
name: CMake Build Matrix
on: [push, pull_request]
env:
CMAKE_VERSION: 3.28.0 # Oldest supported
NINJA_VERSION: 1.12.1 # Latest
BUILD_TYPE: Release
CCACHE_VERSION: 4.10.2 # Latest
NINJA_STATUS: "[%f/%t %o/sec] "
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC", artifact: "Windows-MSVC.7z",
os: windows-2019,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
gpu_var: "Off",
openmp_var: "Off"
}
- {
name: "macOS Latest Clang", artifact: "macOS.7z",
os: macos-latest,
cc: "clang", cxx: "clang++",
gpu_var: "Off",
openmp_var: "Off"
}
- {
name: "macOS Latest GCC 14 with OpenCL", artifact: "macOS-gcc-OpenCL.7z",
os: macos-latest,
cc: "gcc-14", cxx: "g++-14",
gpu_var: "OpenCL",
openmp_var: "On"
}
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
CI_JOB_ID: ${{ github.sha }} # Tell CMake it's running in CI
OPENMP_VAR: ${{ matrix.config.openmp_var }}
GPU_VAR: ${{ matrix.config.gpu_var }}
ENVIRONMENT_SCRIPT: ${{ matrix.config.environment_script }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Download Ninja, CMake, and CCache
run: cmake -P .github/scripts/download-ninja-cmake.cmake
- name: ccache cache files
uses: actions/cache@v4
with:
path: .ccache
key: ${{ matrix.config.name }}-ccache-${{ github.sha }}
restore-keys: |
${{ matrix.config.name }}-ccache-
- name: Configure
run: cmake -P .github/scripts/configure.cmake
- name: Build
run: cmake -P .github/scripts/build.cmake
- name: Run tests
run: cmake -P .github/scripts/test.cmake