Skip to content

Commit

Permalink
Remove Nethermind launcher build (#6404)
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo authored Dec 21, 2023
1 parent 536e2f7 commit 90416e5
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 102 deletions.
50 changes: 17 additions & 33 deletions .github/workflows/build-nethermind-packages.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,49 @@
name: Build Nethermind packages

on:
on:
workflow_dispatch:

jobs:
build:
name: Build Nethermind packages
runs-on: ubuntu-latest
env:
env:
PACKAGE_DIR: pkg
PACKAGE_RETENTION: 7
PUB_DIR: pub
steps:
- name: Check out Nethermind repository
- name: Check out repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Check out Nethermind Launcher repository
uses: actions/checkout@v4
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: nethermind/global.json
- name: Set up Node.js
uses: actions/setup-node@v4
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: scripts/deployment/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Bundle Nethermind launcher
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
json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
curl -sSL $url -o $PUB_DIR/osx-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
scripts/deployment/archive-packages.sh
- name: Upload Nethermind Linux x64 package
uses: actions/upload-artifact@v4
with:
Expand Down
45 changes: 15 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release

on:
on:
workflow_dispatch:
inputs:
tag:
Expand All @@ -27,30 +27,10 @@ jobs:
package-prefix: ${{ steps.archive.outputs.package-prefix }}
prerelease: ${{ steps.build-runner.outputs.prerelease }}
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Check out Nethermind Launcher repository
- name: Check out repository
uses: actions/checkout@v4
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: nethermind/global.json
- name: Set up Node.js
uses: actions/setup-node@v4
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: |
Expand All @@ -61,14 +41,19 @@ jobs:
$SCRIPTS_PATH/build-runner.sh $GITHUB_SHA $build_timestamp
- name: Build Nethermind.Cli
run: $SCRIPTS_PATH/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Build Nethermind launcher
run: $SCRIPTS_PATH/build-launcher.sh
- name: Build Nethermind launcher for Linux arm64
working-directory: nethermind
- name: Bundle Nethermind launcher
run: |
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
json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
curl -sSL $url -o $PUB_DIR/osx-arm64/nethermind-launcher
- name: Archive packages
id: archive
env:
Expand Down Expand Up @@ -112,7 +97,7 @@ jobs:
name: ${{ steps.archive.outputs.package-prefix }}-ref-assemblies-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*ref-assemblies*
retention-days: ${{ env.PACKAGE_RETENTION }}

approval:
name: Approve
runs-on: ubuntu-latest
Expand Down
17 changes: 0 additions & 17 deletions Dockerfile.launcher

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/deployment/build-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

output_path=$GITHUB_WORKSPACE/$PUB_DIR

cd $GITHUB_WORKSPACE/nethermind/src/Nethermind/Nethermind.Cli
cd $GITHUB_WORKSPACE/src/Nethermind/Nethermind.Cli

echo "Building Nethermind CLI"

Expand Down
20 changes: 0 additions & 20 deletions scripts/deployment/build-launcher.sh

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/deployment/build-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
build_config=release
output_path=$GITHUB_WORKSPACE/$PUB_DIR

cd $GITHUB_WORKSPACE/nethermind/src/Nethermind/Nethermind.Runner
cd $GITHUB_WORKSPACE/src/Nethermind/Nethermind.Runner

echo "Building Nethermind"

Expand Down

0 comments on commit 90416e5

Please sign in to comment.