From 45edfc19e4082bc90ff4bf8168e7c45bbbdb9d95 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Sat, 22 Apr 2023 01:31:27 +0800 Subject: [PATCH] Test setup with system cityhash in Linux workflow --- .github/workflows/linux.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 905c0868..c63f49ea 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -58,15 +58,23 @@ jobs: C_COMPILER: gcc CXX_COMPILER: g++ DEPENDENCIES_INSTALL: libabsl-dev liblz4-dev + HOMEBREW_DEPENDENCIES_INSTALL: cityhash DEPENDENCIES_CMAKE_OPTIONS: >- -D WITH_SYSTEM_LZ4=ON -D WITH_SYSTEM_ABSEIL=ON + -D WITH_SYSTEM_CITYHASH=ON + -D CMAKE_LIBRARY_PATH="$(brew --prefix cityhash)/lib" + -D CMAKE_CXX_FLAGS="-I$(brew --prefix cityhash)/include" runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v2 + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + if: matrix.HOMEBREW_DEPENDENCIES_INSTALL + - name: Install dependencies run: | sudo apt-get update && \ @@ -76,6 +84,11 @@ jobs: ${{matrix.COMPILER_INSTALL}} \ ${{matrix.DEPENDENCIES_INSTALL}} + - name: Install dependencies from Homebrew + if: matrix.HOMEBREW_DEPENDENCIES_INSTALL + run: | + brew install ${{matrix.HOMEBREW_DEPENDENCIES_INSTALL}} + - name: Install dependencies - Docker run: | sudo apt remove -y docker docker-engine docker.io containerd runc @@ -95,7 +108,7 @@ jobs: ${{matrix.SSL_CMAKE_OPTION}} \ ${{matrix.DEPENDENCIES_CMAKE_OPTIONS}} \ -S ${{github.workspace}} \ - -B ${{github.workspace}}/build + -B ${{github.workspace}}/build - name: Build project run: |