add hardhat compilation for artifacts #486
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: stable | |
- name: Install Dependencies | |
run: yarn --immutable | |
- name: Compile Contracts | |
run: | | |
forge compile | |
size: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: stable | |
- name: Install Dependencies | |
run: yarn --immutable | |
- name: Compile Contracts | |
run: | | |
forge build | |
- name: Contract Size Check | |
run: | | |
yarn size contracts/ |