Build keygen-secp256k1 #5
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 keygen-secp256k1 | |
on: | |
workflow_dispatch: | |
inputs: | |
keygen-secp256k1-version: | |
description: 'keygen-secp256k1 version' | |
# required: false | |
# default: 'X.Y.Z-beta.U' | |
jobs: | |
build_keygen-secp256k1_linux: | |
name: Build keygen-secp256k1 linux | |
strategy: | |
matrix: | |
include: | |
- os: 'ubuntu-22.04' | |
runs-on: 'ubuntu-22.04' | |
build_type: Release | |
GOOS: linux | |
GOARCH: amd64 | |
target: x86_64-unknown-linux-musl | |
- os: 'ubuntu-22.04' | |
runs-on: self-hosted | |
build_type: Release | |
GOOS: linux | |
GOARCH: arm64 | |
target: aarch64-unknown-linux-musl | |
runs-on: ${{ matrix.runs-on }} | |
outputs: | |
keygen-secp256k1-checksum: ${{steps.keygen-secp256k1.outputs.checksum}} | |
steps: | |
- name: echo | |
run: | | |
echo keygen-secp256k1-version ${{github.event.inputs.keygen-secp256k1-version}} | |
- name: setup rust | |
run: rustup update && rustup target add ${{ matrix.target }} && sudo apt-get install -y musl-tools | |
- name: clone | |
run: rm -rf keygen-secp256k1 && git clone https://github.com/marlinprotocol/keygen keygen-secp256k1 | |
- name: checkout | |
run: cd keygen-secp256k1 && git checkout master | |
- name: build | |
run: cd keygen-secp256k1 && CC=musl-gcc cargo build --release --target ${{ matrix.target }} --bin keygen-secp256k1 | |
- name: 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 keygen-secp256k1 | |
id: keygen-secp256k1 | |
# if: ${{github.event.inputs.keygen-secp256k1-version != 'X.Y.Z-beta.U'}} | |
run: | | |
echo "::set-output name=checksum::$(md5sum keygen-secp256k1/target/${{ matrix.target }}/release/keygen-secp256k1 | awk '{print $1;}')" | |
upx keygen-secp256k1/target/${{ matrix.target }}/release/keygen-secp256k1 | |
aws s3 cp keygen-secp256k1/target/${{ matrix.target }}/release/keygen-secp256k1 s3://public.artifacts.marlin.pro/projects/enclaves/keygen-secp256k1_${{github.event.inputs.keygen-secp256k1-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}} |