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 64697d15..e5f669a5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -2,9 +2,9 @@ name: Docs on: push: - branches: [ "*" ] + branches: [ "**" ] pull_request: - branches: [ "*" ] + branches: [ "**" ] jobs: doc_verify: @@ -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 3ecb5f67..8c6873d6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,9 +5,9 @@ name: Go on: push: - branches: [ "*" ] + branches: [ "**" ] pull_request: - branches: [ "*" ] + branches: [ "**" ] jobs: fmt: @@ -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 @@ -99,6 +99,12 @@ jobs: - name: Build run: go build -v ./... + - name: Install + run: go install ./... + + - name: Install llcppg + run: bash .github/workflows/install_llcppg_depend.sh + - name: Test if: ${{!startsWith(matrix.os, 'macos')}} run: go test -v ./... @@ -107,9 +113,6 @@ jobs: if: startsWith(matrix.os, 'macos') run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./... - - name: Install - run: go install ./... - - name: LLGO tests if: ${{!startsWith(matrix.os, 'ubuntu')}} run: | diff --git a/.github/workflows/install_llcppg_depend.sh b/.github/workflows/install_llcppg_depend.sh new file mode 100644 index 00000000..630b8105 --- /dev/null +++ b/.github/workflows/install_llcppg_depend.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +llgo install ./chore/_xtool/llcppsymg +llgo install ./chore/_xtool/llcppsigfetch +go install ./chore/gogensig \ No newline at end of file