diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11989fa4..abdb3125 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,33 +19,16 @@ jobs: run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT build: - runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }} + runs-on: 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: @@ -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,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -176,7 +165,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -209,7 +198,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -242,7 +231,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -275,7 +264,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -308,7 +297,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install yarn run: | npm install -g yarn @@ -341,7 +330,7 @@ jobs: with: toolchain: stable - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - 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)