Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 15 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/bindings
## TODO maybe add the rust version and solc version to the key
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

Expand All @@ -66,6 +66,7 @@ jobs:
components: rustfmt,clippy

- name: Print Rust toolchain default versions
working-directory: crates
run: |
echo "rustup show:"
rustup show
Expand All @@ -77,47 +78,51 @@ jobs:
ldd --version

- name: Check fmt (nightly)
working-directory: crates
run: cargo +nightly-2024-07-05 fmt --check --all

- name: Check clippy
working-directory: crates
run: cargo clippy --release --tests --no-deps -- -D clippy::all

- name: Build all (including tests, benches, examples)
working-directory: crates
run: |
cd fendermint && make $PWD/builtin-actors/output/bundle.car
cd client && make $PWD/builtin-actors/output/bundle.car
cargo build --locked --release --all-targets

- name: Build Docker image for e2e tests
working-directory: crates
run: |
## Create the temporary Dockerfile.
cat <<EOF > /tmp/Dockerfile
# syntax=docker/dockerfile:1
FROM alpine as builder
COPY /fendermint/app/config /app/fendermint/app/config
COPY /client/app/config /app/fendermint/app/config
COPY /target/release/fendermint /app/output/bin/fendermint
COPY /target/release/ipc-cli /app/output/bin/ipc-cli
EOF

## Append the runner build phase to the Dockerfile.
cat fendermint/docker/runner.Dockerfile >> /tmp/Dockerfile
cat client/docker/runner.Dockerfile >> /tmp/Dockerfile

## Print the Dockerfile for debugging.
echo "Dockerfile:"
cat /tmp/Dockerfile

## Create the temporary .dockerignore file.
cat <<EOF > /tmp/Dockerfile.dockerignore
target
!target/release/fendermint
!target/release/
!target/release/ipc-cli
contracts/cache
contracts/node-modules
EOF

## Print the .dockerignore file for debugging.
echo "Dockerfile.dockerignore:"
cat /tmp/Dockerfile.dockerignore

## Build the Docker image.
DOCKER_BUILDKIT=1 docker build \
--load \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
uses: ./.github/workflows/contracts-sast.yaml
needs: [contracts-prettier]

extras:
uses: ./.github/workflows/extras.yaml
demos:
uses: ./.github/workflows/demos.yaml
needs: [contracts-prettier]

build:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/contracts-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- name: Run tests
run: cd contracts; make test

- name: Run axelar-token tests
run: cd extras/axelar-token; forge test -vvv --ffi
run: cd demos/axelar-token; forge test -vvv --ffi

- name: Run linked-token tests
run: cd extras/linked-token; forge test -vvv --ffi
run: cd demos/linked-token; forge test -vvv --ffi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Extras
name: Demos

on:
workflow_call:
Expand All @@ -8,13 +8,13 @@ env:

jobs:
examples-axelar-token:
name: "Extras: Axelar token"
name: "Demo: Axelar token"
runs-on: ubuntu-latest
strategy:
fail-fast: true
defaults:
run:
working-directory: ./extras/axelar-token
working-directory: ./demos/axelar-token
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
CARGO_INCREMENTAL: '0'
SCCACHE_CACHE_SIZE: 10G
# TODO use RUSTC_WRAPPER=sccache and double check if the ones below are still required
CC: "sccache clang"
CXX: "sccache clang++"
PROFILE: "ci"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
docker
ethapi
ext
demos
extras
infra
ipld
Expand All @@ -50,4 +51,4 @@ jobs:
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
doesn't start with an uppercase character.
4 changes: 2 additions & 2 deletions .github/workflows/tests-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- uses: Swatinem/rust-cache@v2
with:
shared-key: build

- name: Run e2e tests
working-directory: crates
run: cd fendermint && PROFILE=release make e2e-only

3 changes: 1 addition & 2 deletions .github/workflows/tests-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
with:
path: |
./contracts/out
./contracts/bindings
./contracts/cache
./crates/bindings
key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }}

- uses: Swatinem/rust-cache@v2
Expand All @@ -39,4 +39,3 @@ jobs:

- name: Run unit tests
run: make test-rust

8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "extras/axelar-token/lib/forge-std"]
path = extras/axelar-token/lib/forge-std
[submodule "demos/axelar-token/lib/forge-std"]
path = demos/axelar-token/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "extras/linked-token/lib/forge-std"]
path = extras/linked-token/lib/forge-std
[submodule "demos/linked-token/lib/forge-std"]
path = demos/linked-token/lib/forge-std
url = https://github.com/foundry-rs/forge-std
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

default:
cd contracts && make gen
cargo build --release
./target/release/ipc-cli --version
./target/release/fendermint --version
cd crates && (cargo build --release && ./target/release/ipc-cli --version && ./target/release/fendermint --version)

SUBTREES_RUST := fendermint ipc ipld/resolver
# podman has a compatible API, and is better supported
CONTAINER_FRONTEND_BIN ?= docker
SUBTREES_RUST := $(patsubst %, crates/%, $(ls -1 crates))
SUBTREES_CONTRACTS := contracts
SUBTREES_ALL := $(SUBTREES_RUST) $(SUBTREES_CONTRACTS)

Expand Down
4 changes: 2 additions & 2 deletions contracts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ compile-abi: node_modules | forge
./ops/compile-abi.sh $(OUTPUT)

rust-binding:
OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ./binding/Cargo.toml -p ipc_actors_abis
OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ../crates/binding/Cargo.toml -p ipc_actors_abis

# ==============================================================================
# Running security checks within the local computer
Expand Down Expand Up @@ -113,4 +113,4 @@ forge:
exit 1; \
fi

# ==============================================================================
# ==============================================================================
Loading
Loading