Skip to content

Use hash writer for aristo computeKey #1216

Use hash writer for aristo computeKey

Use hash writer for aristo computeKey #1216

Workflow file for this run

# Nimbus
# Copyright (c) 2021-2025 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
name: Nimbus Portal CI
on:
push:
paths-ignore:
- 'doc/**'
- 'portal/docs/**'
- '**/*.md'
- 'nimbus_verified_proxy/**'
- '.github/workflows/nimbus_verified_proxy.yml'
- '.github/workflows/build_base_image.yml'
- 'docker/**'
pull_request:
paths-ignore:
- 'doc/**'
- 'portal/docs/**'
- '**/*.md'
- 'nimbus_verified_proxy/**'
- '.github/workflows/nimbus_verified_proxy.yml'
- '.github/workflows/build_base_image.yml'
- 'docker/**'
workflow_dispatch:
jobs:
# separate job so it can run concurrently with other tests
testutp:
# whole test setup runs on ubuntu so we do not need multiple arch setup here
runs-on: ubuntu-22.04
# TODO: for now only push event as this way it is easier to get branch name
# to build container
# if: github.event_name == 'push'
if: false
steps:
- name: Checkout nimbus-eth1
uses: actions/checkout@v4
- name: Install modprobe
run: |
sudo apt-get install -y kmod
# It is required to correctly run the simulation
- name: Load iptables6 kernel modules
run: |
sudo modprobe ip6table_filter
- name: Get latest nimbus-build-system commit hash
id: versions
run: |
getHash() {
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1
}
nbsHash=$(getHash status-im/nimbus-build-system)
echo "nimbus_build_system=$nbsHash" >> $GITHUB_OUTPUT
- name: Restore prebuilt Nim binaries from cache
id: nim-cache
uses: actions/cache@v4
with:
path: NimBinaries
key: 'nim-linux-amd64-${{ steps.versions.outputs.nimbus_build_system }}-portal'
- name: Build Nim and Nimbus-eth1 dependencies
run: |
make -j${ncpu} ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries init
- name: build uTP test app container
run: |
docker build -t test-utp --no-cache --build-arg BRANCH_NAME=${{ github.ref_name }} portal/tools/utp_testing/docker
- name: run test app with simulator
run: |
: find / -name docker-compose -printf "%h\n%f\n%m\n\n" 2>/dev/null
PATH=$PATH$(find /usr/libexec/docker -name docker-compose -printf ":%h")
SCENARIO="drop-rate --delay=15ms --bandwidth=10Mbps --queue=25 --rate_to_client=10 --rate_to_server=10" docker-compose -f portal/tools/utp_testing/docker/docker-compose.yml up -d
- name: wait 5 seconds for containers to start
run: |
sleep 5
- name: check containers
run: |
docker ps -a
- name: run uTP test
run: |
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
DEFAULT_MAKE_FLAGS="-j${ncpu}"
env CC=gcc CXX=g++ make ${DEFAULT_MAKE_FLAGS} utp-test
- name: Stop containers
if: always()
run: |
PATH=$PATH$(find /usr/libexec/docker -name docker-compose -printf ":%h")
docker-compose -f portal/tools/utp_testing/docker/docker-compose.yml down
matrix_config:
uses: ./.github/workflows/matrix_config.yml
build:
needs: matrix_config
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix_config.outputs.matrix) }}
defaults:
run:
shell: bash
name: '${{ matrix.os }}-${{ matrix.cpu }}'
runs-on: ${{ matrix.builder }}
steps:
- name: Checkout nimbus-eth1
uses: actions/checkout@v4
- id: shared-action
uses: ./.github/actions/shared
with:
llvm-mingw: true
nim-cache: true
rocksdb-cache: true
eest-cache: false
- name: Run Nimbus Portal tests (Windows)
if: runner.os == 'Windows'
run: |
gcc --version
DEFAULT_MAKE_FLAGS="-j${ncpu} ROCKSDB_CI_CACHE=RocksBinCache"
mingw32-make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client
build/nimbus_portal_client.exe --help
# find . -type d -name ".git" -exec rm -rf {} +
find . -type d -name "nimcache" -exec rm -rf {} +
mingw32-make ${DEFAULT_MAKE_FLAGS} portal-tools
find . -type d -name "nimcache" -exec rm -rf {} +
mingw32-make ${DEFAULT_MAKE_FLAGS} portal-test
find . -type d -name "nimcache" -exec rm -rf {} +
- name: Run Nimbus Portal tests (Linux)
if: runner.os == 'Linux'
run: |
gcc --version
./env.sh nim -v
ldd --version
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"
DEFAULT_MAKE_FLAGS="-j${ncpu} ROCKSDB_CI_CACHE=RocksBinCache"
env CC=gcc make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client
build/nimbus_portal_client --help
env CC=gcc make ${DEFAULT_MAKE_FLAGS} portal-tools
# CC is needed to select correct compiler 32/64 bit
env CC=gcc CXX=g++ make ${DEFAULT_MAKE_FLAGS} portal-test
- name: Run Nimbus Portal tests (Macos)
if: runner.os == 'Macos'
run: |
DEFAULT_MAKE_FLAGS="-j${ncpu} ROCKSDB_CI_CACHE=RocksBinCache"
make ${DEFAULT_MAKE_FLAGS} nimbus_portal_client
build/nimbus_portal_client --help
make ${DEFAULT_MAKE_FLAGS} portal-tools
# "-static" option will not work for osx unless static system libraries are provided
make ${DEFAULT_MAKE_FLAGS} portal-test
- name: Run Portal testnet
run: |
./portal/scripts/launch_local_testnet.sh --nodes=64 --run-tests
lint:
name: "Lint Nimbus Portal"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base
- name: Check nph formatting
# Pin nph to a specific version to avoid sudden style differences.
# Updating nph version should be accompanied with running the new
# version on the portal directory.
run: |
VERSION="v0.6.1"
ARCHIVE="nph-linux_x64.tar.gz"
curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE}
tar -xzf ${ARCHIVE}
./nph portal/
git diff --exit-code
- name: Check copyright year
if: ${{ !cancelled() }} && github.event_name == 'pull_request'
run: |
bash scripts/check_copyright_year.sh