-
Notifications
You must be signed in to change notification settings - Fork 60
56 lines (54 loc) · 1.81 KB
/
binaries.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
name: Build binaries
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
workflow_call:
inputs:
version:
required: true
type: string
jobs:
binaries:
name: Build skandha binaries
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
arch: amd64
- os: skandha-arm64-runner
platform: linux
arch: arm64
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install arm64 specifics
run: |-
# Install missing yarn
# See https://github.com/github-early-access/arm-runners-beta/issues/5
curl -fsSL --create-dirs -o $HOME/bin/yarn \
https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js
chmod +x $HOME/bin/yarn
echo "$HOME/bin" >> $GITHUB_PATH
# Install missing build-essential
sudo apt-get update
sudo apt-get install -y build-essential
- uses: "./.github/actions/setup-and-build"
with:
node: 20
- run: |
mkdir -p dist
yarn global add [email protected]
npx caxa -m "Unpacking skandha binary, please wait..." -D -p "yarn install --frozen-lockfile --production" --input . --output "skandha" -- "{{caxa}}/node_modules/.bin/node" "--max-old-space-size=8192" "{{caxa}}/node_modules/.bin/skandha"
tar -czf "dist/skandha-${{ inputs.version }}-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz" "skandha"
- name: Upload binaries
if: ${{ !github.event.act }} # skip during local actions testing
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.os }}
path: dist/
if-no-files-found: error