Skip to content

Commit

Permalink
chore: move to bun
Browse files Browse the repository at this point in the history
  • Loading branch information
roderik committed Nov 7, 2024
1 parent daa21a4 commit b945cff
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
path: |
./node_modules
~/.npm
~/.bun/install/cache
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -89,10 +90,12 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- uses: oven-sh/setup-bun@v2

- name: Install Node dependencies
run: npm install
run: bun install

- name: Install circom
if: github.repository == 'settlemint/solidity-zeto'
Expand All @@ -106,15 +109,15 @@ jobs:
- name: Install snarkjs
if: github.repository == 'settlemint/solidity-zeto'
run: |
npm install -g snarkjs@latest
bun install -g snarkjs@latest
- name: Install zeto
if: github.repository == 'settlemint/solidity-zeto'
run: |
git clone https://github.com/victoryeo/zeto.git
cd zeto
cd zkp/circuits
npm install
bun install
cd ..
circom circuits/anon_enc_nullifier.circom --output ./js/lib --sym --wasm
circom circuits/anon_enc.circom --output ./js/lib --sym --wasm
Expand Down Expand Up @@ -368,7 +371,7 @@ jobs:
# 📦 Packages
| Package | Install |
| ------- | -------------------- |
| React | `npm i @${{ github.repository_owner }}/${{ github.repository }}@${{ env.VERSION }}` |
| React | `bun add @${{ github.repository_owner }}/${{ github.repository }}@${{ env.VERSION }}` |
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ env.TAG == 'latest' }}
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM node:22.11.0 AS build

COPY --from=oven/bun:1.1.34-debian --chmod=0777 /usr/local/bin/bun /bin/bun
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
ENV BUN_INSTALL_BIN=/bin

RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
Expand All @@ -19,9 +23,9 @@ WORKDIR /usecase

USER root

RUN npm install
RUN bun install
RUN forge build
RUN npx hardhat compile
RUN bunx hardhat compile

FROM busybox:1.37.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ forge init my-project --template settlemint/solidity-diamond-bond
Or if you want to use this set as a dependency of your own,

```shell
npm install @settlemint/solidity-diamond-bond
bun install @settlemint/solidity-diamond-bond
```

## DX: Foundry & Hardhat hybrid
Expand Down
Binary file added bun.lockb
Binary file not shown.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@
"overrides": {
"@graphprotocol/graph-cli": "0.88.0",
"@graphprotocol/graph-ts": "0.35.1"
}
},
"trustedDependencies": [
"protobufjs"
]
}

0 comments on commit b945cff

Please sign in to comment.