-
Notifications
You must be signed in to change notification settings - Fork 75
193 lines (190 loc) · 7.23 KB
/
ci.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
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
PACKAGE_NAME: aws-iot-securetunneling-localproxy
jobs:
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
name: 'Checkout'
with:
fetch-depth: 0 # Fetch all history
- name: List tags
run: |
git tag
- name: Install brew dependencies
run: |
brew install [email protected] zlib cmake wget
- name: Install boost
working-directory: ${{ github.workspace }}
run: |
wget https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz -O /tmp/boost.tar.gz
tar xzvf /tmp/boost.tar.gz
cd boost_1_84_0
./bootstrap.sh --with-toolset=clang
sudo ./b2 install toolset=clang link=static
- name: Install protobuf
working-directory: ${{ github.workspace }}
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz
cd protobuf-3.17.3
mkdir build_make
cd build_make
cmake ../cmake
make
sudo make install
- name: Building localproxy
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF -DOPENSSL_ROOT_DIR=/usr/local/Cellar/[email protected]/1.1.1t/ -DOPENSSL_LIBRARIES=/usr/local/Cellar/[email protected]/1.1.1t/lib/
make
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: localproxy-mac
path: ${{ github.workspace }}/build/bin/localproxy
ubuntu:
runs-on: ubuntu-latest
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history
- name: List tags
run: |
git tag
- name: Install apt-get dependencies
run: |
sudo apt-get install -y build-essential git python3-dev
sudo apt-get install -y wget tar zlib1g-dev libssl-dev openssl cmake
sudo apt-get clean -y
- name: Install boost
working-directory: ${{ github.workspace }}
run: |
wget https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz -O /tmp/boost.tar.gz
tar xzvf /tmp/boost.tar.gz
cd boost_1_84_0
./bootstrap.sh
sudo ./b2 install link=static
- name: Install protobuf
working-directory: ${{ github.workspace }}
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz -O /tmp/protobuf-all-3.17.3.tar.gz
tar xzvf /tmp/protobuf-all-3.17.3.tar.gz
cd protobuf-3.17.3
mkdir build_make
cd build_make
cmake ../cmake
make
sudo make install
- name: install Catch2
working-directory: ${{ github.workspace }}
run: |
git clone --branch v3.7.0 https://github.com/catchorg/Catch2.git
cd Catch2
mkdir build
cd build
cmake ../
make
sudo make install
- name: Building localproxy
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF
make
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: localproxy-ubuntu
path: ${{ github.workspace }}/build/bin/localproxy
windows:
runs-on: windows-2019
if: (github.event_name == 'push') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.repository))
steps:
- name: Setup developer command prompt
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.2
arch: x64
- name: Install OpenSSL
run: |
Invoke-WebRequest "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip" -OutFile "nasm-2.15.05-win64.zip"
Expand-Archive "nasm-2.15.05-win64.zip" -Force -DestinationPath "C:\NASM"
$env:Path += ";C:\NASM\nasm-2.15.05\"
Invoke-WebRequest "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.0.12.zip" -OutFile "openssl-3.0.12.zip"
Expand-Archive "openssl-3.0.12.zip" -Force
cd .\openssl-3.0.12\openssl-openssl-3.0.12\
perl Configure VC-WIN64A
nmake
nmake install
$env:Path += ";C:\Program Files\OpenSSL\bin"
- name: Install Catch2
run: |
git clone --branch v3.7.0 https://github.com/catchorg/Catch2.git
cd Catch2
mkdir build
cd build
cmake -DBUILD_TESTING=OFF -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../
nmake
nmake install
- name: Install zlib
run: |
git clone -b v1.2.13 https://github.com/madler/zlib.git
cd zlib
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ../
nmake
nmake install
$env:Path += ";C:\Program Files (x86)\zlib\bin"
- name: Install boost
run: |
Invoke-WebRequest "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.zip" -OutFile "boost_1_84_0.zip"
Expand-Archive "boost_1_84_0.zip" -Force
cd .\boost_1_84_0\boost_1_84_0\
.\bootstrap.bat
.\b2 toolset=msvc-14.2 address-model=64 install define=_WIN32_WINNT=0x0601 define=BOOST_WINAPI_VERSION_WIN7 link=static
- name: Install protobuf
run: |
cd \
Invoke-WebRequest "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.zip" -OutFile "protobuf-all-3.17.3.zip"
Expand-Archive protobuf-all-3.17.3.zip
cd .\protobuf-all-3.17.3\protobuf-3.17.3\cmake\
mkdir build
cd build
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ../
nmake
nmake install
$env:Path += ";C:\Program Files (x86)\protobuf\bin"
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history
- name: List tags
run: |
git tag
- name: Build localproxy
working-directory: ${{ github.workspace }}
run: |
mkdir build
cd build
cmake -DBUILD_TESTS=OFF -DLINK_STATIC_OPENSSL=OFF -DBOOST_PKG_VERSION=1.84.0 -DWIN32_WINNT=0x0601 -DBoost_USE_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH="C:\Boost;C:\Program Files (x86)\Catch2;C:\Program Files (x86)\protobuf;C:\Program Files\OpenSSL" -G "Visual Studio 16 2019" -A x64 ..\
msbuild localproxy.vcxproj -p:Configuration=Release
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: localproxy-windows
path: ${{ github.workspace }}\build\bin\Release\localproxy.exe