Build Mev-Bor #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Mev-Bor | |
on: | |
workflow_dispatch: | |
inputs: | |
mev-bor-branch: | |
description: 'mev-bor branch' | |
required: false | |
default: 'master' | |
mev-bor-version: | |
description: 'mev-bor binary version' | |
required: false | |
default: 'X.Y.Z-beta.U' | |
arch: | |
description: 'amd64/arm64' | |
required: false | |
default: amd64 | |
release-on: | |
description: 'public/beta' | |
required: false | |
default: 'beta' | |
jobs: | |
echo_input: | |
name: display input params | |
strategy: | |
matrix: | |
include: | |
- os: 'ubuntu-20.04' | |
build_type: Release | |
GOOS: linux | |
GOARCH: amd64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: echo | |
run: | | |
echo mev-bor-branch ${{github.event.inputs.mev-bor-branch}} | |
echo mev-bor-version ${{github.event.inputs.mev-bor-version}} | |
build_mev-bor_amd: | |
if: ${{github.event.inputs.mev-bor-version != 'X.Y.Z-beta.U' && github.event.inputs.arch == 'amd64'}} | |
name: Build mev-bor amd | |
strategy: | |
matrix: | |
os: ['ubuntu-20.04'] | |
build_type: [Release] | |
runs-on: ${{ matrix.os }} | |
outputs: | |
bor-checksum: ${{steps.bor.outputs.checksum}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{github.event.inputs.mev-bor-branch}} | |
repository: marlinprotocol/mev-bor | |
submodules: recursive | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '1.19' | |
- name: Make | |
run: make bor | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-southeast-1 | |
- name: Upload | |
id: bor | |
run: | | |
echo "::set-output name=checksum::$(md5sum build/bin/bor | awk '{print $1;}')" | |
aws s3 cp build/bin/bor s3://${{github.event.inputs.release-on}}.artifacts.marlin.pro/projects/mev-bor/${{github.event.inputs.mev-bor-version}}/bor-linux_amd64 | |
build_mev-bor_arm: | |
if: ${{github.event.inputs.mev-bor-version != 'X.Y.Z-beta.U' && github.event.inputs.arch == 'arm64'}} | |
name: Build mev-bor_arm | |
strategy: | |
matrix: | |
os: ['ubuntu-20.04'] | |
build_type: [Release] | |
runs-on: [self-hosted, linux, ARM64] | |
outputs: | |
bor-checksum: ${{steps.bor.outputs.checksum}} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{github.event.inputs.mev-bor-branch}} | |
repository: marlinprotocol/mev-bor | |
submodules: recursive | |
- name: Make | |
run: make bor | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-southeast-1 | |
- name: Upload | |
id: bor | |
run: | | |
echo "::set-output name=checksum::$(md5sum build/bin/bor | awk '{print $1;}')" | |
aws s3 cp build/bin/bor s3://${{github.event.inputs.release-on}}.artifacts.marlin.pro/projects/mev-bor/${{github.event.inputs.mev-bor-version}}/bor-linux_arm64 | |