From 2a2c614eb40a2b3da5a15bcf4c714558f973c3c2 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Tue, 26 Nov 2024 11:21:51 +0800 Subject: [PATCH] ci:remove pre-install pkg-config --- .github/workflows/cleanup.sh | 6 ++++++ .github/workflows/doc.yml | 2 +- .github/workflows/go.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/cleanup.sh diff --git a/.github/workflows/cleanup.sh b/.github/workflows/cleanup.sh new file mode 100644 index 00000000..9153db88 --- /dev/null +++ b/.github/workflows/cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +if pkg=$(brew list | grep -E "pkg-config"); then + brew uninstall "$pkg" || true +fi diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index d3a1ab14..e5f669a5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -43,7 +43,7 @@ jobs: run: | set -e set -x - brew uninstall pkg-config@0.29.2 + bash .github/workflows/cleanup.sh source doc/_readme/scripts/install_macos.sh - name: Install dependencies on Ubuntu diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9c4a2d45..f1af6f44 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -41,7 +41,7 @@ jobs: - name: Install dependencies if: startsWith(matrix.os, 'macos') run: | - brew uninstall pkg-config@0.29.2 + bash .github/workflows/cleanup.sh brew update brew install llvm@${{matrix.llvm}} pkg-config bdw-gc openssl libffi echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH