Skip to content

Commit

Permalink
More QBFT Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jking-aus committed Oct 16, 2024
1 parent 1d99840 commit eb7207f
Show file tree
Hide file tree
Showing 31 changed files with 4,306 additions and 1,398 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# TODO: Setup markdown book
# name: mdbook
#
# on:
# push:
# branches:
# - unstable
#
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
#
# jobs:
# build-and-upload-to-s3:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup mdBook
# uses: peaceiris/actions-mdbook@v1
# with:
# mdbook-version: 'latest'
#
# - run: mdbook build
# working-directory: book
#
# - uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
# with:
# args: --follow-symlinks --delete
# env:
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: 'ap-southeast-2'
# SOURCE_DIR: 'book/book'
name: mdbook

on:
push:
branches:
- unstable

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-upload-to-s3:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'

- run: mdbook build
working-directory: book

- uses: jakejarvis/s3-sync-action@be0c4ab89158cac4278689ebedd8407dd5f35a83
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BOOK_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-southeast-2'
SOURCE_DIR: 'book/book'
20 changes: 10 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# # Enable self-hosted runners for the sigp repo only.
# SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/ssv' }}
# SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/anchor' }}
#
# jobs:
# # Extract the VERSION which is either `latest` or `vX.Y.Z`, and the VERSION_SUFFIX
Expand Down Expand Up @@ -49,10 +49,10 @@
# build-docker-single-arch:
# name: build-docker-${{ matrix.binary }}-${{ matrix.cpu_arch }}${{ matrix.features.version_suffix }}
# # Use self-hosted runners only on the sigp repo.
# runs-on: ${{ github.repository == 'sigp/ssv' && fromJson('["self-hosted", "linux", "release"]') || 'ubuntu-22.04' }}
# runs-on: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "release"]') || 'ubuntu-22.04' }}
# strategy:
# matrix:
# binary: [ssv]
# binary: [anchor]
# cpu_arch: [aarch64, x86_64]
# include:
# - profile: maxperf
Expand All @@ -70,13 +70,13 @@
# run: |
# echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
#
# - name: Sets env vars for SSV
# if: startsWith(matrix.binary, 'lighthouse')
# - name: Sets env vars for Anchor
# if: startsWith(matrix.binary, 'anchor')
# run: |
# echo "CROSS_FEATURES=gnosis,spec-minimal,slasher-lmdb,jemalloc" >> $GITHUB_ENV
#
# - name: Set `make` command for lighthouse
# if: startsWith(matrix.binary, 'lighthouse')
# - name: Set `make` command for anchor
# if: startsWith(matrix.binary, 'anchor')
# run: |
# echo "MAKE_CMD=build-${{ matrix.cpu_arch }}" >> $GITHUB_ENV
#
Expand Down Expand Up @@ -112,8 +112,8 @@
# if: env.SELF_HOSTED_RUNNERS == 'false'
# uses: docker/setup-buildx-action@v3
#
# - name: Build and push (Lighthouse)
# if: startsWith(matrix.binary, 'lighthouse')
# - name: Build and push (Anchor)
# if: startsWith(matrix.binary, 'anchor')
# uses: docker/build-push-action@v5
# with:
# file: ./Dockerfile.cross
Expand Down Expand Up @@ -141,7 +141,7 @@
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# binary: [lighthouse,
# binary: [anchor,
# lcli]
# needs: [build-docker-single-arch, extract-version]
# env:
Expand Down
60 changes: 30 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# env:
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
# REPO_NAME: ${{ github.repository_owner }}/lighthouse
# IMAGE_NAME: ${{ github.repository_owner }}/lighthouse
# REPO_NAME: ${{ github.repository_owner }}/anchor
# IMAGE_NAME: ${{ github.repository_owner }}/anchor
# # Enable self-hosted runners for the sigp repo only.
# SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/lighthouse' }}
# SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/anchor' }}
#
# jobs:
# extract-version:
Expand All @@ -37,16 +37,16 @@
# x86_64-windows]
# include:
# - arch: aarch64-unknown-linux-gnu
# runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
# runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
# profile: maxperf
# - arch: x86_64-unknown-linux-gnu
# runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
# runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
# profile: maxperf
# - arch: x86_64-apple-darwin
# runner: macos-13
# profile: maxperf
# - arch: x86_64-windows
# runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
# runner: ${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
# profile: maxperf
#
# runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -75,29 +75,29 @@
# # Builds
# # ==============================
#
# - name: Build Lighthouse for aarch64-unknown-linux-gnu
# - name: Build Anchor for aarch64-unknown-linux-gnu
# if: matrix.arch == 'aarch64-unknown-linux-gnu'
# run: |
# cargo install cross
# env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64
#
# - name: Build Lighthouse for x86_64-unknown-linux-gnu
# - name: Build Anchor for x86_64-unknown-linux-gnu
# if: matrix.arch == 'x86_64-unknown-linux-gnu'
# run: |
# cargo install cross
# env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64
#
# - name: Move cross-compiled binary
# if: contains(matrix.arch, 'unknown-linux-gnu')
# run: mv target/${{ matrix.arch }}/${{ matrix.profile }}/lighthouse ~/.cargo/bin/lighthouse
# run: mv target/${{ matrix.arch }}/${{ matrix.profile }}/anchor ~/.cargo/bin/anchor
#
# - name: Build Lighthouse for x86_64-apple-darwin
# - name: Build Anchor for x86_64-apple-darwin
# if: matrix.arch == 'x86_64-apple-darwin'
# run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
# run: cargo install --path anchor --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
#
# - name: Build Lighthouse for Windows
# - name: Build Anchor for Windows
# if: matrix.arch == 'x86_64-windows'
# run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
# run: cargo install --path anchor --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
#
# - name: Configure GPG and create artifacts
# if: startsWith(matrix.arch, 'x86_64-windows') != true
Expand All @@ -108,10 +108,10 @@
# export GPG_TTY=$(tty)
# echo "$GPG_SIGNING_KEY" | gpg --batch --import
# mkdir artifacts
# mv ~/.cargo/bin/lighthouse ./artifacts
# mv ~/.cargo/bin/anchor ./artifacts
# cd artifacts
# tar -czf lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz lighthouse
# echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# tar -czf anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz anchor
# echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# for ext in "tar.gz" "tar.gz.asc";\
# do for f in *.$ext;\
# do cp $f "../${f%.$ext}.$ext";\
Expand All @@ -127,10 +127,10 @@
# run: |
# echo $env:GPG_SIGNING_KEY | gpg --batch --import
# mkdir artifacts
# move $env:USERPROFILE/.cargo/bin/lighthouse.exe ./artifacts
# move $env:USERPROFILE/.cargo/bin/anchor.exe ./artifacts
# cd artifacts
# tar -czf lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz lighthouse.exe
# gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# tar -czf anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz anchor.exe
# gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# move *tar.gz* ..
#
# # =======================================================================
Expand All @@ -141,15 +141,15 @@
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# name: anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# path: anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
# compression-level: 0
#
# - name: Upload signature
# uses: actions/upload-artifact@v4
# with:
# name: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
# path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
# name: anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
# path: anchor-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
# compression-level: 0
#
# draft-release:
Expand Down Expand Up @@ -222,7 +222,7 @@
# |Non-Staking Users| <TODO>|---|
#
# *See [Update
# Priorities](https://lighthouse-book.sigmaprime.io/installation-priorities.html)
# Priorities](https://anchor-book.sigmaprime.io/installation-priorities.html)
# more information about this table.*
#
# ## All Changes
Expand All @@ -231,21 +231,21 @@
#
# ## Binaries
#
# [See pre-built binaries documentation.](https://lighthouse-book.sigmaprime.io/installation-binaries.html)
# [See pre-built binaries documentation.](https://anchor-book.sigmaprime.io/installation-binaries.html)
#
# The binaries are signed with Sigma Prime's PGP key: `15E66D941F697E28F49381F426416DC3F30674B0`
#
# | System | Architecture | Binary | PGP Signature |
# |:---:|:---:|:---:|:---|
# | <img src="https://simpleicons.org/icons/apple.svg" style="width: 32px;"/> | x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
# | <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
# | <img src="https://simpleicons.org/icons/raspberrypi.svg" style="width: 32px;"/> | aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
# | <img src="https://upload.wikimedia.org/wikipedia/commons/c/c4/Windows_logo_-_2021_%28Black%29.svg" style="width: 32px;"/> | x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz.asc) |
# | <img src="https://simpleicons.org/icons/apple.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
# | <img src="https://simpleicons.org/icons/linux.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
# | <img src="https://simpleicons.org/icons/raspberrypi.svg" style="width: 32px;"/> | aarch64 | [anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
# | <img src="https://upload.wikimedia.org/wikipedia/commons/c/c4/Windows_logo_-_2021_%28Black%29.svg" style="width: 32px;"/> | x86_64 | [anchor-${{ env.VERSION }}-x86_64-windows.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-windows.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/anchor-${{ env.VERSION }}-x86_64-windows.tar.gz.asc) |
# | | | | |
# | **System** | **Option** | - | **Resource** |
# | <img src="https://simpleicons.org/icons/docker.svg" style="width: 32px;"/> | Docker | [${{ env.VERSION }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}/tags?page=1&ordering=last_updated&name=${{ env.VERSION }}) | [${{ env.IMAGE_NAME }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}) |
# ENDBODY
# )
# assets=(./lighthouse-*.tar.gz*/lighthouse-*.tar.gz*)
# assets=(./anchor-*.tar.gz*/anchor-*.tar.gz*)
# tag_name="${{ env.VERSION }}"
# echo "$body" | gh release create --draft -F "-" "$tag_name" "${assets[@]}"
Loading

0 comments on commit eb7207f

Please sign in to comment.