Skip to content

Commit 20a6c42

Browse files
committed
-m
1 parent bc7754c commit 20a6c42

File tree

11 files changed

+323
-168
lines changed

11 files changed

+323
-168
lines changed

lib/forge-std/.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @danipopes @klkvr @mattsse @grandizzy @yash-atreya @zerosnacks

lib/forge-std/.github/workflows/ci.yml

Lines changed: 54 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -9,120 +9,74 @@ on:
99

1010
jobs:
1111
build:
12+
name: build +${{ matrix.toolchain }} ${{ matrix.flags }}
1213
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
toolchain: [stable, nightly]
19+
flags:
20+
- ""
21+
- --via-ir
22+
- --use solc:0.8.17 --via-ir
23+
- --use solc:0.8.17
24+
- --use solc:0.8.0
25+
- --use solc:0.7.6
26+
- --use solc:0.7.0
27+
- --use solc:0.6.2
28+
- --use solc:0.6.12
1329
steps:
1430
- uses: actions/checkout@v4
15-
16-
- name: Install Foundry
17-
uses: foundry-rs/foundry-toolchain@v1
18-
with:
19-
version: nightly
20-
21-
- name: Print forge version
22-
run: forge --version
23-
24-
# Backwards compatibility checks:
25-
# - the oldest and newest version of each supported minor version
26-
# - versions with specific issues
27-
- name: Check compatibility with latest
28-
if: always()
29-
run: |
30-
output=$(forge build --skip test)
31-
if echo "$output" | grep -q "Warning"; then
32-
echo "$output"
33-
exit 1
34-
fi
35-
36-
- name: Check compatibility with 0.8.0
37-
if: always()
38-
run: |
39-
output=$(forge build --skip test --use solc:0.8.0)
40-
if echo "$output" | grep -q "Warning"; then
41-
echo "$output"
42-
exit 1
43-
fi
44-
45-
- name: Check compatibility with 0.7.6
46-
if: always()
47-
run: |
48-
output=$(forge build --skip test --use solc:0.7.6)
49-
if echo "$output" | grep -q "Warning"; then
50-
echo "$output"
51-
exit 1
52-
fi
53-
54-
- name: Check compatibility with 0.7.0
55-
if: always()
56-
run: |
57-
output=$(forge build --skip test --use solc:0.7.0)
58-
if echo "$output" | grep -q "Warning"; then
59-
echo "$output"
60-
exit 1
61-
fi
62-
63-
- name: Check compatibility with 0.6.12
64-
if: always()
65-
run: |
66-
output=$(forge build --skip test --use solc:0.6.12)
67-
if echo "$output" | grep -q "Warning"; then
68-
echo "$output"
69-
exit 1
70-
fi
71-
72-
- name: Check compatibility with 0.6.2
73-
if: always()
74-
run: |
75-
output=$(forge build --skip test --use solc:0.6.2)
76-
if echo "$output" | grep -q "Warning"; then
77-
echo "$output"
78-
exit 1
79-
fi
80-
31+
- uses: foundry-rs/foundry-toolchain@v1
32+
- run: forge --version
33+
- run: forge build --skip test --deny-warnings ${{ matrix.flags }}
8134
# via-ir compilation time checks.
82-
- name: Measure compilation time of Test with 0.8.17 --via-ir
83-
if: always()
84-
run: forge build --skip test --contracts test/compilation/CompilationTest.sol --use solc:0.8.17 --via-ir
85-
86-
- name: Measure compilation time of TestBase with 0.8.17 --via-ir
87-
if: always()
88-
run: forge build --skip test --contracts test/compilation/CompilationTestBase.sol --use solc:0.8.17 --via-ir
89-
90-
- name: Measure compilation time of Script with 0.8.17 --via-ir
91-
if: always()
92-
run: forge build --skip test --contracts test/compilation/CompilationScript.sol --use solc:0.8.17 --via-ir
93-
94-
- name: Measure compilation time of ScriptBase with 0.8.17 --via-ir
95-
if: always()
96-
run: forge build --skip test --contracts test/compilation/CompilationScriptBase.sol --use solc:0.8.17 --via-ir
35+
- if: contains(matrix.flags, '--via-ir')
36+
run: forge build --skip test --deny-warnings ${{ matrix.flags }} --contracts 'test/compilation/*'
9737

9838
test:
9939
runs-on: ubuntu-latest
40+
timeout-minutes: 10
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
toolchain: [stable, nightly]
10045
steps:
10146
- uses: actions/checkout@v4
102-
103-
- name: Install Foundry
104-
uses: foundry-rs/foundry-toolchain@v1
47+
- uses: foundry-rs/foundry-toolchain@v1
10548
with:
106-
version: nightly
107-
108-
- name: Print forge version
109-
run: forge --version
110-
111-
- name: Run tests
112-
run: forge test -vvv
49+
version: ${{ matrix.toolchain }}
50+
- run: forge --version
51+
- run: forge test -vvv
11352

11453
fmt:
11554
runs-on: ubuntu-latest
55+
timeout-minutes: 10
11656
steps:
11757
- uses: actions/checkout@v4
58+
- uses: foundry-rs/foundry-toolchain@v1
59+
- run: forge --version
60+
- run: forge fmt --check
11861

119-
- name: Install Foundry
120-
uses: foundry-rs/foundry-toolchain@v1
121-
with:
122-
version: nightly
123-
124-
- name: Print forge version
125-
run: forge --version
62+
typos:
63+
runs-on: ubuntu-latest
64+
timeout-minutes: 10
65+
steps:
66+
- uses: actions/checkout@v4
67+
- uses: crate-ci/typos@v1
12668

127-
- name: Check formatting
128-
run: forge fmt --check
69+
ci-success:
70+
runs-on: ubuntu-latest
71+
if: always()
72+
needs:
73+
- build
74+
- test
75+
- fmt
76+
- typos
77+
timeout-minutes: 10
78+
steps:
79+
- name: Decide whether the needed jobs succeeded or failed
80+
uses: re-actors/alls-green@release/v1
81+
with:
82+
jobs: ${{ toJSON(needs) }}

lib/forge-std/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Forge Standard Library is a collection of helpful contracts and libraries for use with [Forge and Foundry](https://github.com/foundry-rs/foundry). It leverages Forge's cheatcodes to make writing tests easier and faster, while improving the UX of cheatcodes.
44

5-
**Learn how to use Forge-Std with the [📖 Foundry Book (Forge-Std Guide)](https://book.getfoundry.sh/forge/forge-std.html).**
5+
**Learn how to use Forge-Std with the [📖 Foundry Book (Forge-Std Guide)](https://getfoundry.sh/reference/forge-std/overview/).**
66

77
## Install
88

lib/forge-std/RELEASE_CHECKLIST.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Release checklist
2+
3+
This checklist is meant to be used as a guide for the `forge-std` release process.
4+
5+
## Steps
6+
7+
- [ ] Update the version number in `package.json`
8+
- [ ] Open and merge a PR with the version bump
9+
- [ ] Tag the merged commit with the version number: `git tag v<X.Y.Z>`
10+
- [ ] Push the tag to the repository: `git push --tags`
11+
- [ ] Create a new GitHub release with the automatically generated changelog and with the name set to `v<X.Y.Z>`
12+
- [ ] Add `## Featured Changes` section to the top of the release notes

lib/forge-std/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "forge-std",
3-
"version": "1.9.6",
3+
"version": "1.10.0",
44
"description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.",
55
"homepage": "https://book.getfoundry.sh/forge/forge-std",
66
"bugs": "https://github.com/foundry-rs/forge-std/issues",

0 commit comments

Comments
 (0)