Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
174 lines
6.0 KiB
YAML
174 lines
6.0 KiB
YAML
name: ci
|
|
'on':
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- '**.sol'
|
|
- '**.yml'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '**.sol'
|
|
- '**.yml'
|
|
jobs:
|
|
tests-stable:
|
|
name: Forge Testing
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
profile: [post-cancun,post-cancun-via-ir,solc-past-versions-0,solc-past-versions-1,via-ir,min-solc,min-solc-via-ir,intense]
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Foundry Stable
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
with:
|
|
version: stable
|
|
- name: Install Dependencies
|
|
run: forge install
|
|
- name: Run Tests with ${{ matrix.profile }}
|
|
run: >
|
|
( [ "${{ matrix.profile }}" = "post-cancun" ] &&
|
|
FOUNDRY_PROFILE=post_cancun forge test --use 0.8.30 &&
|
|
FOUNDRY_PROFILE=zksync forge test --use 0.8.30
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "post-cancun-via-ir" ] &&
|
|
FOUNDRY_PROFILE=post_cancun forge test --use 0.8.30 --via-ir &&
|
|
FOUNDRY_PROFILE=zksync forge test --use 0.8.30 --via-ir
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "solc-past-versions-0" ] &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.5 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.6 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.7 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.8 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.9 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.10 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.11 --fuzz-runs 16 &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.12 --fuzz-runs 16
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "solc-past-versions-1" ] &&
|
|
forge test --use 0.8.13 --fuzz-runs 16 &&
|
|
forge test --use 0.8.14 --fuzz-runs 16 &&
|
|
forge test --use 0.8.15 --fuzz-runs 16 &&
|
|
forge test --use 0.8.16 --fuzz-runs 16 &&
|
|
forge test --use 0.8.17 --fuzz-runs 16 &&
|
|
forge test --use 0.8.18 --fuzz-runs 16 &&
|
|
forge test --use 0.8.19 --fuzz-runs 16 &&
|
|
forge test --use 0.8.20 --fuzz-runs 16 &&
|
|
forge test --use 0.8.21 --fuzz-runs 16 &&
|
|
forge test --use 0.8.22 --fuzz-runs 16 &&
|
|
forge test --use 0.8.23 --fuzz-runs 16 &&
|
|
forge test --use 0.8.24 --fuzz-runs 16 &&
|
|
forge test --use 0.8.25 --fuzz-runs 16 &&
|
|
forge test --use 0.8.26 --fuzz-runs 16 &&
|
|
forge test --use 0.8.27 --fuzz-runs 16 &&
|
|
forge test --use 0.8.28 --fuzz-runs 16 &&
|
|
forge test --use 0.8.29 --fuzz-runs 16
|
|
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "via-ir" ] &&
|
|
forge test --via-ir
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "min-solc" ] &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "min-solc-via-ir" ] &&
|
|
FOUNDRY_PROFILE=pre_global_structs forge test --use 0.8.4 --via-ir
|
|
) ||
|
|
( [ "${{ matrix.profile }}" = "intense" ] &&
|
|
forge test --fuzz-runs 5000
|
|
)
|
|
|
|
# Disable for now until we can use `foundry.toml` setting to override the
|
|
# transaction gas limit. See: EIP-7825.
|
|
#
|
|
# tests-ithaca:
|
|
# name: Forge Ithaca Testing
|
|
# runs-on: ubuntu-latest
|
|
# strategy:
|
|
# matrix:
|
|
# profile: [post-cancun,post-cancun-via-ir]
|
|
# steps:
|
|
# - uses: actions/checkout@v5
|
|
# - name: Install Foundry Nightly
|
|
# uses: foundry-rs/foundry-toolchain@v1
|
|
# with:
|
|
# version: nightly
|
|
# - name: Install Dependencies
|
|
# run: forge install
|
|
# - name: Run Tests with ${{ matrix.profile }}
|
|
# run: |
|
|
# if [[ "${{ matrix.profile }}" == "post-cancun" ]]; then
|
|
# FOUNDRY_PROFILE=ithaca forge test --use 0.8.28
|
|
# elif [[ "${{ matrix.profile }}" == "post-cancun-via-ir" ]]; then
|
|
# FOUNDRY_PROFILE=ithaca forge test --use 0.8.28 --via-ir
|
|
# fi
|
|
|
|
codespell:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
- name: Run codespell
|
|
uses: codespell-project/actions-codespell@v2.0
|
|
with:
|
|
check_filenames: true
|
|
ignore_words_list: usera
|
|
skip: ./.git,package-lock.json,./audits,EIP712Mock.sol
|
|
|
|
gas-diff:
|
|
if: github.event_name == 'pull_request'
|
|
permissions: write-all
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
- name: Install Foundry
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
with:
|
|
version: stable
|
|
- name: Install Dependencies
|
|
run: forge install
|
|
- name: Generate gas diff
|
|
uses: atarpara/foundry-snapshot-diff@v0.8
|
|
id: gas_diff
|
|
- name: Add gas diff to sticky comment
|
|
uses: marocchino/sticky-pull-request-comment@v2
|
|
with:
|
|
delete: ${{ !steps.gas_diff.outputs.markdown }}
|
|
message: ${{ steps.gas_diff.outputs.markdown }}
|
|
|
|
prep-checker:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
- name: Install Foundry
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
with:
|
|
version: nightly
|
|
- name: Install Dependencies
|
|
run: forge install
|
|
- name: Run prep scripts and forge fmt
|
|
run: >
|
|
( node prep/all &&
|
|
forge fmt
|
|
)
|
|
|
|
- name: Check for file changes
|
|
run: |
|
|
if [[ $(git status --porcelain) ]]; then
|
|
echo "Please run 'node prep/all.js' and commit the changes."
|
|
exit 1
|
|
fi |