diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 062ad2b6ed5adaa4492b44ee0815be8dbb8d34bb..72a8828f64839dd0533f9f1c668e91e1670528f7 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -4,55 +4,67 @@ on: [push, pull_request] jobs: build-ubuntu: - name: Ubuntu/GCC build + name: Ubuntu/GCC autotools build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: deps + - name: Dependencies run: | - sudo apt install libncurses5-dev libreadline-dev nettle-dev \ + sudo apt install libncurses5-dev libreadline-dev nettle-dev libasio-dev \ libgnutls28-dev libuv1-dev cython3 python3-dev python3-setuptools libcppunit-dev libjsoncpp-dev \ autotools-dev autoconf libfmt-dev libhttp-parser-dev libmsgpack-dev libargon2-0-dev - - name: autogen - run: ./autogen.sh - - name: asio + - name: Configure run: | - wget https://github.com/aberaud/asio/archive/b2b7a1c166390459e1c169c8ae9ef3234b361e3f.tar.gz \ - && tar -xvf b2b7a1c166390459e1c169c8ae9ef3234b361e3f.tar.gz && cd asio-b2b7a1c166390459e1c169c8ae9ef3234b361e3f/asio \ - && ./autogen.sh && ./configure --prefix=/usr --without-boost --disable-examples --disable-tests \ - && sudo make install \ - && cd ../../ && rm -rf asio* - - name: configure - run: ./configure - - name: make + ./autogen.sh + ./configure + - name: Build + run: make + - name: Unit tests + run: ./opendht_unit_tests + + build-ubuntu: + name: Ubuntu/GCC Meson build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Dependencies + run: | + sudo apt install meson ninja-build libncurses5-dev libreadline-dev nettle-dev libasio-dev \ + libgnutls28-dev libuv1-dev cython3 python3-dev python3-setuptools libcppunit-dev libjsoncpp-dev \ + libfmt-dev libhttp-parser-dev libmsgpack-dev libargon2-0-dev + - name: Configure + run: meson setup build . + - name: Build run: make - - name: make check - run: make check + - name: Unit tests + run: ./opendht_unit_tests build-ubuntu-minimal: name: Ubuntu/GCC minimal build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: deps + - name: Dependencies run: | sudo apt install libncurses5-dev libreadline-dev nettle-dev \ libgnutls28-dev libcppunit-dev libmsgpack-dev libargon2-0-dev - - name: cmake + - name: Configure run: | mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug \ -DOPENDHT_C=Off -DOPENDHT_TESTS=On -DOPENDHT_PEER_DISCOVERY=Off -DOPENDHT_PYTHON=Off \ -DOPENDHT_TOOLS=On -DOPENDHT_PROXY_SERVER=Off -DOPENDHT_PROXY_CLIENT=Off - - name: make + - name: Build run: cd build && make + - name: Unit tests + run: cd build && ./opendht_unit_tests build-macos: name: macOS/Clang build runs-on: macos-11 steps: - uses: actions/checkout@v3 - - name: deps + - name: Dependencies run: | brew install msgpack-cxx asio gnutls nettle readline fmt jsoncpp argon2 openssl http-parser cppunit @@ -68,7 +80,7 @@ jobs: make -j8 && sudo make install cd ../../.. && rm -rf restinio - - name: cmake + - name: Configure run: | mkdir build && cd build export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH" @@ -79,6 +91,6 @@ jobs: -DOPENDHT_C=On -DOPENDHT_TESTS=On -DOPENDHT_PEER_DISCOVERY=On -DOPENDHT_PYTHON=Off \ -DOPENDHT_TOOLS=On -DOPENDHT_PROXY_SERVER=On -DOPENDHT_PROXY_CLIENT=On -DOPENDHT_PUSH_NOTIFICATIONS=On - - name: make + - name: Build run: cd build && make