Skip to content

Nightly build

Nightly build #1287

Workflow file for this run

# Nimbus
# Copyright (c) 2020-2025 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
# http://www.apache.org/licenses/LICENSE-2.0)
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
# http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except
# according to those terms.
name: Nightly build
on:
schedule:
- cron: "45 5 * * *"
workflow_dispatch:
jobs:
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: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Extract branch name
id: extract_branch
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: Build project
id: make_dist
run: |
make dist-${{ matrix.os }}-${{ matrix.cpu }}
cd dist
ARCHIVE=$(echo *.tar.gz)
tar -xzf ${ARCHIVE}
NEW_ARCHIVE_DIR="nimbus-eth1-${{ matrix.os }}-${{ matrix.cpu }}-${{ steps.extract_branch.outputs.branch_name }}-$(git rev-parse --short=8 HEAD)"
mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR}
tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR}
cp ${NEW_ARCHIVE_DIR}.tar.gz nimbus-eth1-${{ matrix.os }}-${{ matrix.cpu }}-nightly-latest.tar.gz
echo "archive=${NEW_ARCHIVE_DIR}.tar.gz" >> $GITHUB_OUTPUT
echo "archive_dir=${NEW_ARCHIVE_DIR}" >> $GITHUB_OUTPUT
- name: Upload archive artefact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.cpu }}-archive
path: |
./dist/${{ steps.make_dist.outputs.archive }}
./dist/nimbus-eth1-${{ matrix.os }}-${{ matrix.cpu }}-nightly-latest.tar.gz
retention-days: 2
- name: Upload checksum artefact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.cpu }}-checksum
path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_execution_client.sha512sum
retention-days: 2
nightly-build-release:
name: Nightly build release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Extract branch name
id: extract_branch
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: Download artefacts
uses: actions/download-artifact@v4
- name: Create release notes
run: |
cat > release_notes.md <<EOF
## SHA512 checksums
\`\`\`text
EOF
echo '# Linux AMD64' >> release_notes.md
cat linux-amd64-checksum/* >> release_notes.md
echo '# Linux ARM64' >> release_notes.md
cat linux-arm64-checksum/* >> release_notes.md
echo '# Windows AMD64' >> release_notes.md
cat windows-amd64-checksum/* >> release_notes.md
echo '# macOS ARM64' >> release_notes.md
cat macos-arm64-checksum/* >> release_notes.md
echo '```' >> release_notes.md
- name: Delete tag
run: gh release delete $TAG --cleanup-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: nightly
- name: Update Nightly Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'Nightly build ("${{ steps.extract_branch.outputs.branch_name }}" branch)'
body_path: release_notes.md
files: |
linux-amd64-archive/*
linux-arm64-archive/*
windows-amd64-archive/*
macos-arm64-archive/*
- name: Delete artefacts
uses: geekyeggo/delete-artifact@v5
with:
failOnError: false
name: |
linux-amd64-archive
linux-amd64-checksum
linux-arm64-archive
linux-arm64-checksum
windows-amd64-archive
windows-amd64-checksum
macos-arm64-archive
macos-arm64-checksum