From 0b26c92cc895a1dcd06a5a2451d559bcb247cc76 Mon Sep 17 00:00:00 2001 From: ricksterhd123 Date: Thu, 25 Jan 2024 03:29:17 +0000 Subject: [PATCH] add github workflow --- .github/workflows/mruv.yml | 25 +++++++++++++++++++++++++ CMakeLists.txt | 3 ++- Dockerfile | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/mruv.yml diff --git a/.github/workflows/mruv.yml b/.github/workflows/mruv.yml new file mode 100644 index 0000000..44ec5c4 --- /dev/null +++ b/.github/workflows/mruv.yml @@ -0,0 +1,25 @@ +name: mruv CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v5 + with: + context: . + tags: mruv:latest + cache-from: type=gha + cache-to: type=gha,mode=max + load: true + - name: Build mruv + run: bash build.sh + - name: Run mruv + run: cd build && ./mruv diff --git a/CMakeLists.txt b/CMakeLists.txt index a8f1e3f..116001b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,5 +13,6 @@ add_library(libuv STATIC IMPORTED) set_target_properties(libuv PROPERTIES IMPORTED_LOCATION /usr/local/lib/libuv.a) set_target_properties(libuv PROPERTIES INTERFACE_INCLUDE_DIRECTORIES /usr/local/include) -target_link_libraries(mruv PRIVATE libuv mruby m) +target_compile_options(mruv PUBLIC "-pthread") +target_link_libraries(mruv PRIVATE libuv mruby m dl pthread) target_include_directories(mruv PRIVATE "${PROJECT_BINARY_DIR}") diff --git a/Dockerfile b/Dockerfile index 661dc1a..32ff8d3 100755 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y wget RUN apt update && apt install -y curl RUN apt update && apt install -y gnupg2 RUN apt update && apt install -y netcat +RUN apt update && apt install -y libpthread-stubs0-dev # grab rvm && install ruby RUN gpg2 --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB