-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (77 loc) · 3.58 KB
/
oyster-keygen.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
name: Build oyster-keygen
on:
workflow_dispatch:
inputs:
keygen-ed25519-version:
description: 'keygen ed25519 binary version'
required: false
default: 'vX.Y.Z-beta.U'
keygen-secp256k1-version:
description: 'keygen secp256k1 binary version'
required: false
default: 'vX.Y.Z-beta.U'
version-description:
description: 'description for new version'
required: false
default: 'automated'
jobs:
build_linux:
name: Build raw proxies linux
strategy:
matrix:
include:
- os: 'ubuntu-24.04'
runs-on: 'ubicloud'
build_type: Release
GOOS: linux
GOARCH: amd64
rust-image: 'ed7795c6eaccae53be35939e883e8c3de0197b21e8eddbd9f04b0c4bc757c094'
target: x86_64-unknown-linux-musl
- os: 'ubuntu-24.04'
runs-on: 'ubicloud-standard-2-arm'
build_type: Release
GOOS: linux
GOARCH: arm64
rust-image: 'c428882ff081342a9661fb13a1d059ecdc0b6e979ffec64b80371cf20a2088b0'
target: aarch64-unknown-linux-musl
runs-on: ${{ matrix.runs-on }}
outputs:
keygen-ed25519-checksum: ${{steps.keygen-ed25519.outputs.checksum}}
keygen-secp256k1-checksum: ${{steps.keygen-secp256k1.outputs.checksum}}
steps:
- name: echo
run: |
echo keygen-ed25519-version ${{github.event.inputs.keygen-ed25519-version}}
echo keygen-secp256k1-version ${{github.event.inputs.keygen-secp256k1-version}}
echo version-description ${{github.event.inputs.version-description}}
- name: clone
run: rm -rf oyster-keygen && git clone https://github.com/marlinprotocol/oyster-keygen oyster-keygen
- name: checkout
run: cd oyster-keygen && git checkout master
- name: build
run: cd oyster-keygen && sudo docker run --rm -v `pwd`:/code rust@sha256:${{matrix.rust-image}} /code/build-${{matrix.GOARCH}}.sh
- 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: upx
run: |
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-${{matrix.GOARCH}}_linux.tar.xz -O upx.txz
mkdir -p upx && tar -xvf upx.txz --strip-components=1 -C upx
sudo mv upx/upx /usr/local/bin/
- name: upload keygen-ed25519
id: keygen-ed25519
if: ${{github.event.inputs.keygen-ed25519-version != 'vX.Y.Z-beta.U'}}
run: |
sudo upx oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519
echo "::set-output name=checksum::$(sha256sum oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519 | awk '{print $1;}')"
aws s3 cp oyster-keygen/target/${{matrix.target}}/release/keygen-ed25519 s3://public.artifacts.marlin.pro/projects/enclaves/keygen-ed25519_${{github.event.inputs.keygen-ed25519-version}}_${{matrix.GOOS}}_${{matrix.GOARCH}}
- name: upload keygen-secp256k1
id: keygen-secp256k1
if: ${{github.event.inputs.keygen-secp256k1-version != 'vX.Y.Z-beta.U'}}
run: |
sudo upx oyster-keygen/target/${{matrix.target}}/release/keygen-secp256k1
echo "::set-output name=checksum::$(sha256sum oyster-keygen/target/${{matrix.target}}/release/keygen-secp256k1 | awk '{print $1;}')"
aws s3 cp oyster-keygen/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}}