forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
154 lines (141 loc) · 4.59 KB
/
prebuild-gh_envs.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
name: Refresh GH environments NuGet cache
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
on:
push:
branches:
- "hpcc-platform-9.10.x"
workflow_call:
inputs:
branch:
description: "The branch to build"
required: true
type: string
workflow_dispatch:
jobs:
build:
strategy:
matrix:
label:
[
"ubuntu-20.04-x64",
"ubuntu-22.04-x64",
"windows-2019-x64",
"windows-2022-x64",
"macos-12-x64",
"macos-13-x64"
]
include:
- label: "ubuntu-20.04-x64"
os: "ubuntu-20.04"
triplet: "x64-linux-dynamic"
mono: "mono"
sudo: "sudo"
- label: "ubuntu-22.04-x64"
os: "ubuntu-22.04"
triplet: "x64-linux-dynamic"
mono: "mono"
sudo: "sudo"
- label: "windows-2019-x64"
os: "windows-2019"
triplet: "x64-windows"
mono: ""
sudo: ""
- label: "windows-2022-x64"
os: "windows-2022"
triplet: "x64-windows"
mono: ""
sudo: ""
- label: "macos-12-x64"
os: "macos-12"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
- label: "macos-13-x64"
os: "macos-13"
triplet: "x64-osx"
mono: "mono"
sudo: "sudo"
fail-fast: false
name: "GH Environment - ${{ matrix.label }}"
runs-on: ${{ matrix.os }}
steps:
- name: Ubuntu Dependencies
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' }}
shell: "bash"
run: |
sudo apt-get update -y
sudo apt-get install -yq --no-install-recommends \
apt-transport-https \
autoconf \
autoconf-archive \
automake \
autotools-dev \
binutils-dev \
bison \
build-essential \
ca-certificates \
curl \
dirmngr \
flex \
git \
gnupg \
groff-base \
libtool \
pkg-config \
software-properties-common \
tar \
unzip \
uuid-dev \
zip
- name: Ubuntu Mono Dependencies
if: ${{ matrix.os == 'ubuntu-22.04' }}
shell: "bash"
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update -y
sudo apt-get -yq install -f mono-complete
- name: OSX Dependencies
if: ${{ matrix.os == 'macos-12' || matrix.os == 'macos-13' }}
shell: "bash"
run: |
brew install bison flex pkg-config automake libtool autoconf autoconf-archive coreutils
- name: Check out source code
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.branch || github.ref }}
- name: "Bootstrap vcpkg"
working-directory: .
shell: "bash"
run: |
./bootstrap-vcpkg.sh
- name: "Setup NuGet Credentials"
working-directory: .
shell: "bash"
run: |
${{ matrix.mono }} `./vcpkg fetch nuget | tail -n 1` \
sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
${{ matrix.mono }} `./vcpkg fetch nuget | tail -n 1` \
setapikey "${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: "Update nuget (overlays)"
working-directory: .
shell: "bash"
run: |
./vcpkg install \
--x-abi-tools-use-exact-versions \
--host-triplet=${{ matrix.triplet }} \
--triplet=${{ matrix.triplet }}
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-logs
path: ./**/*.log