-
Notifications
You must be signed in to change notification settings - Fork 153
126 lines (105 loc) · 4.11 KB
/
release-packages.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
name: Build packages for a release
on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build-linux:
name: Build artifacts
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
BUILD_OS_NAME: osx
- os: ubuntu-20.04
BUILD_OS_NAME: linux
- os: ubuntu-20.04
BUILD_OS_NAME: arm
- os: windows-latest
BUILD_OS_NAME: win64
steps:
- name: Checkout etclabscore/core-geth
uses: actions/checkout@v3
- name: Set up Go 1.x
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
id: go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Cache lookup (Linux/ARM)
uses: actions/cache@v3
if: ${{ matrix.BUILD_OS_NAME == 'linux' || matrix.BUILD_OS_NAME == 'arm'}}
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ matrix.BUILD_OS_NAME }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.BUILD_OS_NAME }}-go-
- name: Cache lookup (MacOS)
uses: actions/cache@v3
if: ${{ matrix.BUILD_OS_NAME == 'osx'}}
with:
path: |
~/Library/Caches/go-build
~/go/pkg/mod
key: ${{ matrix.BUILD_OS_NAME }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.BUILD_OS_NAME }}-go-
- name: Cache lookup (Windows)
uses: actions/cache@v3
if: ${{ matrix.BUILD_OS_NAME == 'win64'}}
with:
path: |
~\AppData\Local\go-build
~\go\pkg\mod
key: ${{ matrix.BUILD_OS_NAME }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.BUILD_OS_NAME }}-go-
- name: Build all packages (non ARM)
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
id: build-non-arm-images
run: make all
- name: Build all packages (ARM)
id: build-arm-images
if: ${{ matrix.BUILD_OS_NAME == 'arm' }}
run: |
sudo apt-get update
sudo apt install gcc-multilib
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install gcc-arm-linux-gnueabi libc6-dev-armel-cross gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross
sudo ln -s /usr/include/asm-generic /usr/include/asm
echo "arm: This archive filepath is deprecated."
echo " It will be removed, and will cease to be present"
echo " as of the etclabscore/[email protected] release."
echo " The \*-arm5\* build should be used instead."
GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
env BUILD_OS_NAME=arm ./build/archive-signing.sh
GOARM=5 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
env BUILD_OS_NAME=arm5 ./build/archive-signing.sh
GOARM=6 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabi-gcc
env BUILD_OS_NAME=arm6 ./build/archive-signing.sh
GOARM=7 go run build/ci.go install -dlgo -arch arm -cc arm-linux-gnueabihf-gcc
env BUILD_OS_NAME=arm7 ./build/archive-signing.sh
go run build/ci.go install -dlgo -arch arm64 -cc aarch64-linux-gnu-gcc
env BUILD_OS_NAME=arm64 ./build/archive-signing.sh
- name: Print Core-Geth version (Linux/MacOS)
if: ${{ matrix.BUILD_OS_NAME == 'linux' || matrix.BUILD_OS_NAME == 'osx'}}
run: ./build/bin/geth version
- name: Print Core-Geth version (Windows)
if: ${{ matrix.BUILD_OS_NAME == 'win64' }}
run: ./build/bin/geth.exe version
- name: Prepare archives for release
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
run: ./build/archive-signing.sh
env:
BUILD_OS_NAME: ${{ matrix.BUILD_OS_NAME }}
- name: Upload release sssets
uses: softprops/action-gh-release@v1
with:
draft: true
files: core-geth*.zip*