Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 201 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -46,3 +46,203 @@ jobs:
- name: Test
timeout-minutes: 15
run: RUN_ANVIL_TESTS=1 cargo test --workspace --all-targets --all-features --locked

canonical-guest:
runs-on: ubuntu-latest
needs: rust
timeout-minutes: 45

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
lua5.4 \
liblua5.4-dev \
libslirp-dev \
ca-certificates \
wget \
xz-utils

- name: Install xgenext2fs
run: |
set -euo pipefail
ARCH="$(dpkg --print-architecture)"
VERSION="v1.5.5"

case "${ARCH}" in
amd64)
DEB_SHA256="e42857c454a772553e2bec5e73ac499b39d35dbf622bdb4cbb1b19fe98f62999"
;;
arm64)
DEB_SHA256="a9964903e9d4c1006dc9d88b4823be14d2eccaf66007c48e76c883e17db2880c"
;;
*)
echo "unsupported arch for xgenext2fs: ${ARCH}" >&2
exit 1
;;
esac

wget -O /tmp/xgenext2fs.deb "https://github.com/cartesi/genext2fs/releases/download/${VERSION}/xgenext2fs_${ARCH}.deb"
echo "${DEB_SHA256} /tmp/xgenext2fs.deb" | sha256sum --check
sudo apt-get update
sudo apt-get install -y /tmp/xgenext2fs.deb

- name: Install cartesi-machine (machine emulator CLI)
run: |
set -euo pipefail
ARCH="$(dpkg --print-architecture)"
VERSION="v0.20.0-test2"

case "${ARCH}" in
amd64)
DEB_SHA256="39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56"
;;
arm64)
DEB_SHA256="787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba"
;;
*)
echo "unsupported arch for machine-emulator: ${ARCH}" >&2
exit 1
;;
esac

wget -O /tmp/machine-emulator.deb "https://github.com/cartesi/machine-emulator/releases/download/${VERSION}/machine-emulator_${ARCH}.deb"
echo "${DEB_SHA256} /tmp/machine-emulator.deb" | sha256sum --check
sudo apt-get update
sudo apt-get install -y /tmp/machine-emulator.deb
cartesi-machine --version

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2

- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just

- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Download canonical app deps
run: just -f examples/canonical-app/justfile download-deps

- name: Run guest tests
run: just canonical-test-guest

rollups-e2e:
runs-on: ubuntu-latest
needs: rust
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
lua5.4 \
liblua5.4-dev \
libslirp-dev \
ca-certificates \
wget \
xz-utils

- name: Install xgenext2fs
run: |
set -euo pipefail
ARCH="$(dpkg --print-architecture)"
VERSION="v1.5.5"

case "${ARCH}" in
amd64)
DEB_SHA256="e42857c454a772553e2bec5e73ac499b39d35dbf622bdb4cbb1b19fe98f62999"
;;
arm64)
DEB_SHA256="a9964903e9d4c1006dc9d88b4823be14d2eccaf66007c48e76c883e17db2880c"
;;
*)
echo "unsupported arch for xgenext2fs: ${ARCH}" >&2
exit 1
;;
esac

wget -O /tmp/xgenext2fs.deb "https://github.com/cartesi/genext2fs/releases/download/${VERSION}/xgenext2fs_${ARCH}.deb"
echo "${DEB_SHA256} /tmp/xgenext2fs.deb" | sha256sum --check
sudo apt-get update
sudo apt-get install -y /tmp/xgenext2fs.deb

- name: Install cartesi-machine (machine emulator CLI)
run: |
set -euo pipefail
ARCH="$(dpkg --print-architecture)"
VERSION="v0.20.0-test2"

case "${ARCH}" in
amd64)
DEB_SHA256="39bbfc96a6cc6606307294b719df65f4f2725e8d200d062bcbd8c22355b99b56"
;;
arm64)
DEB_SHA256="787d823756000cdecd72da8a3494b4c08613087379035959e561bbaef7a220ba"
;;
*)
echo "unsupported arch for machine-emulator: ${ARCH}" >&2
exit 1
;;
esac

wget -O /tmp/machine-emulator.deb "https://github.com/cartesi/machine-emulator/releases/download/${VERSION}/machine-emulator_${ARCH}.deb"
echo "${DEB_SHA256} /tmp/machine-emulator.deb" | sha256sum --check
sudo apt-get update
sudo apt-get install -y /tmp/machine-emulator.deb
cartesi-machine --version

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.4.3

- name: Install just
uses: taiki-e/install-action@v2
with:
tool: just

- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Run rollups E2E tests
run: just test-rollups-e2e
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
tar -C package -czf "dist/sequencer-${TAG}-linux-${ARCH}.tar.gz" "sequencer-${TAG}-linux-${ARCH}"

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: sequencer-linux-${{ matrix.arch }}
path: dist/sequencer-*.tar.gz
Expand All @@ -108,7 +108,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
tar -C examples/canonical-app/out -czf "dist/canonical-machine-image-${TAG}.tar.gz" canonical-machine-image

- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: canonical-machine-image
path: dist/canonical-machine-image-*.tar.gz
Expand All @@ -218,7 +218,7 @@ jobs:
- build-canonical-machine-image
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
path: dist

Expand All @@ -243,4 +243,3 @@ jobs:
files: |
out/*.tar.gz
out/SHA256SUMS

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
sequencer.db
sequencer.db-shm
sequencer.db-wal
benchmarks/results/
/benchmarks/.deps/
/examples/canonical-app/out/
/out/
/.DS_Store
soljson-latest.js
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Primary objective in this phase: make sequencer behavior, safety checks, and per
- `sequencer/src/storage/migrations/`: DB schema/bootstrapping (`0001`).
- `sequencer-core/src/`: shared domain types/interfaces (`Application`, `SignedUserOp`, `SequencedL2Tx`, broadcast message model).
- `examples/app-core/src/application/mod.rs`: wallet prototype implementing `Application`.
- `benchmarks/src/`: benchmark harnesses and self-contained benchmark runtime.
- `tests/benchmarks/src/`: benchmark harnesses and self-contained benchmark runtime.

## Domain Truths (Important)

Expand Down
Loading
Loading