Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Oct 12, 2023
1 parent 39a1feb commit 09dbce5
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 63 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-nethermind-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ jobs:
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 pkg @vercel/ncc -g
- name: Set up .NET
uses: actions/setup-dotnet@v3
run: npm i -g pkg @vercel/ncc
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build Nethermind.Runner
id: build-runner
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,21 @@ jobs:
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 pkg @vercel/ncc -g
- name: Set up .NET
uses: actions/setup-dotnet@v3
run: npm i -g pkg @vercel/ncc
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Build Nethermind.Runner
id: build-runner
run: |
Expand Down
111 changes: 58 additions & 53 deletions .github/workflows/run-posdao-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,68 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to get tests from'
description: Branch to get tests from
required: false
default: 'bc-test-merge'
default: bc-test-merge

jobs:
run-posdao-tests:
name: Run Nethermind POSDAO tests
runs-on: ubuntu-latest
steps:
- name: Install Linux packages
run: |
sudo apt-get update
sudo apt-get install libsnappy-dev libc6-dev libc6
- name: Check out Nethermind repository
uses: actions/checkout@v3
with:
submodules: recursive
path: nethermind
- name: Check out posdao-test-setup repository
uses: actions/checkout@v3
with:
repository: NethermindEth/posdao-test-setup
ref: ${{ github.event.inputs.branch }}
submodules: recursive
path: posdao-test-setup
- name: Set up .NET
uses: actions/setup-dotnet@v3
- name: Build Nethermind
run: |
cd nethermind
mkdir bin
cd src/Nethermind
dotnet build Nethermind.sln -c release
cp -r artifacts/bin/Nethermind.Runner/release/* $GITHUB_WORKSPACE/nethermind/bin/
- name: Set up Node.js v12
if: ${{ !contains(github.event.inputs.branch, 'merge') }}
uses: actions/setup-node@v1.4.4
with:
node-version: 12
- name: Set up Node.js v16
if: ${{ contains(github.event.inputs.branch, 'merge') }}
uses: actions/setup-node@v1.4.4
with:
node-version: 16
- name: Run tests
run: |
cd posdao-test-setup
npm run all-nethermind-no-watcher
- name: Collect logs if workflow canceled # otherwise it's collected in the test step
if: cancelled()
run: cd posdao-test-setup && bash scripts/collect-logs
- name: Move logs to different dir
if: always()
run: mkdir posdao-logs && cp posdao-test-setup/posdao-logs/latest/* posdao-logs && ls posdao-logs
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: posdao-logs
path: posdao-logs/*
- name: Check out Nethermind repository
uses: actions/checkout@v3
with:
submodules: recursive
path: nethermind
- name: Check out posdao-test-setup repository
uses: actions/checkout@v3
with:
repository: NethermindEth/posdao-test-setup
ref: ${{ github.event.inputs.branch }}
submodules: recursive
path: posdao-test-setup
- name: Install Linux packages
run: sudo apt-get update && sudo apt-get install libsnappy-dev
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: nethermind/global.json
- name: Build Nethermind
run: |
cd nethermind
mkdir bin
cd src/Nethermind
dotnet build Nethermind.sln -c release
cp -r artifacts/bin/Nethermind.Runner/release/* $GITHUB_WORKSPACE/nethermind/bin/
- name: Set up Node.js v12
if: ${{ !contains(github.event.inputs.branch, 'merge') }}
uses: actions/setup-node@v3
with:
node-version: 12
- name: Set up Node.js v16
if: ${{ contains(github.event.inputs.branch, 'merge') }}
uses: actions/setup-node@v3
with:
node-version: 16
- name: Run tests
run: |
cd posdao-test-setup
npm run all-nethermind-no-watcher
- name: Collect logs if workflow canceled # otherwise, it's collected in the test step
if: cancelled()
run: |
cd posdao-test-setup
bash scripts/collect-logs
- name: Move logs to different dir
if: always()
run: |
mkdir posdao-logs
cp posdao-test-setup/posdao-logs/latest/* posdao-logs
ls posdao-logs
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: posdao-logs
path: posdao-logs/*

0 comments on commit 09dbce5

Please sign in to comment.