From 55dbd3334e42cb8f29fea3145b0a6635c2196c31 Mon Sep 17 00:00:00 2001 From: Carlos Medeiros Date: Wed, 4 Sep 2024 14:57:00 +0100 Subject: [PATCH] fix --- .github/workflows/main.yml | 53 ++++++++++++++++++++------------------ CMakeLists.txt | 11 ++++++-- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11989fa4..b29033f4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,38 +21,21 @@ jobs: build: runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ - libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ - libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev - name: Checkout uses: actions/checkout@v4 with: submodules: true - - name: Install CMake 3.28 - run: | - wget https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh - sudo mkdir /opt/cmake - sudo sh cmake-3.28.0-linux-x86_64.sh --skip-license --prefix=/opt/cmake - sudo ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake - sudo ln -sf /opt/cmake/bin/ctest /usr/local/bin/ctest - - name: Verify CMake version - run: cmake --version - name: Install deps run: | sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 make deps - - name: Run CMake - run: mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make - run: make cpp_test build_only_rust: runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true - name: Install deps @@ -134,6 +117,12 @@ jobs: id echo $HOME echo $DISPLAY + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \ + libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ + libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev - name: Checkout uses: actions/checkout@v4 with: @@ -144,7 +133,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -176,7 +167,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -209,7 +202,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -242,7 +237,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -275,7 +272,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -308,7 +307,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn @@ -341,7 +342,9 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 + with: + node-version: 18 - name: Install yarn run: | npm install -g yarn diff --git a/CMakeLists.txt b/CMakeLists.txt index 695f7fcc..ba823964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,15 +21,22 @@ HunterGate( LOCAL ) +if(CMAKE_GENERATOR MATCHES "Ninja") + message(FATAL_ERROR "This project does not support the Ninja generator. " + "Please use Unix Makefiles or another supported generator. " + "This error is typical in CLion. In this case, switch to generator Unix Makefiles.") +endif() project(ledger-oasis VERSION 0.0.0) -enable_testing() +set(CMAKE_CXX_STANDARD 17) cmake_policy(SET CMP0025 NEW) -set(CMAKE_CXX_STANDARD 11) +cmake_policy(SET CMP0144 NEW) set(HUNTER_STATUS_DEBUG ON) set(HUNTER_TLS_VERIFY OFF) +enable_testing() + option(ENABLE_FUZZING "Build with fuzzing instrumentation and build fuzz targets" OFF) option(ENABLE_COVERAGE "Build with source code coverage instrumentation" OFF) option(ENABLE_SANITIZERS "Build with ASAN and UBSAN" ON)