From 7b3c6df7d1d0f6682a7a3f7527543e227b673499 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 24 May 2024 11:42:45 +0200 Subject: [PATCH] Fix CI --- .github/workflows/ci.yml | 3 ++- examples/bazel_env_test.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7feb300..73dc927 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,8 @@ jobs: env: USE_BAZEL_VERSION: ${{ matrix.bazel }} working-directory: ./examples - run: bazelisk test //... + # Build first because the tests rely on convenience symlinks. + run: bazelisk build //:bazel_env && bazelisk test //... - name: Upload test logs if: always() diff --git a/examples/bazel_env_test.sh b/examples/bazel_env_test.sh index be64e9b..cbb6bb4 100755 --- a/examples/bazel_env_test.sh +++ b/examples/bazel_env_test.sh @@ -42,7 +42,11 @@ chmod +x "$tmpdir/direnv" # Imitate a bazel run environment for the status script. status_out=$(PATH="$tmpdir:$build_workspace_directory/bazel-out/bazel_env-opt/bin/bazel_env/bin:/bin:/usr/bin" \ BUILD_WORKSPACE_DIRECTORY="$build_workspace_directory" \ - ./bazel_env.sh) + ./bazel_env.sh) || { + echo "Status script failed with output:" + echo "$status_out" + exit 1 + } assert_contains "direnv is installed" "$status_out" @@ -52,7 +56,7 @@ assert_cmd_output "bazel-cc" "* error: no input files" assert_cmd_output "buildifier --version" "buildifier version: 6.4.0 " assert_cmd_output "buildozer --version" "buildozer version: 7.1.2 " case "$(arch)" in - x86_64) goarch="amd64";; + i386|x86_64) goarch="amd64";; *) goarch="$(arch)";; esac assert_cmd_output "go version" "go version go1.20.14 $(uname|tr '[:upper:]' '[:lower:]')/$goarch"