Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/ci-cosmwasm-contract.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Test CosmWasm Contract
name: Test Cosmwasm Contract

on:
pull_request:
paths:
- .github/workflows/ci-cosmwasm-contract.yml
- target_chains/cosmwasm/**
- wormhole_attester/sdk/rust/**
push:
branches:
- main
Expand All @@ -18,12 +17,11 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: target_chains/cosmwasm/contracts/pyth
working-directory: target_chains/cosmwasm
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.82.0
components: rustfmt, clippy
override: true
Expand All @@ -34,8 +32,8 @@ jobs:
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cargo build --verbose
run: cargo build
if: success() || failure()
- name: Run tests
run: cargo test --verbose
run: cargo test
if: success() || failure()
16 changes: 11 additions & 5 deletions .github/workflows/ci-fortuna.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Check Fortuna
name: Test Fortuna

on:
pull_request:
paths:
- .github/workflows/ci-fortuna.yml
- apps/fortuna/**
- target_chains/ethereum/entropy_sdk/solidity/abis/**
push:
branches: [main]
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
test:
build:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -21,7 +25,6 @@ jobs:
workspaces: "apps/fortuna -> target"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.82.0
override: true
components: rustfmt, clippy
Expand All @@ -31,6 +34,9 @@ jobs:
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cargo build
if: success() || failure()
- name: Run tests
run: cargo test
if: success() || failure()
21 changes: 12 additions & 9 deletions .github/workflows/ci-hermes-server.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: Check Hermes Server
name: Test Hermes Server

on:
pull_request:
paths:
- .github/workflows/ci-hermes-server.yml
- apps/hermes/server/**
push:
branches: [main]
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
test:
build:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -20,20 +25,18 @@ jobs:
workspaces: "apps/hermes/server -> target"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.82.0
components: rustfmt, clippy
override: true
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Format check
run: cargo fmt --all -- --check
if: success() || failure()
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Run executor tests
- name: Build
run: cargo build
if: success() || failure()
- name: Run tests
run: cargo test
if: success() || failure()
58 changes: 17 additions & 41 deletions .github/workflows/ci-message-buffer.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Message Buffer Check
name: Test Message Buffer

on:
pull_request:
paths:
Expand All @@ -7,63 +8,38 @@ on:
push:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
abi-check:
name: Check Message Buffer formatting & IDL files
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pythnet/message_buffer
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
workspaces: "pythnet/message_buffer -> target"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.66.1
components: rustfmt, clippy
- name: Install Solana
run: |
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sh -c "$(curl -sSfL https://release.anza.xyz/v1.17.34/install)"
sh -c "$(curl -sSfL https://release.solana.com/v1.14.17/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install Anchor
run: |
cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked
- name: Install g++ 12
run: |
sudo apt-get install g++-12
echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}"
- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
# Libusb is a build requirement for the node-hid package and so pnpm
# install will fail if this isn't in the build environment and if a
# precompiled binary isn't found.
- name: Install libusb
run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: true
- name: Build and generate IDLs
run: anchor build
- name: Copy anchor target files
run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
- name: Fix formatting (to avoid pre-commit failures)
run: pnpm turbo --filter message_buffer fix:format
- name: Check IDL changes
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
# the current version of the contract and update idl directory.
run: git diff --exit-code idl/*
if: success() || failure()
- name: Cargo format
- name: Format check
run: cargo fmt --all -- --check
if: success() || failure()
- name: Cargo clippy
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cargo-build-bpf
if: success() || failure()
- name: Run tests
run: cargo-test-bpf
if: success() || failure()
2 changes: 1 addition & 1 deletion .github/workflows/ci-pythnet-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
workspaces: "pythnet/pythnet_sdk -> target"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.82.0
components: rustfmt, clippy
override: true
- name: Format check
run: cargo fmt --all -- --check
Expand Down
30 changes: 14 additions & 16 deletions .github/workflows/ci-remote-executor.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
name: Check Remote Executor
name: Test Remote Executor

on:
pull_request:
paths:
- .github/workflows/ci-remote-executor.yml
- governance/remote_executor/**
- pythnet/remote_executor/**
push:
branches: [main]
branches:
- main

jobs:
test:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: governance/remote_executor
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
components: rustfmt, clippy
override: true
- uses: Swatinem/rust-cache@v2
with:
workspaces: "governance/remote_executor -> target"
- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/v1.18.23/install)"
sh -c "$(curl -sSfL https://release.solana.com/v1.14.17/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Format check
run: cargo fmt --all -- --check
run: cd pythnet/remote_executor && cargo fmt --all -- --check
if: success() || failure()
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
run: cd pythnet/remote_executor && cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cd pythnet/remote_executor && cargo build
if: success() || failure()
- name: Run executor tests
run: cargo test-sbf
- name: Run tests
run: cd pythnet/remote_executor && cargo test
if: success() || failure()
2 changes: 1 addition & 1 deletion .github/workflows/ci-solana-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
workspaces: "target_chains/solana -> target"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.73.0
components: rustfmt, clippy
override: true
- name: Install Solana
run: |
Expand Down
43 changes: 14 additions & 29 deletions .github/workflows/ci-starknet-tools.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Check Starknet Tools
name: Test Starknet Tools

on:
pull_request:
paths:
- target_chains/starknet/tools/**
paths: [target_chains/starknet/tools/**]
push:
branches: [main]
jobs:
Expand All @@ -13,32 +12,18 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.86.0
components: rustfmt, clippy
override: true
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
workspaces: "target_chains/starknet/tools/test_vaas -> target"
- name: Install Scarb
uses: software-mansion/setup-scarb@v1
with:
tool-versions: target_chains/starknet/contracts/.tool-versions
- name: Install Starkli
run: curl https://get.starkli.sh | sh && . ~/.config/.starkli/env && starkliup -v $(awk '/starkli/{print $2}' target_chains/starknet/contracts/.tool-versions)
- name: Check formatting
run: cargo fmt --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml -- --check
- name: Run clippy
run: cargo clippy --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --all-targets -- --deny warnings
- name: Run generate_keypair binary
run: cargo run --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --bin generate_keypair
- name: Check test data
run: |
. ~/.config/.starkli/env && cargo run --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --bin generate_test_data > ./target_chains/starknet/contracts/data.cairo
cd target_chains/starknet/contracts && scarb fmt data.cairo
if ! diff ./tests/data.cairo data.cairo; then
>&2 echo "Re-run generate_test_data to update data.cairo"
exit 1
fi
rm data.cairo
- name: Format check
run: cd target_chains/starknet/tools && cargo fmt --all -- --check
if: success() || failure()
- name: Clippy check
run: cd target_chains/starknet/tools && cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cd target_chains/starknet/tools && cargo build
if: success() || failure()
- name: Run tests
run: cd target_chains/starknet/tools && cargo test
if: success() || failure()
29 changes: 19 additions & 10 deletions .github/workflows/ci-sui-contract.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
name: Test Sui Contract

on:
pull_request:
paths:
- target_chains/sui/contracts/**
- .github/workflows/ci-sui-contract.yml
- target_chains/sui/**
push:
branches:
- main

name: Sui Contracts
env:
CARGO_TERM_COLOR: always

jobs:
sui-tests:
name: Sui tests
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: target_chains/sui/contracts/
working-directory: target_chains/sui
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.77.0
override: true
- uses: taiki-e/cache-cargo-install-action@v2
with:
tool: sui
git: https://github.com/MystenLabs/sui.git
rev: 041c5f2bae2fe52079e44b70514333532d69f4e6

- name: Format check
run: cargo fmt --all -- --check
if: success() || failure()
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cargo build
if: success() || failure()
- name: Run tests
run: sui move test
run: cargo test
if: success() || failure()
Loading
Loading