Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
creativcoder committed Aug 2, 2023
1 parent 13bd3b5 commit 70aaf2e
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 57 deletions.
109 changes: 57 additions & 52 deletions .github/workflows/checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,63 @@ on:
- cron: "*/10 * * * *" # for test

jobs:
build-ubuntu:
name: Build Ubuntu
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
# To help investigate transient test failures
- run: lscpu
# find the nearest S3 space for storing cache files
- name: Show IP
run: curl ifconfig.me
continue-on-error: true
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Apt Dependencies
run: |
sudo make install-deps
- name: Cargo Install
run: make install
- uses: actions/upload-artifact@v3
with:
name: forest-${{ runner.os }}
path: |
~/.cargo/bin/forest*
if-no-files-found: error
# build-ubuntu:
# name: Build Ubuntu
# runs-on: buildjet-8vcpu-ubuntu-2204
# steps:
# # To help investigate transient test failures
# - run: lscpu
# - run: df -h
# # find the nearest S3 space for storing cache files
# - name: Show IP
# run: curl ifconfig.me
# continue-on-error: true
# - name: Checkout Sources
# uses: actions/checkout@v3
# - name: Install Apt Dependencies
# run: |
# sudo make install-deps
# - name: Cargo Install
# run: make install
# - uses: actions/upload-artifact@v3
# with:
# name: forest-${{ runner.os }}
# path: |
# ~/.cargo/bin/forest*
# if-no-files-found: error
# - run: df -h
update_checkpoints:
needs:
- build-ubuntu
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: forest-${{ runner.os }}
path: ~/.cargo/bin
# Permissions are lost during artifact-upload
# https://github.com/actions/upload-artifact#permission-loss
- name: Set permissions
run: |
chmod +x ~/.cargo/bin/forest*
- name: mark generate_checkpoints as executable
run: chmod +x scripts/generate_checkpoints.sh
- name: update checkpoints
run: ./scripts/generate_checkpoints.sh
- name: raise a pull request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update snapshot checkpoints
title: Update checkpoints
body: This is an automated PR that updates forest snapshot checkpoints for calibnet and mainnet.
add-paths: build/known_blocks.yaml
base: main
labels: automated-pr, perf, dx
branch: ga-update-checkpoints
draft: true
# delete-branch: true
- name: disk space
run: df -h
- name: download forest-cli binary
run: curl -LJO https://github.com/ChainSafe/forest/releases/download/v0.12.1/forest-v0.12.1-linux-amd64.zip && unzip forest-v0.12.1-linux-amd64.zip && cp forest-v0.12.1/forest-cli .

- name: Checkout Sources
uses: actions/checkout@v3
# - uses: actions/download-artifact@v3
# with:
# name: forest-${{ runner.os }}
# path: ~/.cargo/bin
# # Permissions are lost during artifact-upload
# # https://github.com/actions/upload-artifact#permission-loss
# - name: Set permissions
# run: |
# chmod +x ~/.cargo/bin/forest*
- name: mark generate_checkpoints as executable
run: chmod +x scripts/generate_checkpoints.sh
- name: update checkpoints
run: ./scripts/generate_checkpoints.sh
- name: raise a pull request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update snapshot checkpoints
title: Update checkpoints
body: This is an automated PR that updates forest snapshot checkpoints for calibnet and mainnet.
add-paths: build/known_blocks.yaml
base: main
labels: automated-pr, perf, dx
branch: ga-update-checkpoints
draft: true
# delete-branch: true
16 changes: 11 additions & 5 deletions scripts/generate_checkpoints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,23 @@ echo "
# This file was generated with \\\`forest-cli archive checkpoints\\\`
# " > build/known_blocks.yaml

pwd

echo "Disk space"
df -h

# import calibnet snapshot
forest-cli --chain calibnet snapshot fetch
# populate checkpoints for calibnet
forest-cli archive checkpoints "$(find . -name "forest_snapshot_calibnet*.forest.car.zst")" >> build/known_blocks.yaml
# # import calibnet snapshot
# forest-cli --chain calibnet snapshot fetch
# # populate checkpoints for calibnet
# forest-cli archive checkpoints "$(find . -name "forest_snapshot_calibnet*.forest.car.zst")" >> build/known_blocks.yaml

# rm "$(find . -name "forest_snapshot_calibnet*.forest.car.zst")"

rm "$(find . -name "forest_snapshot_calibnet*.forest.car.zst")"
# cat build/known_blocks.yaml

# import mainnet snapshot
forest-cli --chain mainnet snapshot fetch
# populate checkpoints for mainnet
forest-cli archive checkpoints "$(find . -name "forest_snapshot_mainnet*.forest.car.zst")" >> build/known_blocks.yaml

cat build/known_blocks.yaml

0 comments on commit 70aaf2e

Please sign in to comment.