diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml new file mode 100644 index 0000000000..9b27b337b6 --- /dev/null +++ b/.github/workflows/build-check.yml @@ -0,0 +1,57 @@ +name: build-check + +# Does a quick compilation check of Boundary on push + +on: + push: + branches: + - '**' + tags-ignore: + - '**' + paths-ignore: + - 'website/**' + +permissions: + contents: read + +jobs: + build: + runs-on: ${{ fromJSON(vars.RUNNER) }} + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: '0' + - name: Determine Go version + id: get-go-version + # We use .go-version as our source of truth for current Go + # version, because "goenv" can react to it automatically. + run: | + echo "Building with Go $(cat .go-version)" + echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - name: Set up Go + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 + with: + go-version: "${{ steps.get-go-version.outputs.go-version }}" + cache: false + - name: Determine go cache key + id: go-cache-key + run: | + echo "key=${{ runner.os }}-go-${{ hashFiles('**/go.sum', './Makefile', './tools/tools.go') }}" >> "$GITHUB_OUTPUT" + - name: Determine Go cache paths + id: go-cache-paths + run: | + echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" + echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" + echo "go-bin=$(go env GOPATH)/bin" >> "$GITHUB_OUTPUT" + - name: Set up Go modules cache + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + with: + path: | + ${{ steps.go-cache-paths.outputs.go-build }} + ${{ steps.go-cache-paths.outputs.go-mod }} + ${{ steps.go-cache-paths.outputs.go-bin }} + key: ${{ steps.go-cache-key.outputs.key }} + restore-keys: | + ${{ runner.os }}-go + - name: Build Boundary + run: make build-no-ui diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6980f20cd..d58f17636c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,11 +3,15 @@ name: build on: push: branches: - - '**' + - 'main' + - 'release/**' tags-ignore: - '**' paths-ignore: - 'website/**' + pull_request: + paths-ignore: + - 'website/**' workflow_call: workflow_dispatch: diff --git a/.github/workflows/enos-run.yml b/.github/workflows/enos-run.yml index 0fc2275d87..817a40fb3a 100644 --- a/.github/workflows/enos-run.yml +++ b/.github/workflows/enos-run.yml @@ -335,7 +335,7 @@ jobs: token: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }} payload: | channel: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }} - text: ":x: e2e tests failed (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>" + text: ":x: e2e tests failed (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*Branch:* ${{ github.repository }}:${{ github.head_ref || github.ref_name }}" - name: Send Slack message if Run but Retry passes uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 if: ${{ steps.run.outcome == 'failure' && steps.run_retry.outcome != 'failure' }} @@ -344,5 +344,4 @@ jobs: token: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_TOKEN }} payload: | channel: ${{ secrets.SLACK_BOUNDARY_TEST_BOT_CHANNEL_ID }} - text: ":warning: e2e tests passed, but needed retry (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.event.ref }}\n*SHA:* <${{ github.event.head_commit.url }}|${{ github.event.after }}>" - + text: ":warning: e2e tests passed, but needed retry (${{ matrix.filter }}): ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.repository }}:${{ github.head_ref || github.ref_name }}" diff --git a/Makefile b/Makefile index a0ad907fc2..69fe2301c4 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,11 @@ build: build-ui-ifne @echo "==> Building Boundary with UI features enabled" @CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" +.PHONY: build-no-ui +build-no-ui: + @echo "==> Building Boundary without UI features" + @CGO_ENABLED=$(CGO_ENABLED) BUILD_TAGS='$(BUILD_TAGS)' sh -c "'$(CURDIR)/scripts/build.sh'" + .PHONY: install install: export BOUNDARY_INSTALL_BINARY=1 install: build