From 4efaf5e09205b9d492b7852e770a35095e3ae1d1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 5 Sep 2024 04:33:09 -0700 Subject: [PATCH] Fix github CI (#470) Summary: Pull Request resolved: https://github.com/facebookincubator/Glean/pull/470 Reviewed By: malanka Differential Revision: D62227838 --- .github/workflows/ci.yml | 3 ++- glean.cabal.in | 7 ++++++- glean/lang/go/tests/cases/xrefs/metadata.out | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39452b93b..93fe83c51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,6 +133,7 @@ jobs: update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-$VER 10 # needed for `hsc2hs`, `g++` is hardcoded into `hsc2hs-options`. update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-$VER 10 + echo CABAL_CONFIG_FLAGS="$CABAL_CONFIG_FLAGS -fclang" >>"$GITHUB_ENV" - name: Install folly and rocksdb dependencies run: | @@ -156,7 +157,7 @@ jobs: run: cabal update - name: Disable some tests - run: echo CABAL_CONFIG_FLAGS="-f-hack-tests -f-rust-tests -f-python-tests" >> "$GITHUB_ENV" + run: echo CABAL_CONFIG_FLAGS="$CABAL_CONFIG_FLAGS -f-hack-tests -f-rust-tests -f-python-tests" >> "$GITHUB_ENV" - name: Install hsthrift and Glean dependencies run: apt-get install -y pkg-config rsync libgmock-dev libpcre3-dev libtinfo-dev libxxhash-dev diff --git a/glean.cabal.in b/glean.cabal.in index 6041d3090..cd7c72325 100644 --- a/glean.cabal.in +++ b/glean.cabal.in @@ -52,7 +52,9 @@ common fb-haskell ghc-options: -O2 common fb-cpp - cxx-options: -std=c++17 -fcoroutines + cxx-options: -std=c++17 + if !flag(clang) + cxx-options: -fcoroutines if arch(x86_64) cxx-options: -march=haswell if flag(opt) @@ -63,6 +65,9 @@ common fb-cpp common exe ghc-options: -threaded +flag clang + default: False + flag opt default: False diff --git a/glean/lang/go/tests/cases/xrefs/metadata.out b/glean/lang/go/tests/cases/xrefs/metadata.out index efc4dbd9a..34644f638 100644 --- a/glean/lang/go/tests/cases/xrefs/metadata.out +++ b/glean/lang/go/tests/cases/xrefs/metadata.out @@ -12,4 +12,4 @@ "textEncoding": 1 } } -] +] \ No newline at end of file