-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (72 loc) · 2.07 KB
/
darwin-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
name: Darwin CI
on:
pull_request:
types: [opened, synchronize, edited, reopened]
branches: [master]
push:
branches: [master]
tags:
- "v*"
concurrency:
group: darwin-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-darwin:
name: Build
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- run: ./build.sh
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: darwin-binaries
path: |
build/bin/cpp-kzg-ceremony-client
build/bin/cpp-kzg-ceremony-client-test
build/bin/initialContribution.json
build/bin/updatedContribution.json
test-darwin:
name: Test
needs: build-darwin
strategy:
matrix:
version: [10.15, 11, 12]
runs-on: macos-${{ matrix.version }}
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: darwin-binaries
- run: chmod +x ./cpp-kzg-ceremony-client-test
- run: ./cpp-kzg-ceremony-client-test
sanity-check-darwin:
name: Sanity Check
needs: build-darwin
strategy:
matrix:
version: [10.15, 11, 12]
runs-on: macos-${{ matrix.version }}
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: darwin-binaries
- run: chmod +x ./cpp-kzg-ceremony-client
- run: ./cpp-kzg-ceremony-client --help
publish-darwin:
needs: [test-darwin, sanity-check-darwin]
if: startsWith(github.ref_name, 'v')
runs-on: ubuntu-latest
steps:
- name: Download binaries
uses: actions/download-artifact@v3
with:
name: darwin-binaries
- run: chmod +x ./cpp-kzg-ceremony-client
- run: tar -czvf cpp-kzg-ceremony-client-${{ github.ref_name }}-darwin-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 }}-darwin-amd64.tar.gz
token: ${{ secrets.PAT }}