Skip to content
Closed
37 changes: 37 additions & 0 deletions .circleci/ci_cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2.1

jobs:
build-and-test:
docker:
- image: cimg/rust:1.88.0
steps:
- checkout
- restore_cache:
keys:
- v1-cargo-{{ checksum "Cargo.lock" }}
- v1-cargo-
- run:
name: "Check formatting"
command: cargo fmt -- --check
- run:
name: "Run tests"
command: cargo test
- save_cache:
key: v1-cargo-{{ checksum "Cargo.lock" }}
paths:
- "~/.cargo/bin"
- "~/.cargo/registry/index"
- "~/.cargo/registry/cache"
- "~/.cargo/git/db"
- "target"
- run:
name: "Check formatting"
command: cargo fmt -- --check
- run:
name: "Run tests"
command: cargo test

workflows:
ci:
jobs:
- build-and-test
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference

version: 2.1
executors:
my-custom-executor:
docker:
- image: cimg/base:stable
auth:
# ensure you have first added these secrets
# visit app.circleci.com/settings/project/github/Dargon789/foundry/environment-variables
username: $DOCKER_HUB_USER
password: $DOCKER_HUB_PASSWORD
jobs:
web3-defi-game-project:

executor: my-custom-executor
steps:
- checkout
- run: |
# echo Hello, World!

workflows:
my-custom-workflow:
jobs:
- web3-defi-game-project
100 changes: 100 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Install dependencies
run: |
if [ -f "yarn.lock" ]; then
yarn install
elif [ -f "package-lock.json" ]; then
npm ci
else
echo "Unable to determine package manager"
exit 1
fi
4 changes: 3 additions & 1 deletion .github/workflows/publish-dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
PKG_DIR="packages/$PACKAGE"

echo "📦 Publishing $PACKAGE to $BRANCH"

echo "prohibited_file" >> .gitignore
git rm --cached prohibited_file
git commit -m "Remove prohibited_file"
mkdir -p /tmp/$PACKAGE
shopt -s dotglob
cp -r $PKG_DIR/* /tmp/$PACKAGE || true
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: |
pnpm config set fetch-retries 5
pnpm config set fetch-retry-factor 2
pnpm install

build:
name: Run build
runs-on: ubuntu-latest
needs: [install]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: pnpm build

tests:
Expand All @@ -25,13 +36,6 @@ jobs:
needs: [install]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Start Anvil in background
run: anvil --fork-url https://nodes.sequence.app/arbitrum &
- run: pnpm test

# NOTE: if you'd like to see example of how to run
Expand Down
2 changes: 1 addition & 1 deletion extras/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@repo/ui": "workspace:*",
"next": "^15.1.0",
"next": "^15.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion extras/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@repo/ui": "workspace:*",
"next": "^15.1.0",
"next": "^15.2.4",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/wdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/node": "^22.13.9",
"dotenv": "^16.4.7",
"fake-indexeddb": "^6.0.0",
"happy-dom": "^13.2.0",
"happy-dom": "^15.10.2",
"typescript": "^5.7.3",
"vitest": "^3.1.2"
},
Expand Down
Loading