From f0cac8dd9f1d96d3093d104157e5f13fb78b11a9 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 12 Nov 2024 16:24:05 -0500 Subject: [PATCH] avoid network access by default (#773) --- .github/workflows/aarch64.yml | 2 +- .github/workflows/alpine.yml | 2 +- .github/workflows/emscripten.yml | 2 +- .github/workflows/macos_install.yml | 2 +- .github/workflows/ubuntu-s390x.yml | 2 +- .github/workflows/ubuntu-sanitized.yml | 2 +- .github/workflows/ubuntu-undef.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- .github/workflows/ubuntu_install.yml | 2 +- .github/workflows/ubuntu_pedantic.yml | 2 +- .github/workflows/visual_studio.yml | 2 +- .github/workflows/visual_studio_clang.yml | 2 +- CMakeLists.txt | 2 +- cmake/ada-flags.cmake | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/aarch64.yml b/.github/workflows/aarch64.yml index 1234dff76..85a67ceb5 100644 --- a/.github/workflows/aarch64.yml +++ b/.github/workflows/aarch64.yml @@ -38,6 +38,6 @@ jobs: ln -s -f /usr/bin/gcc-12 /usr/bin/gcc ln -s -f /usr/bin/g++-12 /usr/bin/g++ run: | - cmake -DCMAKE_CXX_STANDARD=20 -B build + cmake -DCMAKE_CXX_STANDARD=20 -D ADA_TESTING=ON -B build cmake --build build ctest --test-dir build diff --git a/.github/workflows/alpine.yml b/.github/workflows/alpine.yml index ff1b2b5c4..e54a7bf2e 100644 --- a/.github/workflows/alpine.yml +++ b/.github/workflows/alpine.yml @@ -36,7 +36,7 @@ jobs: ./alpine.sh apk add build-base cmake g++ linux-headers git bash icu-dev - name: cmake run: | - ./alpine.sh cmake -DADA_BENCHMARKS=ON -B build_for_alpine + ./alpine.sh cmake -D ADA_TESTING=ON -DADA_BENCHMARKS=ON -B build_for_alpine - name: build run: | ./alpine.sh cmake --build build_for_alpine diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index 2a72f744d..601f37bbc 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -32,7 +32,7 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0 - name: Configure - run: emcmake cmake -B buildwasm -D ADA_TOOLS=OFF + run: emcmake cmake -B buildwasm -D ADA_TESTING=ON -D ADA_TOOLS=OFF - name: Build run: cmake --build buildwasm - name: Test diff --git a/.github/workflows/macos_install.yml b/.github/workflows/macos_install.yml index fc6db0dbd..3f9570eec 100644 --- a/.github/workflows/macos_install.yml +++ b/.github/workflows/macos_install.yml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Prepare - run: cmake -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX:PATH=destination -B build + run: cmake -D ADA_TESTING=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX:PATH=destination -B build - name: Build run: cmake --build build -j=3 - name: Install diff --git a/.github/workflows/ubuntu-s390x.yml b/.github/workflows/ubuntu-s390x.yml index 75ed9fb6e..6a38470cf 100644 --- a/.github/workflows/ubuntu-s390x.yml +++ b/.github/workflows/ubuntu-s390x.yml @@ -36,7 +36,7 @@ jobs: apt-get update -q -y apt-get install -y cmake make g++ git ninja-build run: | - cmake -DCMAKE_BUILD_TYPE=Release -G Ninja -B build + cmake -D ADA_TESTING=ON -DCMAKE_BUILD_TYPE=Release -G Ninja -B build rm -r -f dependencies cmake --build build -j=4 ctest --output-on-failure --test-dir build diff --git a/.github/workflows/ubuntu-sanitized.yml b/.github/workflows/ubuntu-sanitized.yml index 89310719a..8716f05de 100644 --- a/.github/workflows/ubuntu-sanitized.yml +++ b/.github/workflows/ubuntu-sanitized.yml @@ -31,7 +31,7 @@ jobs: - name: Setup Ninja run: sudo apt-get install ninja-build - name: Prepare - run: cmake -DADA_SANITIZE=ON -DADA_DEVELOPMENT_CHECKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build + run: cmake -D ADA_TESTING=ON -DADA_SANITIZE=ON -DADA_DEVELOPMENT_CHECKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build env: CXX: g++-12 - name: Build diff --git a/.github/workflows/ubuntu-undef.yml b/.github/workflows/ubuntu-undef.yml index d7ab520c6..e8bc1a126 100644 --- a/.github/workflows/ubuntu-undef.yml +++ b/.github/workflows/ubuntu-undef.yml @@ -31,7 +31,7 @@ jobs: - name: Setup Ninja run: sudo apt-get install ninja-build - name: Prepare - run: cmake -D ADA_SANITIZE_UNDEFINED=ON -DADA_DEVELOPMENT_CHECKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build + run: cmake -D ADA_TESTING=ON -D ADA_SANITIZE_UNDEFINED=ON -DADA_DEVELOPMENT_CHECKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build env: CXX: g++-12 - name: Build diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index fadfa8688..c20fdc5e1 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Ninja run: sudo apt-get install ninja-build - name: Prepare - run: cmake -D ADA_BENCHMARKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build + run: cmake -D ADA_TESTING=ON -D ADA_BENCHMARKS=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build env: CXX: ${{matrix.cxx}} - name: Build diff --git a/.github/workflows/ubuntu_install.yml b/.github/workflows/ubuntu_install.yml index 11eb31658..ed4110276 100644 --- a/.github/workflows/ubuntu_install.yml +++ b/.github/workflows/ubuntu_install.yml @@ -32,7 +32,7 @@ jobs: - name: Setup Ninja run: sudo apt-get install ninja-build - name: Prepare - run: cmake -G Ninja -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX:PATH=destination -B build + run: cmake -D ADA_TESTING=ON -G Ninja -DBUILD_SHARED_LIBS=${{matrix.shared}} -DCMAKE_INSTALL_PREFIX:PATH=destination -B build - name: Build run: cmake --build build -j=4 - name: Install diff --git a/.github/workflows/ubuntu_pedantic.yml b/.github/workflows/ubuntu_pedantic.yml index c7d844ae2..ad77a7b04 100644 --- a/.github/workflows/ubuntu_pedantic.yml +++ b/.github/workflows/ubuntu_pedantic.yml @@ -31,7 +31,7 @@ jobs: - name: Setup Ninja run: sudo apt-get install ninja-build - name: Prepare - run: cmake -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build + run: cmake -D ADA_TESTING=ON -DBUILD_SHARED_LIBS=${{matrix.shared}} -G Ninja -B build env: CXX: g++-12 CXXFLAGS: -Werror diff --git a/.github/workflows/visual_studio.yml b/.github/workflows/visual_studio.yml index 558d50566..7ce4ce3c2 100644 --- a/.github/workflows/visual_studio.yml +++ b/.github/workflows/visual_studio.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Configure run: | - cmake -DADA_DEVELOPMENT_CHECKS="${{matrix.devchecks}}" -G "${{matrix.gen}}" -A ${{matrix.arch}} -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build + cmake -D ADA_TESTING=ON -DADA_DEVELOPMENT_CHECKS="${{matrix.devchecks}}" -G "${{matrix.gen}}" -A ${{matrix.arch}} -DBUILD_SHARED_LIBS=${{matrix.shared}} -B build - name: Build run: cmake --build build --config "${{matrix.config}}" --verbose - name: Run tests diff --git a/.github/workflows/visual_studio_clang.yml b/.github/workflows/visual_studio_clang.yml index 2abc246f7..5c2b71aac 100644 --- a/.github/workflows/visual_studio_clang.yml +++ b/.github/workflows/visual_studio_clang.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Configure run: | - cmake -DADA_DEVELOPMENT_CHECKS="${{matrix.devchecks}}" -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -B build + cmake -D ADA_TESTING=ON -DADA_DEVELOPMENT_CHECKS="${{matrix.devchecks}}" -G "${{matrix.gen}}" -A ${{matrix.arch}} -T ClangCL -B build - name: Build Debug run: cmake --build build --config Debug --verbose - name: Run Debug tests diff --git a/CMakeLists.txt b/CMakeLists.txt index a4cbb576e..7b2c0850b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ add_subdirectory(src) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake) option(ADA_BENCHMARKS "Build benchmarks" OFF) -option(ADA_TESTING "Build tests" ${BUILD_TESTING}) +option(ADA_TESTING "Build tests" OFF) # There are cases where when embedding ada as a dependency for other CMake # projects as submodules or subdirectories (via FetchContent) can lead to diff --git a/cmake/ada-flags.cmake b/cmake/ada-flags.cmake index f4bb9dd04..c351a7a94 100644 --- a/cmake/ada-flags.cmake +++ b/cmake/ada-flags.cmake @@ -15,7 +15,7 @@ if(ADA_SANITIZE_UNDEFINED) message(STATUS "Undefined sanitizer enabled.") endif() option(ADA_COVERAGE "Compute coverage" OFF) -option(ADA_TOOLS "Build cli tools (adaparse)" ON) +option(ADA_TOOLS "Build cli tools (adaparse)" OFF) if (ADA_COVERAGE) message(STATUS "You want to compute coverage. We assume that you have installed gcovr.")