-
Notifications
You must be signed in to change notification settings - Fork 2
147 lines (144 loc) · 3.96 KB
/
alpine-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
name: Alpine CI
on:
pull_request:
types: [opened, synchronize, edited, reopened]
branches: [master]
push:
branches: [master]
tags:
- "v*"
concurrency:
group: alpine-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-alpine:
name: Build
strategy:
matrix:
version:
[
"3.9.6",
"3.10.9",
"3.11.13",
"3.12.10",
"3.13.12",
"3.14.8",
"3.15.6",
"3.16.3",
"3.17.1",
]
runs-on: ubuntu-latest
container:
image: alpine:${{ matrix.version }}
steps:
- uses: actions/checkout@v2
- run: apk --update add alpine-sdk openssl-dev linux-headers wget
- name: Cache CMake
id: cache-cmake
uses: actions/cache@v3
with:
path: cmake-3.25.1
key: alpine-${{ matrix.version }}-cmake
- name: Build CMake
if: steps.cache-cmake.outputs.cache-hit != 'true'
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.25.1/cmake-3.25.1.tar.gz && \
tar -xzf cmake-3.25.1.tar.gz && \
cd cmake-3.25.1 && ./bootstrap && make && cd ..
- name: Build cpp-kzg-ceremony-client
run: PATH=$PWD/cmake-3.25.1/bin:$PATH ./build.sh
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: alpine-${{ matrix.version }}-binaries
path: |
build/bin/cpp-kzg-ceremony-client
build/bin/cpp-kzg-ceremony-client-test
build/bin/initialContribution.json
build/bin/updatedContribution.json
test-alpine:
name: Test
needs: build-alpine
strategy:
matrix:
version:
[
"3.9.6",
"3.10.9",
"3.11.13",
"3.12.10",
"3.13.12",
"3.14.8",
"3.15.6",
"3.16.3",
"3.17.1",
]
runs-on: ubuntu-latest
container:
image: alpine:${{ matrix.version }}
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: alpine-${{ matrix.version }}-binaries
- run: apk --update add libstdc++
- run: chmod +x ./cpp-kzg-ceremony-client-test
- run: ./cpp-kzg-ceremony-client-test
sanity-check-alpine:
name: Sanity Check
needs: build-alpine
strategy:
matrix:
version:
[
"3.9.6",
"3.10.9",
"3.11.13",
"3.12.10",
"3.13.12",
"3.14.8",
"3.15.6",
"3.16.3",
"3.17.1",
]
runs-on: ubuntu-latest
container:
image: alpine:${{ matrix.version }}
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: alpine-${{ matrix.version }}-binaries
- run: apk --update add libstdc++
- run: chmod +x ./cpp-kzg-ceremony-client
- run: ./cpp-kzg-ceremony-client --help
publish-alpine:
needs: [test-alpine, sanity-check-alpine]
if: startsWith(github.ref_name, 'v')
runs-on: ubuntu-latest
strategy:
matrix:
version:
[
"3.9.6",
"3.10.9",
"3.11.13",
"3.12.10",
"3.13.12",
"3.14.8",
"3.15.6",
"3.16.3",
"3.17.1",
]
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: alpine-${{ matrix.version }}-binaries
- run: chmod +x ./cpp-kzg-ceremony-client
- run: tar -czvf cpp-kzg-ceremony-client-${{ github.ref_name }}-alpine-${{ matrix.version }}-amd64.tar.gz cpp-kzg-ceremony-client
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: cpp-kzg-ceremony-client-${{ github.ref_name }}-alpine-${{ matrix.version }}-amd64.tar.gz
token: ${{ secrets.PAT }}