diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e870646..575f844 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,8 @@ name: Build/Test/Release on: [push] env: - EMULATOR_REPOSITORY: cartesi/machine-emulator - EMULATOR_TAG: 0.15.2 - ROM_VERSION: v0.17.0 + EMULATOR_REPOSITORY: ghcr.io/cartesi/machine-emulator + EMULATOR_TAG: main KERNEL_VERSION: v0.17.0 LINUX_VERSION: 5.15.63-ctsi-2-v0.17.0 ROOTFS_VERSION: v0.18.0 @@ -141,19 +140,11 @@ jobs: tag: ${{ env.KERNEL_VERSION }} file: linux-${{ env.LINUX_VERSION }}.bin - - name: Download [rom.bin] - uses: Legion2/download-release-action@v2.1.0 - 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 }} 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 - name: Run test suite inside the docker image (Linux/${{ matrix.arch }}) @@ -252,19 +243,11 @@ jobs: tag: ${{ env.KERNEL_VERSION }} file: linux-${{ env.LINUX_VERSION }}.bin - - name: Download [rom.bin] - uses: Legion2/download-release-action@v2.1.0 - 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 }} 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 - name: Run test suite inside the docker image (Linux/${{ matrix.arch }}) diff --git a/CHANGELOG.md b/CHANGELOG.md index 881fb92..75a6301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Dockerfile b/Dockerfile index b8bcacd..7f00df1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \ @@ -36,7 +36,7 @@ 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-log1.81.0 \ && rm -rf /var/lib/apt/lists/* COPY --from=installer /usr/bin/server-manager /usr/bin/server-manager diff --git a/Makefile b/Makefile index 06dbd42..bcb860c 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/lib/grpc-interfaces b/lib/grpc-interfaces index cba7c3f..a602da2 160000 --- a/lib/grpc-interfaces +++ b/lib/grpc-interfaces @@ -1 +1 @@ -Subproject commit cba7c3f1c53b83bee83d8a1e5a1074591279220f +Subproject commit a602da2f52f79a982480f9f3d9e92c1ee0c7f47c diff --git a/lib/machine-emulator-defines b/lib/machine-emulator-defines index 4f164a7..c30dfb2 160000 --- a/lib/machine-emulator-defines +++ b/lib/machine-emulator-defines @@ -1 +1 @@ -Subproject commit 4f164a788ff34b43c6c070fdc14204cd69110440 +Subproject commit c30dfb2bdfe994396f3e6d8f173b197c1b39785c diff --git a/src/Makefile b/src/Makefile index cfe55e9..54bc321 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/create-machines.lua b/src/create-machines.lua index 6e18efd..f20f4a6 100755 --- a/src/create-machines.lua +++ b/src/create-machines.lua @@ -123,9 +123,8 @@ function create_default_config(images_dir, command) length = 0x4000000, image_filename = images_dir .. "linux.bin", }, - rom = { - image_filename = images_dir .. "rom.bin", - bootargs = "console=hvc0 rootfstype=ext2 root=/dev/mtdblock0 rw quiet swiotlb=noforce splash=no mtdparts=flash.0:-(root) init=/opt/cartesi/bin/init " .. command, + dtb = { + bootargs = "console=hvc0 rootfstype=ext2 root=/dev/mtdblock0 rw quiet swiotlb=noforce splash=no mtdparts=flash.0:-(root) init=/opt/cartesi/bin/init random.trust_bootloader=on " .. command, }, htif = { console_getchar = false, -- default diff --git a/src/server-manager.cpp b/src/server-manager.cpp index ae74c8b..93407a3 100644 --- a/src/server-manager.cpp +++ b/src/server-manager.cpp @@ -100,8 +100,8 @@ constexpr const uint64_t ROLLUP_ADVANCE_STATE = 0; constexpr const uint64_t ROLLUP_INSPECT_STATE = 1; static constexpr uint32_t manager_version_major = 0; -static constexpr uint32_t manager_version_minor = 8; -static constexpr uint32_t manager_version_patch = 2; +static constexpr uint32_t manager_version_minor = 9; +static constexpr uint32_t manager_version_patch = 0; static constexpr const char *manager_version_pre_release = ""; static constexpr const char *manager_version_build = ""; @@ -3282,6 +3282,9 @@ where passed to the spawned remote cartesi machine default: localhost:0 + --version + prints the server version number + --help prints this message and exits @@ -3289,6 +3292,11 @@ where name); } +/// \brief Prints server_manager version +static void print_version() { + (void) fprintf(stderr, "%d.%d.%d\n", manager_version_major, manager_version_minor, manager_version_patch); +} + /// \brief Checks if string matches prefix and captures remaninder /// \param pre Prefix to match in str. /// \param str Input string @@ -3345,6 +3353,9 @@ int main(int argc, char *argv[]) try { ; } else if (stringval("--server-address=", argv[i], &server_address)) { ; + } else if (strcmp(argv[i], "--version") == 0) { + print_version(); + exit(0); } else if (strcmp(argv[i], "--help") == 0) { help(argv[0]); exit(0); diff --git a/src/test-server-manager.cpp b/src/test-server-manager.cpp index 63bced1..d3f5d94 100644 --- a/src/test-server-manager.cpp +++ b/src/test-server-manager.cpp @@ -565,12 +565,12 @@ void assert_bool(bool value, const std::string &msg, const std::string &file, in #define ASSERT_STATUS_CODE(s, f, v) assert_status_code(s, f, v, __FILE__, __LINE__) static void test_get_version(const std::function &test) { - test("The server-manager server version should be 0.8.x", [](ServerManagerClient &manager) { + test("The server-manager server version should be 0.9.x", [](ServerManagerClient &manager) { Versioning::GetVersionResponse response; Status status = manager.get_version(response); ASSERT_STATUS(status, "GetVersion", true); ASSERT((response.version().major() == 0), "Version Major should be 0"); - ASSERT((response.version().minor() == 8), "Version Minor should be 8"); + ASSERT((response.version().minor() == 9), "Version Minor should be 9"); }); }