-
Notifications
You must be signed in to change notification settings - Fork 304
215 lines (197 loc) · 7.88 KB
/
build-vcpkg.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
207
208
209
210
211
212
213
214
215
name: build-vcpkg
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read"
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"
on:
pull_request:
branches:
- "master"
- "candidate-*"
- "!candidate-7.10.*"
- "!candidate-7.8.*"
- "!candidate-7.6.*"
- "!candidate-7.4.*"
- "!candidate-7.2.*"
- "!candidate-7.0.*"
- "!candidate-6.*"
schedule:
- cron: "0 0 * * *"
jobs:
check-skip:
runs-on: ubuntu-20.04
outputs:
platform: ${{ steps.skip_check.outputs.platform }}
steps:
- id: skip_check
uses: hpcc-systems/github-actions/changed-modules@main
with:
github_token: ${{ github.token }}
build:
strategy:
matrix:
os:
[
"ubuntu-20.04",
"ubuntu-22.04",
"windows-2019",
"windows-2022",
"macos-11",
"macos-12",
]
include:
- os: "ubuntu-20.04"
triplet: "x64-linux"
mono: "mono"
sudo: "sudo"
cmake_config_options: "-DCMAKE_BUILD_TYPE=Release -DINCLUDE_PLUGINS=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_REMBED=ON"
cmake_build_options: "-- -j$(nproc) -k"
event_name: "pull_request"
- os: "ubuntu-22.04"
triplet: "x64-linux"
mono: "mono"
sudo: "sudo"
cmake_config_options: "-DCMAKE_BUILD_TYPE=Release -DINCLUDE_PLUGINS=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_REMBED=ON"
cmake_build_options: "-- -j$(nproc) -k"
event_name: "schedule"
- os: "windows-2019"
triplet: "x64-windows"
mono: ""
sudo: ""
cmake_config_options: '-G "Visual Studio 16 2019" -T host=x64 -A x64 -DUSE_OPENLDAP=OFF -DUSE_CASSANDRA=OFF -DUSE_AZURE=OFF -DWSSQL_SERVICE=OFF -DINCLUDE_PLUGINS=OFF'
cmake_build_options: "--config Release -j2 -- -m"
event_name: "pull_request"
- os: "windows-2022"
triplet: "x64-windows"
mono: ""
sudo: ""
cmake_config_options: '-G "Visual Studio 17 2022" -T host=x64 -A x64 -DUSE_OPENLDAP=OFF -DUSE_CASSANDRA=OFF -DUSE_AZURE=OFF -DWSSQL_SERVICE=OFF -DINCLUDE_PLUGINS=OFF'
cmake_build_options: "--config Release -j2 -- -m"
event_name: "schedule"
- os: "macos-11"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
cmake_config_options: "-DCMAKE_BUILD_TYPE=Release -DUSE_AZURE=OFF -DWSSQL_SERVICE=OFF -DINCLUDE_PLUGINS=OFF"
cmake_build_options: "-- -j$(nproc) -k"
event_name: "schedule"
- os: "macos-12"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
cmake_config_options: "-DCMAKE_BUILD_TYPE=Release -DUSE_AZURE=OFF -DWSSQL_SERVICE=OFF -DINCLUDE_PLUGINS=OFF"
cmake_build_options: "-- -j$(nproc) -k"
event_name: "pull_request"
fail-fast: false
name: "Build with vcpkg"
needs: check-skip
runs-on: ${{ matrix.os }}
steps:
- name: Display build summary
working-directory: .
run: |
echo ${{ matrix.os }} ${{ matrix.triplet }}
echo "Checkout to $Env:GITHUB_WORKSPACE"
echo "Platform Changed: ${{ needs.check-skip.outputs.platform }}"
- name: Ubuntu Dependencies
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform && contains(matrix.os, 'ubuntu') }}
shell: "bash"
run: |
sudo apt-get update -y
sudo apt-get -yq install bison flex build-essential binutils-dev libldap2-dev libcppunit-dev libicu-dev libxslt1-dev \
zlib1g-dev libboost-regex-dev libarchive-dev libv8-dev default-jdk libapr1-dev libaprutil1-dev libiberty-dev \
libhiredis-dev libtbb-dev libxalan-c-dev libnuma-dev libevent-dev libatlas-base-dev libblas-dev python3-dev \
default-libmysqlclient-dev libsqlite3-dev libmemcached-dev libcurl4-openssl-dev pkg-config uuid-dev libtool autotools-dev automake \
libssl-dev xmlstarlet libncurses-dev
- name: OSX Dependencies
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform && contains(matrix.os, 'macos') }}
shell: "bash"
run: |
brew install bison flex pkg-config automake libtool cmake openjdk@11
- name: "Setup NuGet credentials"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
shell: "bash"
run: |
${{ matrix.mono }} `vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/hpcc-systems/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.actor }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
- name: "Remove builtin vcpkg"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
working-directory: .
shell: "bash"
run: |
${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT"
- name: Check out source code
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
uses: actions/checkout@v2
with:
submodules: recursive
- name: "vcpkg Bootstrap"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
working-directory: .
shell: "bash"
run: |
./vcpkg/bootstrap-vcpkg.sh
- name: "Generate HPCC-Platform Build Files"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
working-directory: .
shell: "bash"
run: |
mkdir build
cd build
cmake .. -DSKIP_ECLWATCH=ON -DCONTAINERIZED=OFF -DUSE_OPTIONAL=OFF ${{ matrix.cmake_config_options }}
- name: "Remove vcpkg build files"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
working-directory: ./vcpkg
shell: "bash"
run: |
rm -rf ./buildtrees
rm -rf ./downloads
- name: "Build HPCC-Platform"
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
working-directory: ./build
shell: "bash"
run: |
cmake --build . ${{ matrix.cmake_build_options }}
build-docker:
strategy:
matrix:
os: ["centos-7", "centos-8"]
include:
- os: "centos-7"
docker-folder: "dockerfiles/platform-build-centos-7"
event_name: "pull_request"
- os: "centos-8"
docker-folder: "dockerfiles/platform-build-centos-8"
event_name: "schedule"
fail-fast: false
name: "Build with docker+vcpkg"
needs: check-skip
runs-on: ubuntu-22.04
steps:
- name: Checkout PR
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
uses: actions/checkout@v2
- name: Set up Docker Buildx
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
id: buildx
uses: docker/setup-buildx-action@v1
with:
driver: docker
- name: Build ${{ matrix.os }} image
if: ${{ github.event_name == matrix.event_name && needs.check-skip.outputs.platform }}
uses: docker/build-push-action@v2
with:
context: ${{ matrix.docker-folder }}
file: ${{ matrix.docker-folder }}/Dockerfile
builder: ${{ steps.buildx.outputs.name }}
build-args: |
BUILD_TAG=${{ github.head_ref }}
BUILD_USER=${{ github.actor }}
GITHUB_ACTOR=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
BUILD_TYPE=Release
USE_CPPUNIT=0