Full build: Vite/React acid-terminal frontend (BEARER design system, Panchang/Sentient/Fragment Mono, neon layer, palette audit script), HoodquidityVaults Foundry contracts (single+dual deposits via Chainlink-style feeds, hybrid exit, 10% platform fee, boost, Genesis LP), Reown AppKit wallet connect with Robinhood Chain testnet (46630), live data from Dexscreener and onchain reads, partner portal, design-sync setup for claude.ai/design. Deploy: static via Forgejo Actions platform, BUILD_DIR=apps/web/dist (.env). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
163 lines
4.8 KiB
YAML
163 lines
4.8 KiB
YAML
name: CI
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
SOLC_MINIMUM: "0.8.13"
|
|
SOLC_LATEST: "0.8.35"
|
|
SOLC_PRERELEASE: ""
|
|
|
|
jobs:
|
|
build-matrix:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
matrix: ${{ steps.generate.outputs.matrix }}
|
|
steps:
|
|
- id: generate
|
|
run: |
|
|
MINIMUM="${{ env.SOLC_MINIMUM }}"
|
|
LATEST="${{ env.SOLC_LATEST }}"
|
|
PRERELEASE="${{ env.SOLC_PRERELEASE }}"
|
|
matrix='{"include":['
|
|
for toolchain in stable nightly; do
|
|
for flags in \
|
|
"" \
|
|
"--via-ir" \
|
|
"--use solc:${LATEST}" \
|
|
"--use solc:${LATEST} --via-ir" \
|
|
"--use solc:${MINIMUM}" \
|
|
"--use solc:${MINIMUM} --via-ir"
|
|
do
|
|
matrix+='{"toolchain":"'"$toolchain"'","flags":"'"$flags"'","prerelease":false},'
|
|
done
|
|
done
|
|
# prerelease (nightly only, svm-rs is not up to date on stable)
|
|
if [ -n "$PRERELEASE" ]; then
|
|
for flags in \
|
|
"--use solc:${PRERELEASE}" \
|
|
"--use solc:${PRERELEASE} --via-ir"
|
|
do
|
|
matrix+='{"toolchain":"nightly","flags":"'"$flags"'","prerelease":true},'
|
|
done
|
|
fi
|
|
matrix="${matrix%,}]}"
|
|
echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
|
|
|
|
build:
|
|
needs: build-matrix
|
|
name: build +${{ matrix.toolchain }} ${{ matrix.flags }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }}
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
|
|
with:
|
|
version: ${{ matrix.toolchain }}
|
|
- run: forge --version
|
|
# 3805: "This is a pre-release compiler version, please do not use it in production."
|
|
- run: forge build -vvvvv --skip test --deny warnings ${{ matrix.prerelease && '--ignored-error-codes 3805' || '' }} ${{ matrix.flags }} --contracts 'test/compilation/*'
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolchain: [stable, nightly]
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
|
|
with:
|
|
version: ${{ matrix.toolchain }}
|
|
- run: forge --version
|
|
- run: forge test -vvv
|
|
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: foundry-rs/foundry-toolchain@c7450ba673e133f5ee30098b3b54f444d3a2ca2d # v1.8.0
|
|
- run: forge --version
|
|
- run: forge fmt --check
|
|
|
|
typos:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: crate-ci/typos@5374cbf686e897b15713110e233094e2874de7ef # v1.46.1
|
|
|
|
codeql:
|
|
name: Analyze (${{ matrix.language }})
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
actions: read
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- language: actions
|
|
build-mode: none
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
build-mode: ${{ matrix.build-mode }}
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
|
with:
|
|
category: "/language:${{matrix.language}}"
|
|
|
|
ci-success:
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs:
|
|
- build-matrix
|
|
- build
|
|
- test
|
|
- fmt
|
|
- typos
|
|
- codeql
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Decide whether the needed jobs succeeded or failed
|
|
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1
|
|
with:
|
|
jobs: ${{ toJSON(needs) }}
|