Skip to content

Commit

Permalink
feat!: Bump emulator and grpc-interfaces
Browse files Browse the repository at this point in the history
- Add --version option and bump the version for the next release.
- Update boost to version 1.81
  • Loading branch information
vfusco committed Dec 13, 2023
1 parent 2f3361e commit 9d025ba
Show file tree
Hide file tree
Showing 13 changed files with 237 additions and 200 deletions.
45 changes: 14 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: Build/Test/Release
on: [push]
env:
EMULATOR_REPOSITORY: cartesi/machine-emulator
EMULATOR_TAG: 0.15.2
ROM_VERSION: v0.17.0
KERNEL_VERSION: v0.17.0
LINUX_VERSION: 5.15.63-ctsi-2-v0.17.0
ROOTFS_VERSION: v0.18.0
EMULATOR_TAG: 0.16.0-test2
KERNEL_VERSION: v0.19.1
LINUX_VERSION: 6.5.9-ctsi-1-v0.19.1
TOOLS_VERSION: v0.14.0-test1
CARTESI_IMAGES_PATH: /usr/share/cartesi-machine/images
HOST_IMAGES_PATH: /tmp/cartesi-machine-images/
permissions:
Expand Down Expand Up @@ -130,9 +129,9 @@ jobs:
- name: Download [rootfs.ext2]
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/image-rootfs
tag: ${{ env.ROOTFS_VERSION }}
file: rootfs-${{ env.ROOTFS_VERSION }}.ext2
repository: ${{ github.repository_owner }}/machine-emulator-tools
tag: ${{ env.TOOLS_VERSION }}
file: rootfs-tools-${{ env.TOOLS_VERSION }}.ext2

- name: Download [kernel.bin]
uses: Legion2/[email protected]
Expand All @@ -141,20 +140,12 @@ jobs:
tag: ${{ env.KERNEL_VERSION }}
file: linux-${{ env.LINUX_VERSION }}.bin

- name: Download [rom.bin]
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/machine-emulator-rom
tag: ${{ env.ROM_VERSION }}
file: rom-${{ env.ROM_VERSION }}.bin

- name: Move images to cartesi images folder
run: |
mkdir -m 755 -p /tmp/cartesi-machine-images
mv rom-*.bin linux-*.bin rootfs-*.ext2 ${{ env.HOST_IMAGES_PATH }}
mv linux-*.bin rootfs-*.ext2 ${{ env.HOST_IMAGES_PATH }}
cd ${{ env.HOST_IMAGES_PATH }} && ln -s linux-${{ env.LINUX_VERSION }}.bin linux.bin
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rom-${{ env.ROM_VERSION }}.bin rom.bin
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rootfs-${{ env.ROOTFS_VERSION }}.ext2 rootfs.ext2
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rootfs-tools-${{ env.TOOLS_VERSION }}.ext2 rootfs.ext2
- name: Run test suite inside the docker image (Linux/${{ matrix.arch }})
run: |
Expand Down Expand Up @@ -241,9 +232,9 @@ jobs:
- name: Download [rootfs.ext2]
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/image-rootfs
tag: ${{ env.ROOTFS_VERSION }}
file: rootfs-${{ env.ROOTFS_VERSION }}.ext2
repository: ${{ github.repository_owner }}/machine-emulator-tools
tag: ${{ env.TOOLS_VERSION }}
file: rootfs-tools-${{ env.TOOLS_VERSION }}.ext2

- name: Download [kernel.bin]
uses: Legion2/[email protected]
Expand All @@ -252,20 +243,12 @@ jobs:
tag: ${{ env.KERNEL_VERSION }}
file: linux-${{ env.LINUX_VERSION }}.bin

- name: Download [rom.bin]
uses: Legion2/[email protected]
with:
repository: ${{ github.repository_owner }}/machine-emulator-rom
tag: ${{ env.ROM_VERSION }}
file: rom-${{ env.ROM_VERSION }}.bin

- name: Move images to cartesi images folder
run: |
mkdir -m 755 -p /tmp/cartesi-machine-images
mv rom-*.bin linux-*.bin rootfs-*.ext2 ${{ env.HOST_IMAGES_PATH }}
mv linux-*.bin rootfs-*.ext2 ${{ env.HOST_IMAGES_PATH }}
cd ${{ env.HOST_IMAGES_PATH }} && ln -s linux-${{ env.LINUX_VERSION }}.bin linux.bin
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rom-${{ env.ROM_VERSION }}.bin rom.bin
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rootfs-${{ env.ROOTFS_VERSION }}.ext2 rootfs.ext2
cd ${{ env.HOST_IMAGES_PATH }} && ln -s rootfs-tools-${{ env.TOOLS_VERSION }}.ext2 rootfs.ext2
- name: Run test suite inside the docker image (Linux/${{ matrix.arch }})
run: |
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "lib/grpc-interfaces"]
path = lib/grpc-interfaces
url = ../grpc-interfaces.git
[submodule "lib/machine-emulator-defines"]
path = lib/machine-emulator-defines
url = ../machine-emulator-defines.git
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Updated libboost version to 1.81
- Updated grpc-interfaces
- Updated machine-emulator-defines
- Bumped version to 0.9.0

### Added
- Added \-\-version command line option

## [0.8.2] - 2023-08-21
### Changed
- Updated server-manager version to v0.8.2
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ USER root
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
build-essential wget git \
libreadline-dev libboost-coroutine-dev libboost-context-dev \
libboost-filesystem-dev libboost-log-dev libssl-dev libc-ares-dev zlib1g-dev \
libreadline-dev libboost-coroutine1.81-dev libboost-context1.81-dev \
libboost-filesystem1.81-dev libboost-log1.81-dev libssl-dev libc-ares-dev zlib1g-dev \
ca-certificates automake libtool patchelf cmake pkg-config lua5.4 liblua5.4-dev \
libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc \
libcrypto++-dev clang-tidy-15 clang-format-15 && \
Expand All @@ -36,7 +36,11 @@ FROM --platform=$TARGETPLATFORM ${EMULATOR_REPOSITORY}:${EMULATOR_TAG}
USER root

RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y \
libboost-log1.74.0 \
libboost-coroutine1.81.0 \
libboost-context1.81.0 \
libboost-filesystem1.81.0 \
libboost-log1.81.0 \
libcrypto++8 \
&& rm -rf /var/lib/apt/lists/*

COPY --from=installer /usr/bin/server-manager /usr/bin/server-manager
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ HEALTHCHECK_PROTO := third-party/health.proto

# Docker image settings
TAG ?= devel
EMULATOR_TAG ?= 0.15.2
EMULATOR_REPOSITORY ?= cartesi/machine-emulator
EMULATOR_TAG ?= main
EMULATOR_REPOSITORY ?= ghcr.io/cartesi/machine-emulator

# Mac OS X specific settings
ifeq ($(UNAME),Darwin)
Expand Down Expand Up @@ -109,7 +109,7 @@ $(SERVER_MANAGER_PROTO):
@exit 1

test server-manager: | $(SERVER_MANAGER_PROTO) $(HEALTHCHECK_PROTO)
test lint coverage-report check-format format server-manager create-machines create-and-test clean-machines run-test-server-manager:
test lint coverage-report check-format format server-manager create-machines create-and-test clean-machines clean-test-processes run-test-server-manager:
@eval $$($(MAKE) -s --no-print-directory env); $(MAKE) -C $(SRCDIR) $@

source-default: | $(SERVER_MANAGER_PROTO) checksum
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cartesi Server-Manager

The Cartesi Server-Manager is a microservice that serves as an interface between the Remote Cartesi Machine (RCM) and other components of the Cartesi Rollup node. It is designed to simplify the communication between the RCM and the rest of the Cartesi node. It's written in C/C++ with POSIX dependencies restricted to the terminal and process facilites. Currently, it is distributed as a docker image.
The Cartesi Server-Manager is a microservice that serves as an interface between the Remote Cartesi Machine (RCM) and other components of the Cartesi Rollup node. It is designed to simplify the communication between the RCM and the rest of the Cartesi node. It's written in C/C++ with POSIX dependencies restricted to the terminal and process facilities. Currently, it is distributed as a docker image.

## Getting Started

Expand Down Expand Up @@ -29,7 +29,7 @@ Cleaning targets:
- GNU Make >= 3.81
- GRPC 1.50.0
- Lua 5.4.x
- Boost >= 1.71
- Boost >= 1.81

Obs: Please note that Apple Clang Version number does not follow upstream LLVM/Clang.

Expand Down
2 changes: 1 addition & 1 deletion lib/grpc-interfaces
1 change: 0 additions & 1 deletion lib/machine-emulator-defines
Submodule machine-emulator-defines deleted from 4f164a
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ BOOST_INC_Darwin=-I/usr/local/opt/boost/include
CRYPTOPP_LIB_Darwin:=-L/usr/local/opt/cryptopp/lib -lcryptopp
CRYPTOPP_INC_Darwin:=-I/usr/local/opt/cryptopp/include
else # Macports installation
BOOST_LIB_DIR_Darwin=-L/opt/local/lib
BOOST_INC_Darwin=-I/opt/local/include
BOOST_LIB_DIR_Darwin=-L/opt/local/libexec/boost/1.81/lib
BOOST_INC_Darwin=-I/opt/local/libexec/boost/1.81/include
CRYPTOPP_LIB_Darwin:=-L/opt/local/lib -lcryptopp
CRYPTOPP_INC_Darwin:=-I/opt/local/include
endif
Expand Down Expand Up @@ -107,7 +107,7 @@ GRPC_INC=$(GRPC_INC_$(UNAME))
PROTOBUF_LIB=$(PROTOBUF_LIB_$(UNAME))
CARTESI_EXECUTABLE_LDFLAGS=$(CARTESI_EXECUTABLE_LDFLAGS_$(UNAME))

SERVER_MANAGER_LIBS:=$(CRYPTOPP_LIB) $(GRPC_LIB) $(BOOST_CORO_LIB) $(BOOST_LOG_LIB) -ldl
SERVER_MANAGER_LIBS:=$(CRYPTOPP_LIB) $(GRPC_LIB) $(BOOST_CORO_LIB) $(BOOST_LOG_LIB) $(BOOST_FILESYSTEM_LIB) -ldl
TEST_SERVER_MANAGER_LIBS:=$(CRYPTOPP_LIB) $(GRPC_LIB) -ldl

WARNS=-W -Wall -pedantic
Expand Down
Loading

0 comments on commit 9d025ba

Please sign in to comment.