arnaucube
arnaucube/poseidon-solidity-examplePublic Self-hosted repository
poseidon-solidity-example/lib/forge-std/.github/workflows/ci.yml
lib/forge-std/.github/workflows/ci.ymlRaw
 1name: CI
 2
 3on:
 4  workflow_dispatch:
 5  pull_request:
 6  push:
 7    branches:
 8      - master
 9
10jobs:
11  build:
12    runs-on: ubuntu-latest
13    steps:
14      - uses: actions/checkout@v3
15
16      - name: Install Foundry
17        uses: onbjerg/foundry-toolchain@v1
18        with:
19          version: nightly
20
21      - name: Print forge version
22        run: forge --version
23
24      # Backwards compatibility checks.
25      - name: Check compatibility with 0.8.0
26        if: always()
27        run: forge build --skip test --use solc:0.8.0
28
29      - name: Check compatibility with 0.7.6
30        if: always()
31        run: forge build --skip test --use solc:0.7.6
32
33      - name: Check compatibility with 0.7.0
34        if: always()
35        run: forge build --skip test --use solc:0.7.0
36
37      - name: Check compatibility with 0.6.12
38        if: always()
39        run: forge build --skip test --use solc:0.6.12
40
41      - name: Check compatibility with 0.6.2
42        if: always()
43        run: forge build --skip test --use solc:0.6.2
44
45      # via-ir compilation time checks.
46      - name: Measure compilation time of Test with 0.8.17 --via-ir
47        if: always()
48        run: forge build --skip test --contracts test/compilation/CompilationTest.sol --use solc:0.8.17 --via-ir
49
50      - name: Measure compilation time of TestBase with 0.8.17 --via-ir
51        if: always()
52        run: forge build --skip test --contracts test/compilation/CompilationTestBase.sol --use solc:0.8.17 --via-ir
53
54      - name: Measure compilation time of Script with 0.8.17 --via-ir
55        if: always()
56        run: forge build --skip test --contracts test/compilation/CompilationScript.sol --use solc:0.8.17 --via-ir
57
58      - name: Measure compilation time of ScriptBase with 0.8.17 --via-ir
59        if: always()
60        run: forge build --skip test --contracts test/compilation/CompilationScriptBase.sol --use solc:0.8.17 --via-ir
61
62  test:
63    runs-on: ubuntu-latest
64    steps:
65      - uses: actions/checkout@v3
66
67      - name: Install Foundry
68        uses: onbjerg/foundry-toolchain@v1
69        with:
70          version: nightly
71
72      - name: Print forge version
73        run: forge --version
74
75      - name: Run tests
76        run: forge test -vvv
77
78  fmt:
79    runs-on: ubuntu-latest
80    steps:
81      - uses: actions/checkout@v3
82
83      - name: Install Foundry
84        uses: onbjerg/foundry-toolchain@v1
85        with:
86          version: nightly
87
88      - name: Print forge version
89        run: forge --version
90
91      - name: Check formatting
92        run: forge fmt --check