Deploy Token and Bridge to L2 script #326
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: C++ Tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'pnpm' | |
node-version-file: '.tool-versions' | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Compile contracts | |
run: pnpm build | |
- name: Install prerequisites for C++ build | |
run: sudo apt-get update && sudo apt-get install -y cmake build-essential libssl-dev libcurl4-openssl-dev ninja-build | |
- name: Start Hardhat node in background | |
run: | | |
pnpm hardhat-node & | |
echo "NODE_PID=$!" >> $GITHUB_ENV | |
- name: Deploy contracts to local node | |
run: pnpm deploy-local | |
- name: CMake Generate | |
run: cmake -B ./test/cpp/build -S ./test/cpp -G Ninja | |
- name: Compile | |
run: cmake --build ./test/cpp/build --parallel --verbose | |
- name: Run C++ tests | |
working-directory: ./test/cpp/build | |
run: ctest -VV --repeat until-pass:2 --test-dir . | |
- name: Kill pnpm node | |
run: kill $NODE_PID | |
if: always() | |