Skip to content

Commit 253208c

Browse files
authored
IPC-512: Update code layout (#518)
1 parent 62f0d64 commit 253208c

501 files changed

Lines changed: 552 additions & 7235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
# Set job outputs to values from filter step
2626
outputs:
2727
contracts: ${{ steps.filter.outputs.contracts }}
28-
fvm-utils: ${{ steps.filter.outputs.fvm-utils }}
2928
ipc: ${{ steps.filter.outputs.ipc }}
3029
ipld-resolver: ${{ steps.filter.outputs.ipld-resolver }}
3130
fendermint: ${{ steps.filter.outputs.fendermint }}
@@ -40,12 +39,10 @@ jobs:
4039
filters: |
4140
contracts:
4241
- 'contracts/**'
43-
fvm-utils:
44-
- 'fvm-utils/**'
4542
ipc:
4643
- 'ipc/**'
4744
ipld-resolver:
48-
- 'ipld-resolver/**'
45+
- 'ipld/resolver/**'
4946
fendermint:
5047
- 'fendermint/**'
5148
@@ -59,6 +56,10 @@ jobs:
5956
needs.changes.outputs.contracts == 'true' ||
6057
github.ref == 'refs/heads/main'
6158
59+
contracts-build-and-test:
60+
uses: ./.github/workflows/contracts-build-and-test.yaml
61+
needs: [contracts-prettier]
62+
6263
contracts-test:
6364
uses: ./.github/workflows/contracts-test.yaml
6465
needs: [contracts-prettier]
@@ -75,13 +76,6 @@ jobs:
7576
uses: ./.github/workflows/contracts-sast.yaml
7677
needs: [contracts-prettier]
7778

78-
fvm-utils:
79-
uses: ./.github/workflows/fvm-utils.yaml
80-
needs: [changes, license]
81-
if: >-
82-
needs.changes.outputs.fvm-utils == 'true' ||
83-
github.ref == 'refs/heads/main'
84-
8579
ipc:
8680
uses: ./.github/workflows/ipc.yaml
8781
needs: [changes, license]
@@ -117,7 +111,6 @@ jobs:
117111
if: github.ref == 'refs/heads/main'
118112
needs:
119113
- contracts-test # generates the ABI artifacts (although fendermint can do on its own too)
120-
- fvm-utils
121114
- ipc
122115
- ipld-resolver
123116
- fendermint-test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Contract Build and Test Workflow
2+
3+
# This workflow is triggered from the main CI workflow.
4+
on:
5+
workflow_call:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '18' # Adjust this as needed for your project
19+
20+
- name: Install dependencies
21+
run: |
22+
cd contracts
23+
npm install
24+
25+
- name: Install Foundry
26+
run: |
27+
cd contracts
28+
curl -L https://foundry.paradigm.xyz | bash
29+
export PATH="$PATH:/home/runner/.config/.foundry/bin"
30+
foundryup
31+
forge install
32+
- name: Generate Ethereum Private Key and Create .env File and run make
33+
run: |
34+
cd contracts
35+
PRIVATE_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))")
36+
echo "export PRIVATE_KEY=0x$PRIVATE_KEY" > .env
37+
echo "export RPC_URL=http://127.0.0.1:1337" >> .env
38+
echo "export CHAIN_ID=1337" >> .env
39+
export PATH="$PATH:/home/runner/.config/.foundry/bin"
40+
npx ganache-cli -g0 -p1337 --account 0x$PRIVATE_KEY,1001901919191919191 &
41+
sleep 5
42+
make

.github/workflows/fvm-utils.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/ipld-resolver.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
toolchain: nightly
2020
components: rustfmt
2121
- name: Check code formatting
22-
run: cd ipld-resolver && make check-fmt
22+
run: cd ipld/resolver && make check-fmt
2323

2424
# - name: Check diagrams
2525
# run: make check-diagrams
@@ -79,4 +79,4 @@ jobs:
7979
[ -d contracts/out ] || (cd contracts && make compile-abi)
8080
8181
- name: ${{ matrix.make.name }}
82-
run: cd ipld-resolver && make ${{ matrix.make.task }}
82+
run: cd ipld/resolver && make ${{ matrix.make.task }}

0 commit comments

Comments
 (0)