-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (168 loc) · 6.57 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#
# Copyright (c) 2021 Grant Erickson. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Description:
# This file is the GitHub Actions hosted, distributed continuous
# integration configuration file for Open HLX.
#
---
name: Build
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
name: "Linux ${{matrix.compiler['name']}} [${{matrix.configuration['name']}}]"
# Coverage seems to have a problem on Linux with clang due to an
# 'atexit' issue during linking of the test executables. So, only
# assert '--enable-coverage' for GCC.
strategy:
matrix:
compiler:
- { name: GCC, c: gcc, cxx: g++, options: "--enable-coverage" }
- { name: clang/LLVM, c: clang, cxx: clang++, options: "" }
configuration:
- { name: "Debug", options: "--enable-debug" }
- { name: "Release", options: "" }
env:
CC: ${{matrix.compiler['c']}}
CXX: ${{matrix.compiler['cxx']}}
steps:
- name: Install Common Host Package Dependencies
run: |
sudo apt-get update
sudo apt-get -y install autoconf automake libtool
- name: Install OpenCFLite Host Package Dependencies
run: |
sudo apt-get -y install gobjc gobjc++ uuid-dev libicu-dev
- name: Install Open HLX Host Package Dependencies
run: |
sudo apt-get -y install libboost-dev libboost-filesystem-dev libboost-system-dev libnl-3-dev libnl-route-3-dev libtre-dev libcppunit-dev asciidoc xmlto doxygen
- name: Download OpenCFLite Distribution Archive Dependencies
run: |
cd /tmp
curl https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz -o tzcode2021a.tar.gz || wget https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz
mkdir tzcode2021a
tar --directory tzcode2021a -zxf tzcode2021a.tar.gz
- name: Checkout libkqueue OpenCFLite v635 Dependency
uses: actions/checkout@v2
with:
repository: mheily/libkqueue
ref: master
path: libkqueue
- name: Configure libkqueue OpenCFLite Dependency
run: |
cd "${GITHUB_WORKSPACE}/libkqueue"
cmake -S. -B. -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib"
- name: Build libkqueue OpenCFLite v635 Dependency
run: |
cd "${GITHUB_WORKSPACE}/libkqueue"
make -j
- name: Install libkqueue OpenCFLite v635 Dependency
run: |
cd "${GITHUB_WORKSPACE}/libkqueue"
sudo make install
sudo ldconfig
- name: Checkout OpenCFLite Dependency
uses: actions/checkout@v2
with:
repository: gerickson/opencflite
ref: opencflite-635
path: opencflite
# Note that in Ubuntu 20 and later, with ICU 60 and later, neither
# 'pkg-config icu' nor 'icu-config' are supported. Consequently,
# we have to explicitly specify '--with-icu=/usr'.
#
# For this build, we also need neither debug nor profile instances.
- name: Configure OpenCFLite Dependency
run: |
cd "${GITHUB_WORKSPACE}/opencflite"
./configure -C --with-icu=/usr --with-tz-includes=/tmp/tzcode2021a --disable-debug --disable-profile
- name: Build OpenCFLite Dependency
run: |
cd "${GITHUB_WORKSPACE}/opencflite"
make -j
# Make sure that 'ldconfig' is run such that run time execution
# picks up libCoreFoundation.so in /usr/local.
- name: Install OpenCFLite Dependency
run: |
cd "${GITHUB_WORKSPACE}/opencflite"
sudo make install
sudo ldconfig
- name: Checkout
uses: actions/checkout@v2
- name: Bootstrap and Configure
run: |
./bootstrap-configure -C ${{matrix.configuration['options']}} ${{matrix.compiler['options']}} --with-boost=/usr/local --with-libnl-includes=/usr/include/libnl3 --with-corefoundation-source=cflite --disable-docs
- name: Coding Style
run: |
make -j pretty-check
- name: Build
run: |
make -j
- name: Test
run: |
make -j check
- name: Upload Coverage
run: |
bash <(curl -s https://codecov.io/bash) -g 'src/*' -G 'src/lib/*/tests/*' -G 'tests/*' -G 'third_party/*'
# On macOS, Intel versus Apple silicon has created variability as
# far as Homebrew is concerned. On the former, Homebrew formulae are
# installed in /usr/local and on the latter, in
# /opt/homebrew. There's no way to know apriori on which
# architecture the job will run. Consequently, we attempt to handle
# both.
macos:
runs-on: macos-latest
name: "macOS ${{matrix.compiler['name']}} [${{matrix.configuration['name']}}]"
strategy:
matrix:
compiler:
- { name: GCC, c: gcc, cxx: g++ }
- { name: clang/LLVM, c: clang, cxx: clang++ }
configuration:
- { name: "Debug", options: "--enable-debug" }
- { name: "Release", options: "" }
env:
CC: ${{matrix.compiler['c']}}
CXX: ${{matrix.compiler['cxx']}}
CPPFLAGS: "-I/opt/homebrew/include -I/usr/local/include"
LDFLAGS: "-L/opt/homebrew/lib -L/usr/local/lib"
XML_CATALOG_FILES: "/opt/homebrew/etc/xml/catalog /usr/local/etc/xml/catalog"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf automake libtool boost cppunit asciidoc xmlto doxygen
- name: Bootstrap and Configure
run: |
eval "$(brew shellenv)"
export PATH="$(brew --prefix m4)/bin:${PATH}"
./bootstrap-configure -C ${{matrix.configuration['options']}} --enable-coverage --with-boost="$(brew --prefix boost)" --with-cppunit="$(brew --prefix cppunit)" --disable-docs
- name: Coding Style
run: |
make -j pretty-check
- name: Build
run: |
make -j
- name: Test
run: |
make -j check
- name: Upload Coverage
run: |
bash <(curl -s https://codecov.io/bash) -g 'src/*' -G 'src/lib/*/tests/*' -G 'tests/*' -G 'third_party/*'