Skip to content

Build packages for a release #19

Build packages for a release

Build packages for a release #19

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.19
if: ${{ matrix.BUILD_OS_NAME != 'arm' }}
id: go
uses: actions/setup-go@v4
with:
go-version: ^1.19
- 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/core-geth@v1.12.7 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*