-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (127 loc) · 4.85 KB
/
build.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: HepMC3 Build Matrix for Windows and MacOSX
on: [push, pull_request]
jobs:
nativeosx:
if: "contains(github.event.head_commit.message, 'githubosxci')"
name: "${{ matrix.config.name }} ${{ matrix.python-version }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
config:
- {
name: "MacOSX-12",
os: macos-12,
cc: "clang",
cxx: "clang++"
}
- {
name: "MacOSX-11",
os: macos-11,
cc: "clang",
cxx: "clang++"
}
- {
name: "MacOSX-13",
os: macos-13,
cc: "clang",
cxx: "clang++"
}
- {
name: "MacOSX-14",
os: macos-14,
cc: "clang",
cxx: "clang++"
}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Build
run: |
brew install protobuf
brew install doxygen
cmake -S. -B BUILD -DCMAKE_INSTALL_PREFIX=./INSTALL -DHEPMC3_BUILD_DOCS:BOOL=OFF -DHEPMC3_BUILD_EXAMPLES:BOOL=ON -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_PROTOBUFIO:BOOL=ON -DHEPMC3_ENABLE_TEST:BOOL=ON -DHEPMC3_PYTHON_VERSIONS=3
cmake --build BUILD
cmake --install BUILD
cd BUILD
ctest . --output-on-failure
nativewin:
if: "contains(github.event.head_commit.message, 'githubwinci')"
name: "${{ matrix.config.name }} ${{ matrix.python-version }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
cc: "cl",
cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Set up Protobuf
run: |
Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip -OutFile protoc-21.12-win64.zip
Expand-Archive -Path protoc-21.12-win64.zip -DestinationPath C:\output
vcpkg install protobuf:x64-windows
copy C:\output\bin\protoc.exe C:\vcpkg\packages\protobuf_x64-windows\bin
vcpkg list
dir C:\vcpkg\packages\protobuf_x64-windows\bin
- name: Build
run: |
cmake -S. -B BUILD -DHEPMC3_ENABLE_PYTHON:BOOL=ON -DProtobuf_PROTOC_EXECUTABLE=C:\vcpkg\packages\protobuf_x64-windows\bin\protoc.exe -DProtobuf_INCLUDE_DIR=C:\vcpkg\packages\protobuf_x64-windows\include -DProtobuf_LIBRARY=C:\vcpkg\packages\protobuf_x64-windows\lib\libprotobuf.lib -DCMAKE_INSTALL_PREFIX=C:\INSTALL -DHEPMC3_BUILD_DOCS:BOOL=OFF -DHEPMC3_BUILD_EXAMPLES:BOOL=OFF -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_PROTOBUFIO:BOOL=ON -DHEPMC3_ENABLE_TEST:BOOL=ON -DHEPMC3_PYTHON_VERSIONS=3
cmake --build BUILD
cmake --install BUILD
chdir BUILD
ctest . -C Debug --output-on-failure
mingw:
if: "contains(github.event.head_commit.message, 'githubmingwci')"
name: "${{ matrix.include.name }}"
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { name: "Windows MinGW64", sys: mingw64, env: x86_64 }
# - { name: "Windows MinGW32", sys: mingw32, env: i686 }
steps:
# Force version because of https://github.com/msys2/setup-msys2/issues/167
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: >-
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-gcc-fortran
mingw-w64-${{matrix.env}}-ninja
mingw-w64-${{matrix.env}}-python-pip
mingw-w64-${{matrix.env}}-python
mingw-w64-${{matrix.env}}-python-numpy
mingw-w64-${{matrix.env}}-python-setuptools
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-make
mingw-w64-${{matrix.env}}-protobuf
mingw-w64-${{matrix.env}}-doxygen
- uses: actions/checkout@v2
- name: Build
#Fix here examples
run: |
cmake -S. -B BUILD -DCMAKE_INSTALL_PREFIX=./INSTALL -DHEPMC3_BUILD_DOCS:BOOL=OFF -DHEPMC3_BUILD_EXAMPLES:BOOL=OFF -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_PYTHON:BOOL=OFF -DHEPMC3_ENABLE_PROTOBUFIO:BOOL=ON -DHEPMC3_ENABLE_TEST:BOOL=OFF -DHEPMC3_PYTHON_VERSIONS=3
cmake --build BUILD
cmake --install BUILD
# cd BUILD
# ctest .