From 876a4cd684db54bedb386611da15f42a58dee252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 17:52:28 +0200 Subject: [PATCH 1/9] CI cron: try a different expression syntax --- .github/workflows/cron.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 429847f37c..8aaad6e32f 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "45 3 * * *" + - cron: "55 15 * * *" jobs: build: @@ -41,7 +41,7 @@ jobs: name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})' runs-on: ${{ matrix.builder }} - continue-on-error: ${{ matrix.branch }} == 'devel' + continue-on-error: ${{ matrix.branch == 'devel' }} steps: - name: Checkout nimbus-eth2 uses: actions/checkout@v2 From 57259cf0d917ee0efb7e5c58766dab0ffdd89468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 18:21:16 +0200 Subject: [PATCH 2/9] CI cron: debug fixture download --- .github/workflows/cron.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 8aaad6e32f..778b5c07d8 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "55 15 * * *" + - cron: "25 16 * * *" jobs: build: @@ -171,7 +171,7 @@ jobs: - name: Get the Ethereum Foundation fixtures shell: bash run: | - scripts/setup_official_tests.sh fixturesCache + V=1 scripts/setup_official_tests.sh fixturesCache - name: Build Nim and Nimbus dependencies shell: bash From dd84ecd520efc284b70f05c1a4631a30a1865472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 18:21:16 +0200 Subject: [PATCH 3/9] CI cron: debug fixture download --- .github/workflows/cron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 778b5c07d8..6ce13fbea0 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "25 16 * * *" + - cron: "30 16 * * *" jobs: build: From 00dadaba15c0db7c86ff4ec4b45ed78be88dc9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 18:36:33 +0200 Subject: [PATCH 4/9] CI cron: reschedule it --- .github/workflows/cron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 6ce13fbea0..41e8e5b56f 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "30 16 * * *" + - cron: "40 16 * * *" jobs: build: From 74722f16959a84ad72a664597440f20bb515f2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 19:02:06 +0200 Subject: [PATCH 5/9] CI cron: reschedule --- .github/workflows/cron.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 41e8e5b56f..e764b8bbd2 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "40 16 * * *" + - cron: "40 17 * * *" jobs: build: From 8b15c5d75f55007635cb1656b5c525196336847c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 20 May 2021 20:00:38 +0200 Subject: [PATCH 6/9] CI cron: change step order --- .github/workflows/cron.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index e764b8bbd2..f210d953ba 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,7 +1,7 @@ name: Daily on: schedule: - - cron: "40 17 * * *" + - cron: "10 20 * * *" jobs: build: @@ -151,6 +151,11 @@ jobs: brew install gnu-getopt brew link --force gnu-getopt + - name: Build Nim and Nimbus dependencies + shell: bash + run: | + make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }} ARCH_OVERRIDE=${PLATFORM} QUICK_AND_DIRTY_COMPILER=1 update + - name: Get latest fixtures commit hash id: fixtures_version shell: bash @@ -171,12 +176,7 @@ jobs: - name: Get the Ethereum Foundation fixtures shell: bash run: | - V=1 scripts/setup_official_tests.sh fixturesCache - - - name: Build Nim and Nimbus dependencies - shell: bash - run: | - make -j ${ncpu} NIM_COMMIT=${{ matrix.branch }} ARCH_OVERRIDE=${PLATFORM} QUICK_AND_DIRTY_COMPILER=1 update + scripts/setup_official_tests.sh fixturesCache - name: Smoke test the Beacon Node and Validator Client with all tracing enabled shell: bash From a2cbcff89c4c4e56fc6fc6afff2bb9f02db361fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 9 Jun 2021 02:20:29 +0200 Subject: [PATCH 7/9] CI: nightly build workflow --- .github/workflows/nightly_build.yml | 308 ++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 .github/workflows/nightly_build.yml diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml new file mode 100644 index 0000000000..e8fae6533c --- /dev/null +++ b/.github/workflows/nightly_build.yml @@ -0,0 +1,308 @@ +name: Nightly build +on: + schedule: + - cron: "45 4 * * *" + workflow_dispatch: + #pull_request: + +jobs: + build-amd64: + name: Linux AMD64 release asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-amd64 + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_Linux_amd64_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_amd64_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_amd64_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + build-arm64: + name: Linux ARM64 release asset + runs-on: ubuntu-latest + steps: + - name: Install packages + env: + DEBIAN_FRONTEND: "noninteractive" + TZ: "Etc/UTC" + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install binfmt-support qemu-user-static + + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-arm64 + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_Linux_arm64v8_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_arm64_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_arm64_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + build-arm: + name: Linux ARM release asset + runs-on: ubuntu-latest + steps: + - name: Install packages + env: + DEBIAN_FRONTEND: "noninteractive" + TZ: "Etc/UTC" + run: | + sudo apt-get -qq update + sudo apt-get -qq -y install binfmt-support qemu-user-static + + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-arm + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_Linux_arm32v7_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_arm_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: Linux_arm_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + build-win64: + name: Windows AMD64 release asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-win64 + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_Windows_amd64_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: Windows_amd64_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: Windows_amd64_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + build-macos-amd64: + name: macOS AMD64 release asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-macos + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_macOS_amd64_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: macOS_amd64_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: macOS_amd64_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + build-macos-arm64: + name: macOS ARM64 release asset + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + + - name: Build project + id: make_dist + run: | + make dist-macos-arm64 + cd dist + ARCHIVE=$(echo *.tar.gz) + tar -xzf ${ARCHIVE} + NEW_ARCHIVE_DIR="nimbus-eth2_macOS_arm64_$(date +%Y%m%d)_$(git rev-parse --short=8 HEAD)" + mv ${ARCHIVE%.tar.gz} ${NEW_ARCHIVE_DIR} + tar -czf ${NEW_ARCHIVE_DIR}.tar.gz ${NEW_ARCHIVE_DIR} + echo "::set-output name=archive::"${NEW_ARCHIVE_DIR}.tar.gz + echo "::set-output name=archive_dir::"${NEW_ARCHIVE_DIR} + + - name: Upload archive artefact + uses: actions/upload-artifact@v2 + with: + name: macOS_arm64_archive + path: ./dist/${{ steps.make_dist.outputs.archive }} + retention-days: 2 + + - name: Upload checksum artefact + uses: actions/upload-artifact@v2 + with: + name: macOS_arm64_checksum + path: ./dist/${{ steps.make_dist.outputs.archive_dir }}/build/nimbus_beacon_node.sha512sum + retention-days: 2 + + prepare-prerelease: + name: Prepare pre-release + needs: [build-amd64, build-arm64, build-arm, build-win64, build-macos-amd64, build-macos-arm64] + runs-on: ubuntu-latest + steps: + - name: Download artefacts + uses: actions/download-artifact@v2 + + - name: Create release notes + run: | + cat > release_notes.md <> release_notes.md + cat Linux_amd64_checksum/* >> release_notes.md + echo '# Linux ARM64' >> release_notes.md + cat Linux_arm64_checksum/* >> release_notes.md + echo '# Linux ARM' >> release_notes.md + cat Linux_arm_checksum/* >> release_notes.md + echo '# Windows AMD64' >> release_notes.md + cat Windows_amd64_checksum/* >> release_notes.md + echo '# macOS AMD64' >> release_notes.md + cat macOS_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 + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true + tag_name: latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create prerelease + run: | + gh release create latest --prerelease --target unstable \ + --title 'Nightly build ("unstable" branch)' --notes-file release_notes.md \ + Linux_amd64_archive/* \ + Linux_arm64_archive/* \ + Linux_arm_archive/* \ + Windows_amd64_archive/* \ + macOS_amd64_archive/* \ + macOS_arm64_archive/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Delete artefacts + uses: geekyeggo/delete-artifact@v1 + with: + failOnError: false + name: | + Linux_amd64_archive + Linux_amd64_checksum + Linux_arm64_archive + Linux_arm64_checksum + Linux_arm_archive + Linux_arm_checksum + Windows_amd64_archive + Windows_amd64_checksum + macOS_amd64_archive + macOS_amd64_checksum + macOS_arm64_archive + macOS_arm64_checksum + From 94b1ef55682df399a3808ba54717f4c16f9a422c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 9 Jun 2021 17:39:42 +0200 Subject: [PATCH 8/9] fix nightly build (#2640) --- .github/workflows/nightly_build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index e8fae6533c..45276381b0 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -243,6 +243,11 @@ jobs: needs: [build-amd64, build-arm64, build-arm, build-win64, build-macos-amd64, build-macos-arm64] runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: unstable + - name: Download artefacts uses: actions/download-artifact@v2 @@ -271,7 +276,7 @@ jobs: uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: delete_release: true - tag_name: latest + tag_name: latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7ffa8c280f4c48f458418e8a192d5179a4606675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 10 Jun 2021 13:03:26 +0200 Subject: [PATCH 9/9] nightly build: change tag name (#2643) --- .github/workflows/nightly_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 45276381b0..756c11a5c1 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -276,13 +276,13 @@ jobs: uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: delete_release: true - tag_name: latest + tag_name: nightly env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create prerelease run: | - gh release create latest --prerelease --target unstable \ + gh release create nightly --prerelease --target unstable \ --title 'Nightly build ("unstable" branch)' --notes-file release_notes.md \ Linux_amd64_archive/* \ Linux_arm64_archive/* \