From b0be53ed6aafc094959aac3679bb01da07cb79ce Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 11 Mar 2025 00:27:59 +0100 Subject: [PATCH] Fix GitHub Actions build now that images come with ninja Looks like the github actions image now has ninja installed. This causes a failure; we effectively do $ ( mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo ) $ make VERBOSE=1 [...] cd build; cmake .. -G "Ninja" \ -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 Re-run cmake no build system arguments CMake Error: Error: generator : Ninja Does not match the generator used previously: Unix Makefiles Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory. "make" fails because it runs from top-level, with GNUMakefile's logic to use -GNinja if available. This is at odds with the direct cmake invocation, which defaults to -G'Unix Makefiles'. We shouldn't mix direct cmake invocation and the top-level Makefiles, so run make from the build directory instead. While at it, update some test invocations missed in 8d6fdfd9de (Remove cmake "test" target, 2025-02-02). This should help avoid missing test failure output in CI, see https://github.com/fish-shell/fish-shell/issues/11116#issuecomment-2629406479 --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ffb7de1c4..f300840a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,10 +28,10 @@ jobs: cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo - name: make run: | - make VERBOSE=1 + make -C build VERBOSE=1 - name: make fish_run_tests run: | - make VERBOSE=1 test + make -C build VERBOSE=1 fish_run_tests ubuntu-32bit-static-pcre2: @@ -54,10 +54,10 @@ jobs: cmake -DFISH_USE_SYSTEM_PCRE2=OFF -DRust_CARGO_TARGET=i586-unknown-linux-gnu .. - name: make run: | - make VERBOSE=1 + make -C build VERBOSE=1 - name: make fish_run_tests run: | - make VERBOSE=1 test + make -C build VERBOSE=1 fish_run_tests ubuntu-asan: @@ -92,7 +92,7 @@ jobs: cmake .. -DASAN=1 -DRust_CARGO_TARGET=x86_64-unknown-linux-gnu -DCMAKE_BUILD_TYPE=Debug - name: make run: | - make VERBOSE=1 + make -C build VERBOSE=1 - name: make fish_run_tests env: FISH_CI_SAN: 1 @@ -107,7 +107,7 @@ jobs: llvm_version=$(clang --version | awk 'NR==1 { split($NF, version, "."); print version[1] }') export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-$llvm_version export LSAN_OPTIONS="$LSAN_OPTIONS:suppressions=$PWD/build_tools/lsan_suppressions.txt" - make VERBOSE=1 test + make -C build VERBOSE=1 fish_run_tests # Our clang++ tsan builds are not recognizing safe rust patterns (such as the fact that Drop # cannot be called while a thread is using the object in question). Rust has its own way of @@ -135,7 +135,7 @@ jobs: # make # - name: make fish_run_tests # run: | - # make fish_run_tests + # make -C build fish_run_tests macos: @@ -160,7 +160,7 @@ jobs: cmake -DWITH_GETTEXT=NO -DCMAKE_BUILD_TYPE=Debug .. - name: make run: | - make VERBOSE=1 + make -C build VERBOSE=1 - name: make fish_run_tests run: | - make VERBOSE=1 test + make -C build VERBOSE=1 fish_run_tests