dev nightly tests #72
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
# Periodic tests of Suibase dev branch with latest main branch from Mysten Labs. | |
# | |
# This is for early detection of breaking changes while Mysten Labs | |
# independently modify the Sui client. | |
# | |
# Note: the Mysten Labs main branch is not for mainnet! The main branch | |
# is the cutting edge changes that are to be merge next into | |
# Mysten Labs devnet branch. | |
# | |
name: dev nightly tests | |
# Controls when the workflow will run | |
on: | |
schedule: | |
- cron: "0 6 * * *" # every day 5AM | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} ${{ matrix.ci_workdir }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
ci_workdir: [localnet] | |
include: | |
- ci_branch: main | |
ci_workdir: localnet | |
ci_cache_all_crates: false | |
ci_cache_provider: buildjet | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
if: runner.os == 'Linux' | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# 'true' means remove... | |
tool-cache: true | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: false # Not sure if needed for heavy link... keep it for now. | |
- name: Checkout Dev Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: dev | |
- name: Install Rust Toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
cache: "false" # Control cache in "Rust Caching" step instead. | |
- name: Rust api/demo caching | |
uses: Swatinem/rust-cache@v2 | |
env: | |
RUST_ADD_CACHE_KEY_COMPONENT: ${{ matrix.os }}-${{ matrix.ci_branch }} | |
with: | |
workspaces: | | |
rust/demo-app | |
rust/helper-uniffi | |
rust/helper | |
cache-provider: ${{ matrix.ci_cache_provider }} | |
cache-all-crates: ${{ matrix.ci_cache_all_crates }} | |
- name: Rust suibase-daemon caching | |
uses: Swatinem/rust-cache@v2 | |
env: | |
RUST_ADD_CACHE_KEY_COMPONENT: suibase-daemon-${{ matrix.os }}-${{ github.ref_name }} | |
with: | |
workspaces: | | |
rust/suibase | |
cache-provider: buildjet | |
cache-all-crates: true | |
- name: Sui Prerequesites (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install curl cmake gcc libssl-dev pkg-config libclang-dev libpq-dev build-essential | |
- name: Sui Prerequesites (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install curl cmake | |
- name: Prepare environment | |
run: | | |
mkdir -p $HOME/.local/bin | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
ln -s $GITHUB_WORKSPACE $HOME/suibase | |
- name: Tests with Mysten Labs main branch (cutting edge) | |
env: | |
CI_BRANCH: ${{ matrix.ci_branch }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: $HOME/suibase/scripts/tests/run-all.sh --main_branch |