Automate checkpoint generation #2757
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration tests | |
# Cancel workflow if there is a new change to the branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
on: | |
workflow_dispatch: | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
env: | |
CI: 1 | |
CARGO_INCREMENTAL: 0 | |
CACHE_TIMEOUT_MINUTES: 5 | |
SCCACHE_ENDPOINT: ${{ vars.SCCACHE_ENDPOINT }} | |
SCCACHE_BUCKET: ${{ vars.SCCACHE_BUCKET }} | |
SCCACHE_REGION: ${{ vars.SCCACHE_REGION }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
RUSTC_WRAPPER: "sccache" | |
CC: "sccache clang" | |
CXX: "sccache clang++" | |
jobs: | |
build-macos: | |
name: Build MacOS | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v3 | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | |
continue-on-error: true | |
- name: Cargo Check | |
run: cargo check | |
build-ubuntu: | |
name: Build Ubuntu | |
runs-on: ubuntu-latest | |
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: Setup sccache | |
uses: mozilla-actions/[email protected] | |
timeout-minutes: ${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }} | |
continue-on-error: true | |
- 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 | |
# cli-specific tests | |
forest-cli-check: | |
needs: | |
- build-ubuntu | |
name: Forest CLI checks | |
runs-on: ubuntu-latest | |
steps: | |
# To help investigate transient test failures | |
- run: lscpu | |
- 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: forest-cli check | |
run: ./scripts/tests/forest_cli_check.sh | |
# miscallenous tests done on calibnet | |
calibnet-check: | |
needs: | |
- build-ubuntu | |
name: Calibnet check | |
runs-on: ubuntu-latest | |
steps: | |
# To help investigate transient test failures | |
- run: lscpu | |
- name: Checkout Sources | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: forest-${{ runner.os }} | |
path: ~/.cargo/bin | |
- 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: Other commands check | |
run: ./scripts/tests/calibnet_other_check.sh | |
# state migration regression tests | |
state-migrations-check: | |
needs: | |
- build-ubuntu | |
name: State migrations | |
runs-on: ubuntu-latest | |
steps: | |
# To help investigate transient test failures | |
- run: lscpu | |
- 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: Migration Regression Tests | |
run: ./scripts/tests/calibnet_migration_regression_tests.sh | |
# Wallet checks (sending, exporting key, balances...) | |
calibnet-wallet-check: | |
needs: | |
- build-ubuntu | |
name: Wallet tests | |
runs-on: ubuntu-latest | |
steps: | |
# To help investigate transient test failures | |
- run: lscpu | |
- 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: Wallet commands check | |
env: | |
CALIBNET_WALLET: ${{ secrets.CALIBNET_WALLET }} | |
run: ./scripts/tests/calibnet_wallet_check.sh "$CALIBNET_WALLET" | |
# Snapshot export checks | |
calibnet-export-check: | |
needs: | |
- build-ubuntu | |
name: Snapshot export checks | |
runs-on: ubuntu-latest | |
steps: | |
# To help investigate transient test failures | |
- run: lscpu | |
- 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: Snapshot export check | |
run: ./scripts/tests/calibnet_export_check.sh | |
local-devnet-check: | |
if: false | |
name: Devnet checks | |
runs-on: ubuntu-latest | |
needs: | |
- build-ubuntu | |
steps: | |
- name: Checkout Sources | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: forest-${{ runner.os }} | |
- name: Devnet setup | |
run: ./scripts/devnet/ci_setup.sh | |
- name: Devnet check | |
run: ./scripts/devnet/ci_check.sh | |
- name: Dump docker logs on failure | |
if: failure() | |
uses: jwalton/gh-docker-logs@v2 |