-
Notifications
You must be signed in to change notification settings - Fork 16
117 lines (99 loc) · 2.82 KB
/
build-zwallet.yaml
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
name: build-zwallet
on:
push:
branches:
- master
- staging
- sprint*
tags:
- 'v*.*.*'
pull_request:
jobs:
build-linux:
name: Build-linux
runs-on: [self-hosted, arc-runner]
steps:
- name: Install deps
run: |
sudo apt update
sudo apt -y install build-essential nghttp2 libnghttp2-dev libssl-dev
- name: Setup go 1.18
uses: actions/setup-go@v2
with:
go-version: ^1.20.0 # The Go version to download (if necessary) and use.
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: make install
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zwallet-linux
path: zwallet
retention-days: 5
build-windows:
name: Build-windows
runs-on: windows-runner
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
sys: [ MINGW64 ]
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
- name: Install libraries
run: |
echo 'Y'| pacman -S base-devel git gcc make
- name: Install Clang and Go for MINGW64
run: |
echo 'y'| pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-go zip unzip
- name: Set environment variables
run: |
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
export PATH=$PATH:$GOROOT/bin
export PATH=$PATH:/usr/bin/7z
# use clang as a default compiler for CGO
go env -w "CC=/mingw64/bin/clang.exe"
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: make install
- name: Zip release
run: |
# download dll files
wget https://github.com/0chain/zboxcli/files/11840033/windows.dll.s.zip
unzip -o windows.dll.s.zip
cp zwallet zwallet.exe
zip zwallet-windows.zip zwallet.exe libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zwallet-windows.zip
path: zwallet-windows.zip
retention-days: 5
- name: cleanup workspace
run: |
rm -Recurse ${{github.workspace}}\*
shell: powershell
build-macos:
name: Build-macos
runs-on: macos-runner
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ^1.20.0 # The Go version to download (if necessary) and use.
- name: Checkout
uses: actions/checkout@v2
- name: Install
run: make install
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: zwallet-macos
path: zwallet
retention-days: 5