Skip to content

Commit

Permalink
Update actions for the new name
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Sep 25, 2024
1 parent 7206a87 commit 6de9ad3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
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[@]}"
12 changes: 6 additions & 6 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ env:
RUSTFLAGS: "-D warnings -C debuginfo=0"
# Prevent Github API rate limiting.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Enable self-hosted runners for the SSV repo only.
SELF_HOSTED_RUNNERS: false # ${{ github.repository == 'sigp/ssv' }}
# Enable self-hosted runners for the Anchor repo only.
SELF_HOSTED_RUNNERS: false # ${{ github.repository == 'sigp/anchor' }}
# Self-hosted runners need to reference a different host for `./watch` tests.
WATCH_HOST: ${{ github.repository == 'sigp/ssv' && 'host.docker.internal' || 'localhost' }}
WATCH_HOST: ${{ github.repository == 'sigp/anchor' && 'host.docker.internal' || 'localhost' }}
# Disable incremental compilation
CARGO_INCREMENTAL: 0
# Enable portable to prevent issues with caching `blst` for the wrong CPU type
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
# Use self-hosted runners only on the sigp repo.
runs-on: ubuntu-latest #${{ github.repository == 'sigp/ssv' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
runs-on: ubuntu-latest #${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- name: Get latest version of stable Rust
Expand All @@ -86,7 +86,7 @@ jobs:
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
# Use self-hosted runners only on the sigp repo.
runs-on: ubuntu-latest #${{ github.repository == 'sigp/ssv' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
runs-on: ubuntu-latest #${{ github.repository == 'sigp/anchor' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Install Rust at Minimum Supported Rust Version (MSRV)
run: |
metadata=$(cargo metadata --no-deps --format-version 1)
msrv=$(echo $metadata | jq -r '.packages | map(select(.name == "ssv")) | .[0].rust_version')
msrv=$(echo $metadata | jq -r '.packages | map(select(.name == "anchor")) | .[0].rust_version')
rustup override set $msrv
- name: Run cargo check
run: cargo check --workspace
Expand Down

0 comments on commit 6de9ad3

Please sign in to comment.