Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit aabff6e

Browse files
committed
fix: remapping for foundry-upgrades
ci: build contracts
1 parent b1a5bf5 commit aabff6e

7 files changed

Lines changed: 44 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,20 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v5
23-
- uses: extractions/setup-just@v3
24-
- uses: foundry-rs/foundry-toolchain@v1
23+
- uses: sablier-labs/devkit/actions/setup@main
2524
with:
26-
version: "nightly"
27-
- uses: oven-sh/setup-bun@v2
28-
- run: npm install -g @antfu/ni
29-
- run: bun install
25+
frozen-lockfile: false
26+
package-manager: bun
3027

3128
- name: Run all code checks
3229
run: just full-check
3330

34-
# - name: Build all packages
35-
# run: just build-all
36-
3731
test-unit:
3832
needs: check
3933
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
workspace: [airdrops, lockup]
4037
steps:
4138
- uses: actions/checkout@v5
4239
- uses: foundry-rs/foundry-toolchain@v1
@@ -45,18 +42,25 @@ jobs:
4542
- uses: oven-sh/setup-bun@v2
4643
- run: bun install
4744

45+
- name: Build contracts
46+
run: |
47+
just build ${{ matrix.workspace }} optimized
48+
4849
- name: Run unit tests
4950
env:
5051
FOUNDRY_FUZZ_RUNS: 2000
5152
FOUNDRY_PROFILE: test-optimized
5253
run: | #shell
5354
forge test \
5455
--match-path "tests/unit/**/*.sol" \
55-
--root lockup
56+
--root ${{ matrix.workspace }}
5657
5758
test-integration:
5859
needs: check
5960
runs-on: ubuntu-latest
61+
strategy:
62+
matrix:
63+
workspace: [airdrops, flow, lockup, utils]
6064
steps:
6165
- uses: actions/checkout@v5
6266
- uses: foundry-rs/foundry-toolchain@v1
@@ -65,18 +69,27 @@ jobs:
6569
- uses: oven-sh/setup-bun@v2
6670
- run: bun install
6771

72+
- name: Build contracts
73+
env:
74+
FOUNDRY_PROFILE: optimized
75+
run: |
76+
just build ${{ matrix.workspace }}
77+
6878
- name: Run integration tests
6979
env:
7080
FOUNDRY_FUZZ_RUNS: 2000
7181
FOUNDRY_PROFILE: test-optimized
7282
run: | #shell
7383
forge test \
7484
--match-path "tests/integration/**/*.sol" \
75-
--root lockup
85+
--root ${{ matrix.workspace }}
7686
7787
test-invariant:
7888
needs: check
7989
runs-on: ubuntu-latest
90+
strategy:
91+
matrix:
92+
workspace: [flow, lockup, utils]
8093
steps:
8194
- uses: actions/checkout@v5
8295
- uses: foundry-rs/foundry-toolchain@v1
@@ -85,10 +98,16 @@ jobs:
8598
- uses: oven-sh/setup-bun@v2
8699
- run: bun install
87100

101+
- name: Build contracts
102+
env:
103+
FOUNDRY_PROFILE: optimized
104+
run: |
105+
just build ${{ matrix.workspace }}
106+
88107
- name: Run invariant tests
89108
env:
90109
FOUNDRY_PROFILE: test-optimized
91110
run: | #shell
92111
forge test \
93112
--match-path "tests/invariant/**/*.sol" \
94-
--root lockup
113+
--root ${{ matrix.workspace }}

justfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ GLOBS_SOLIDITY := "**/*.sol"
1818
default:
1919
@just --list
2020

21-
# Build a package with a specific profile
22-
@build package profile="default":
23-
FOUNDRY_PROFILE={{ profile }} forge build --root {{ package }}
21+
# Build a specific workspace
22+
@build workspace:
23+
forge build --root {{ workspace }}
2424
alias b := build
2525

26-
# Build all packages with a specific profile
27-
@build-all profile="default":
28-
FOUNDRY_PROFILE={{ profile }} just for-each "forge build --root"
26+
# Build all workspaces
27+
@build-all:
28+
just for-each "forge build --root"
2929

3030
# Check code with Forge formatter
3131
@fmt-check:

utils/foundry.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
ffi = true
1111
gas_reports = ["*"]
1212
optimizer_runs = 10_000
13+
remappings = [
14+
"openzeppelin-foundry-upgrades/=../node_modules/@openzeppelin/foundry-upgrades/",
15+
]
1316
script = "scripts"
1417

1518
[profile.default.fuzz]

utils/scripts/solidity/DeployComptrollerProxy.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
22
pragma solidity >=0.8.22;
33

4-
import { Options, Upgrades } from "@openzeppelin/foundry-upgrades/src/Upgrades.sol";
4+
import { Options, Upgrades } from "openzeppelin-foundry-upgrades/src/Upgrades.sol";
55
import { SablierComptroller } from "src/SablierComptroller.sol";
66
import { BaseScript } from "src/tests/BaseScript.sol";
77

utils/scripts/solidity/UpgradeComptrollerProxy.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-3.0-or-later
22
pragma solidity >=0.8.22;
33

4-
import { Options, Upgrades } from "@openzeppelin/foundry-upgrades/src/Upgrades.sol";
4+
import { Options, Upgrades } from "openzeppelin-foundry-upgrades/src/Upgrades.sol";
55
import { BaseScript } from "src/tests/BaseScript.sol";
66

77
/// @notice Deploys a new Sablier Comptroller.

utils/tests/Base.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity >=0.8.22 <0.9.0;
33

4-
import { Upgrades } from "@openzeppelin/foundry-upgrades/src/Upgrades.sol";
4+
import { Upgrades } from "openzeppelin-foundry-upgrades/src/Upgrades.sol";
55
import { StdAssertions } from "forge-std/src/StdAssertions.sol";
66

77
import { ISablierComptroller } from "src/interfaces/ISablierComptroller.sol";

utils/tests/integration/concrete/comptroller/initialize/initialize.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity >=0.8.22;
33

44
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
5-
import { UnsafeUpgrades } from "@openzeppelin/foundry-upgrades/src/Upgrades.sol";
5+
import { UnsafeUpgrades } from "openzeppelin-foundry-upgrades/src/Upgrades.sol";
66

77
import { Errors } from "src/libraries/Errors.sol";
88
import { ISablierComptroller } from "src/interfaces/ISablierComptroller.sol";

0 commit comments

Comments
 (0)