From a67d6c1d5308b0950a91fed8e03e5c048d22d5cd Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Fri, 17 May 2024 17:49:17 +0000 Subject: [PATCH] Switch to vcpkg for dependencies. Ubuntu ships very old versions and it's cramping my style. (In particular, I want to be able to use Abseil logging.) While I'm here, add GCC 14 to the build matrix. ... and remove GCC 11 so that we continue to test with only the three most recent releases. Change-Id: If7eb226005d8d9e56d3523e6e255d29814646d10 Reviewed-on: https://code-review.googlesource.com/c/re2/+/63070 Reviewed-by: Alex Chernyakhovsky Reviewed-by: Paul Wankadia --- .github/workflows/ci-cmake.yml | 16 +++++----------- .github/workflows/ci.yml | 15 +++++++++------ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-cmake.yml b/.github/workflows/ci-cmake.yml index 07ecdfbe0..c4f21ac40 100644 --- a/.github/workflows/ci-cmake.yml +++ b/.github/workflows/ci-cmake.yml @@ -7,26 +7,20 @@ permissions: jobs: build-linux: runs-on: ubuntu-latest - # The Benchmark package on Ubuntu 22.04 LTS is problematic whereas this - # Docker container is based on Debian bookworm and has a newer version. - container: gcc:13 strategy: fail-fast: false matrix: build_shared_libs: [OFF, ON] steps: - uses: actions/checkout@v4.1.4 - - name: Install CMake - run: | - apt update -y - apt install -y cmake - shell: bash - name: Install Abseil, GoogleTest and Benchmark run: | - apt update -y - apt install -y libabsl-dev libgtest-dev libbenchmark-dev + vcpkg update + vcpkg install abseil gtest benchmark shell: bash - - run: .github/cmake.sh -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} + - run: | + .github/cmake.sh -D BUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} \ + -D CMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake shell: bash build-macos: runs-on: macos-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b83b4e52d..b367ca242 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: env: CC: clang-${{ matrix.ver }} CXX: clang++-${{ matrix.ver }} + PKG_CONFIG_PATH: /usr/local/share/vcpkg/installed/x64-linux/lib/pkgconfig steps: - uses: actions/checkout@v4.1.4 - name: Install Clang ${{ matrix.ver }} @@ -50,26 +51,28 @@ jobs: shell: bash - name: Install Abseil, GoogleTest and Benchmark run: | - sudo apt update -y - sudo apt install -y libabsl-dev libgtest-dev libbenchmark-dev + vcpkg update + vcpkg install abseil gtest benchmark shell: bash - run: make && make test shell: bash build-gcc: - runs-on: ubuntu-latest + # TODO(junyer): Switch back to `ubuntu-latest` when this becomes that. + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - ver: [11, 12, 13] + ver: [12, 13, 14] env: CC: gcc-${{ matrix.ver }} CXX: g++-${{ matrix.ver }} + PKG_CONFIG_PATH: /usr/local/share/vcpkg/installed/x64-linux/lib/pkgconfig steps: - uses: actions/checkout@v4.1.4 - name: Install Abseil, GoogleTest and Benchmark run: | - sudo apt update -y - sudo apt install -y libabsl-dev libgtest-dev libbenchmark-dev + vcpkg update + vcpkg install abseil gtest benchmark shell: bash - run: make && make test shell: bash