-
Notifications
You must be signed in to change notification settings - Fork 438
92 lines (90 loc) · 3.71 KB
/
build-nethermind-packages.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build Nethermind packages
on:
workflow_dispatch:
jobs:
build:
name: Build Nethermind packages
runs-on: ubuntu-latest
env:
PACKAGE_DIR: pkg
PACKAGE_RETENTION: 7
PUB_DIR: pub
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v3
with:
path: nethermind
- name: Check out Nethermind Launcher repository
uses: actions/checkout@v3
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: nethermind/global.json
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install npm packages
run: npm i -g pkg @vercel/ncc
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build Nethermind.Runner
id: build-runner
run: |
cd nethermind
build_timestamp=$(date '+%s')
echo "build-timestamp=$build_timestamp" >> $GITHUB_OUTPUT
echo "commit-hash=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
scripts/deployment/build-runner.sh $GITHUB_SHA $build_timestamp
- name: Build Nethermind.Cli
run: nethermind/scripts/deployment/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Build Nethermind launcher
run: nethermind/scripts/deployment/build-launcher.sh
- name: Build Nethermind launcher for Linux arm64
run: |
cd nethermind
docker buildx build --platform=linux/arm64 -t tmp-launcher -f Dockerfile.launcher . --load
docker run --platform=linux/arm64 -v $PWD:/opt/mount --rm tmp-launcher bash -c "cp /nethermind/nethermind-launcher /opt/mount/"
mv nethermind-launcher $GITHUB_WORKSPACE/$PUB_DIR/linux-arm64/nethermind-launcher
- name: Archive packages
env:
PACKAGE_PREFIX: nethermind-preview-${{ steps.build-runner.outputs.commit-hash }}
run: |
echo "PACKAGE_PREFIX=$PACKAGE_PREFIX" >> $GITHUB_ENV
nethermind/scripts/deployment/archive-packages.sh
- name: Upload Nethermind Linux x64 package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_PREFIX }}-linux-x64-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*linux-x64*
retention-days: ${{ env.PACKAGE_RETENTION }}
- name: Upload Nethermind Linux arm64 package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_PREFIX }}-linux-arm64-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*linux-arm64*
retention-days: ${{ env.PACKAGE_RETENTION }}
- name: Upload Nethermind Windows x64 package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_PREFIX }}-windows-x64-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*windows-x64*
retention-days: ${{ env.PACKAGE_RETENTION }}
- name: Upload Nethermind macOS x64 package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_PREFIX }}-macos-x64-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*macos-x64*
retention-days: ${{ env.PACKAGE_RETENTION }}
- name: Upload Nethermind macOS arm64 package
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_PREFIX }}-macos-arm64-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*macos-arm64*
retention-days: ${{ env.PACKAGE_RETENTION }}