This repository was archived by the owner on Jun 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
220 lines (193 loc) · 6.34 KB
/
aws-cpp-sdk.yml
File metadata and controls
220 lines (193 loc) · 6.34 KB
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
216
217
218
219
220
name: Build AWS C++ SDK
concurrency:
group: aws-${{ github.repository }}
on:
workflow_dispatch:
inputs:
aws_cpp_sdk_version:
description: The version of the AWS C++ SDK to build.
required: false
default: 1.9.365
type: string
env:
AWS_CLIENTS: "dynamodb;route53"
jobs:
workflow-inputs:
name: Display Workflow Inputs
runs-on: ubuntu-20.04
steps:
- name: Output inputs
run: |-
echo "## Workflow inputs" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ toJSON(github.event.inputs) }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
build-el:
name: Build on EL
runs-on: ubuntu-20.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
include:
- container: centos:7
file-prefix: centos7
- container: rockylinux:9
file-prefix: rocky9
steps:
- name: Install OS Packages
run: |-
yum update -y
yum install epel-release -y
yum install boost-devel -y \
cmake3 \
gcc-c++.x86_64 \
git \
libcurl-devel \
make \
openssl-devel \
unzip \
yaml-cpp-devel \
zlib-devel
- name: Create extra directories
working-directory: .
run: |-
mkdir -p ./aws/build
mkdir -p ./aws/install-artifacts
- name: Build/install from source
working-directory: ./aws
run: |-
git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
git submodule update --init --recursive
git checkout tags/${{ github.event.inputs.aws_cpp_sdk_version }}
cd ../build
cmake3 ../aws-sdk-cpp \
-DBUILD_ONLY="${{ env.AWS_CLIENTS }}" \
-DBUILD_SHARED_LIBS=Off \
-DCMAKE_INSTALL_PREFIX=../install-artifacts \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/aws/aws-sdk-cpp \
-DENABLE_TESTING=Off
make
make install
- name: Create tarball
working-directory: ./aws
run: |-
ls -al ./install-artifacts/
tar -czvf ${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz ./install-artifacts/
ls -al
mv ${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz ../
- name: Persist built artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.file-prefix }}
path: |-
./${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz
retention-days: 1
build-ubuntu:
name: Build on Ubuntu
runs-on: ${{ matrix.distro }}
strategy:
fail-fast: false
matrix:
include:
- distro: ubuntu-20.04
file-prefix: ubuntu20_04
- distro: ubuntu-22.04
file-prefix: ubuntu22_04
steps:
- name: Install OS Packages
run: |-
sudo apt-get update -y
sudo apt-get install -y \
cmake \
g++ \
libboost-all-dev \
libcurl4-openssl-dev \
libssl-dev \
libyaml-cpp-dev \
libz-dev
- name: Create extra directories
working-directory: .
run: |-
mkdir -p ./aws/build
mkdir -p ./aws/install-artifacts
- name: Build/install from source
working-directory: ./aws
run: |-
git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
git submodule update --init --recursive
git checkout tags/${{ github.event.inputs.aws_cpp_sdk_version }}
cd ../build
cmake ../aws-sdk-cpp \
-DBUILD_ONLY="${{ env.AWS_CLIENTS }}" \
-DBUILD_SHARED_LIBS=Off \
-DCMAKE_INSTALL_PREFIX=../install-artifacts \
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/aws/aws-sdk-cpp \
-DENABLE_TESTING=Off
make
make install
- name: Create tarball
working-directory: ./aws
run: |-
ls -al ./install-artifacts/
tar -czvf ${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz ./install-artifacts/
ls -al
mv ${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz ../
- name: Persist built artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.file-prefix }}
path: |-
./${{ matrix.file-prefix }}-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz
retention-days: 1
deploy:
name: Deploy to GitHub
runs-on: ubuntu-20.04
needs:
- build-el
- build-ubuntu
permissions:
contents: write
id-token: write
steps:
- name: Download CentOS 7 Build
uses: actions/download-artifact@v3
with:
name: centos7
path: .
- name: Download Rocky 9 Build
uses: actions/download-artifact@v3
with:
name: rocky9
path: .
- name: Download Ubuntu 20.04 Build
uses: actions/download-artifact@v3
with:
name: ubuntu20_04
path: .
- name: Download Ubuntu 22.04 Build
uses: actions/download-artifact@v3
with:
name: ubuntu22_04
path: .
- name: Check out repo
uses: actions/checkout@v3
with:
fetch-depth: 1
path: ./checkout
ref: gh-pages
- name: Configure Git
uses: slateci/github-actions/.github/actions/configure-git@v16
- name: Commit artifacts
working-directory: ./checkout
run: |-
for DISTRIBUTION in centos7 rocky9 ubuntu20_04 ubuntu22_04
do
cp ../$DISTRIBUTION-${{ github.event.inputs.aws_cpp_sdk_version }}.tar.gz ./aws-cpp-sdk/
done
git add --all
git commit -m '(github-action) Added AWS C++ SDK ${{ github.event.inputs.aws_cpp_sdk_version }} artifacts.'
git push
echo "Download artifacts from [https://slateci.io/slate-client-server/](https://slateci.io/slate-client-server/) once the GitHub pages action is complete." >> $GITHUB_STEP_SUMMARY