Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cartesi-machine): update machine bindings #102

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore(env): bump dev dockerfile cartesi-machine version
GCdePaula committed Jan 30, 2025

Verified

This commit was signed with the committer’s verified signature.
calcastor BT (calcastor/mame)
commit 2fa51c8d2ea56620d87a5c3b29939d2838bb66b6
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -42,17 +42,20 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-

- name: Deps
- name: Install Cartesi Machine
run: |
export CARTESI_MACHINE_VERSION=0.18.1
sudo apt-get install -y libboost-all-dev lua5.4 libslirp0
wget https://github.com/cartesi/machine-emulator/releases/download/v0.18.1/cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb
sudo dpkg -i ./cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb
rm ./cartesi-machine-v${CARTESI_MACHINE_VERSION}_amd64.deb

- name: Rust fmt and check
- name: Setup env
run: |
just setup

- name: Rust fmt and check
run: |
just check-fmt-rust-workspace
just check-rust-workspace

4 changes: 2 additions & 2 deletions machine/rust-bindings/cartesi-machine-sys/build.rs
Original file line number Diff line number Diff line change
@@ -215,9 +215,9 @@ mod build_cm {
// Open the patch file
let mut patch = fs::File::open(patch_file).expect("fail to open patch file");

// Create a command to run `patch -Np0`
// Create a command to run `patch -Np1`
let mut cmd = Command::new("patch")
.arg("-Np0")
.arg("-Np1")
.stdin(Stdio::piped())
.current_dir(target_dir)
.spawn()
4 changes: 2 additions & 2 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

# to work wiht an unreleased verion, build machine docker image locally
# (i.e. cartesi/machine-emulator:latest), and change tag.
FROM cartesi/machine-emulator:0.18.1 AS machine
FROM cartesi/machine-emulator:0.19.0-test2 AS machine

FROM rust:1.83

@@ -38,7 +38,7 @@ RUN \
# Install cartesi machine
COPY \
--from=machine \
/usr/lib/libcartesi-0.18.so /usr/lib/libcartesi.a \
/usr/lib/libcartesi-0.19.so /usr/lib/libcartesi.a \
/usr/lib/
COPY \
--from=machine \