build(deps): bump the build group across 1 directory with 15 updates #384
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: {} | |
| # When a new revision is pushed to a PR, cancel all in-progress CI runs for that | |
| # PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GOLANGCI_VERSION: 2.4.0 | |
| jobs: | |
| prereqs: | |
| name: Prereqs | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: StyraOSS/styra-init-action@main | |
| lint: | |
| name: Analysis & Linting | |
| needs: prereqs | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install tools | |
| uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 | |
| with: | |
| version: v${{ env.GOLANGCI_VERSION }} | |
| args: --timeout=10m | |
| # Do a pre-flight check to ensure we don't bother with `buf` unless | |
| # we have protobuf changes present. | |
| - name: Check for proto/ file changes in git diffs. | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: changes | |
| with: | |
| filters: | | |
| proto: | |
| - 'proto/**' | |
| # Note(philip): We need to install the `buf` CLI before we can lint our protobuf sources. | |
| # The action uses the repo-scoped GITHUB_TOKEN to allow one of its dependencies (Octokit) | |
| # to skip Github API rate limits when fetching the latest buf build artifact. | |
| - uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 # v1.50.0 | |
| if: steps.changes.outputs.proto == 'true' && false | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1 | |
| if: steps.changes.outputs.proto == 'true' && false | |
| with: | |
| input: proto | |
| # Now that we've passed linting, we check to make sure the build artifacts are identical | |
| # to what was checked in. | |
| - name: Install protoc-gen-go dependencies | |
| if: steps.changes.outputs.proto == 'true' | |
| run: | | |
| go install google.golang.org/protobuf/cmd/[email protected] | |
| go install google.golang.org/grpc/cmd/[email protected] | |
| - name: Fail if `buf generate` diff detected between generated/checked in files | |
| if: steps.changes.outputs.proto == 'true' && false | |
| run: |- | |
| cd proto && buf generate | |
| if [[ "$(git diff --name-status | wc -l)" != 0 ]]; then | |
| echo "::error:: Files with diffs: $(git diff --name-status)" | |
| echo "::error:: Diffs are: $(git diff)" | |
| echo "::info:: If the diffs above include the protoc version number, consider reinstalling to get the latest protbuf/grpc tooling." | |
| exit 1 | |
| fi | |
| - name: Run Regal Lint | |
| run: regal lint --format github . | |
| check-license-headers: | |
| runs-on: ubuntu-24.04 | |
| needs: prereqs | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - id: eopa | |
| name: read versions | |
| run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: ${{ steps.eopa.outputs.go_version }} | |
| - name: Install addlicense | |
| run: go install github.com/google/addlicense@latest | |
| - name: Check license headers | |
| run: | | |
| addlicense -check \ | |
| -s=only \ | |
| -c "The OPA Authors" \ | |
| -ignore '**.md' -ignore '**/*.yaml' -ignore '**/*.yml' \ | |
| -ignore 'internal/**' \ | |
| -ignore 'pkg/internal/edittree/bitvector/**' \ | |
| . | |
| test: | |
| name: Test | |
| needs: prereqs | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| - uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # v2.3.0 | |
| - name: checkout EOPA | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| path: eopa | |
| persist-credentials: false | |
| - id: eopa | |
| name: read versions | |
| run: | | |
| echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
| echo "opa_version=v$(build/get-opa-version.sh)" >> $GITHUB_OUTPUT | |
| working-directory: eopa | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| cache-dependency-path: eopa/go.sum | |
| go-version: ${{ steps.eopa.outputs.go_version }} | |
| - name: checkout OPA | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| repository: open-policy-agent/opa | |
| ref: ${{ steps.eopa.outputs.opa_version }} | |
| path: opa | |
| persist-credentials: false | |
| - name: pick up opa directory | |
| id: opa | |
| working-directory: opa | |
| run: echo "dir=$(pwd)" >> $GITHUB_OUTPUT | |
| - run: make test | |
| working-directory: eopa | |
| env: | |
| OPA_ROOT: ${{ steps.opa.outputs.dir }} | |
| - run: make test-examples-sdk test-examples-rego | |
| working-directory: eopa | |
| - name: smoke test regal build | |
| run: | | |
| go mod tidy | |
| go build -o regal main.go | |
| working-directory: eopa/examples/regal | |
| test-e2e-prep-matrix: | |
| name: Test E2E Setup | |
| runs-on: ubuntu-24.04 | |
| needs: prereqs | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate the job matrix from test packages in the e2e folder | |
| id: set-matrix | |
| working-directory: e2e | |
| run: ../build/github-actions/gen-go-test-job-matrix.sh | |
| env: | |
| TAGS: e2e | |
| - uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # v2.3.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run go mod tidy | |
| working-directory: e2e | |
| run: go mod tidy | |
| - name: display go.sum diff | |
| working-directory: e2e | |
| run: | | |
| git diff --exit-code go.sum && exit 0 | |
| echo "# go.sum diff" >> $GITHUB_STEP_SUMMARY | |
| echo '```diff' >> $GITHUB_STEP_SUMMARY | |
| git diff go.sum >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| test-e2e-run-matrix: | |
| name: Test E2E - ${{ matrix.package }} | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - test-e2e-prep-matrix | |
| - goreleaser | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: ${{ fromJson(needs.test-e2e-prep-matrix.outputs.matrix) }} | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # v2.3.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download binary tarball | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: binary | |
| - name: EOPA binary | |
| id: eopa | |
| run: | | |
| echo "binary=$(pwd)/eopa" >> $GITHUB_OUTPUT | |
| pwd >> $GITHUB_PATH | |
| chmod +x eopa | |
| - name: Get EOPA version for e2e tests | |
| id: eopa-version | |
| run: | | |
| EOPA_VERSION=$(git describe --abbrev=0 --tags | sed s/^v//) | |
| echo "version=$EOPA_VERSION" >> $GITHUB_OUTPUT | |
| - name: Run go test for package | |
| run: | | |
| # Create a temporary file for stderr, then tee stderr to that file. | |
| STDERR_FILE=$(mktemp) | |
| go mod tidy | |
| # Temporarily disable error propagation | |
| set +e | |
| go test -p 1 --tags=e2e github.com/open-policy-agent/eopa/e2e/${{ matrix.package }} -v -count=1 2> >(tee "$STDERR_FILE" >&2) | |
| TEST_EXIT_CODE=$? | |
| # # Re-enable error propagation | |
| set -e | |
| # Check if stderr has the build constraints error message: | |
| if grep -q "build constraints exclude all Go files in" "$STDERR_FILE"; then | |
| # Cancel the workflow | |
| echo "::warning::Cancelling workflow because build constraints exclude all Go files. This will still report as a green Success marker" | |
| echo ":warning: Job cancelled: No Go files to test due to build constraints" >> $GITHUB_STEP_SUMMARY | |
| exit 0 | |
| else | |
| # Return the original exit code from go test | |
| exit $TEST_EXIT_CODE | |
| fi | |
| working-directory: e2e | |
| env: | |
| BINARY: ${{ steps.eopa.outputs.binary }} | |
| EOPA_VERSION: ${{ steps.eopa-version.outputs.version }} | |
| # credentials for data.git plugin | |
| GIT_GITHUB_TOKEN: ${{ secrets.E2E_GIT_GITHUB_TOKEN }} | |
| GIT_AZURE_TOKEN: ${{ secrets.E2E_GIT_AZURE_TOKEN }} | |
| GIT_GITLAB_TOKEN: ${{ secrets.E2E_GIT_GITLAB_TOKEN }} | |
| test-e2e-success: | |
| name: Test E2E | |
| runs-on: ubuntu-22.04 | |
| needs: | |
| - test-e2e-run-matrix | |
| steps: | |
| - run: echo "All E2E tests succeeded, or were skipped for a non-fatal reason." | |
| proto-docs-push: | |
| name: Push Protobuf docs to BSR | |
| needs: prereqs | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| # Do a pre-flight check to ensure we don't push up a BSR draft for | |
| # PRs that don't touch the protobuf files at all. | |
| - name: Check for proto/ file changes in git diffs. | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: changes | |
| with: | |
| filters: | | |
| proto: | |
| - 'proto/**' | |
| # Note(philip): We need to install the `buf` CLI before we can lint our protobuf sources. | |
| # The action uses the repo-scoped GITHUB_TOKEN to allow one of its dependencies (Octokit) | |
| # to skip Github API rate limits when fetching the latest buf build artifact. | |
| - uses: bufbuild/buf-setup-action@a47c93e0b1648d5651a065437926377d060baa99 # v1.50.0 | |
| if: steps.changes.outputs.proto == 'true' && false | |
| with: | |
| github_token: ${{ steps.generate_token.outputs.token }} | |
| - uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.2.0 | |
| if: steps.changes.outputs.proto == 'true' && false | |
| with: | |
| buf_token: ${{ secrets.BUF_TOKEN }} # TODO | |
| draft: true | |
| input: proto | |
| build: | |
| name: Ko Build | |
| needs: prereqs | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install tools | |
| uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup github api token | |
| run: git config --global url.https://git:[email protected]/.insteadOf https://github.com/ | |
| - name: Check for base image changes (apko.yaml, apko-debug.yaml) | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| id: changes | |
| with: | |
| filters: | | |
| apko: | |
| - 'apko*.yaml' | |
| - name: Prep ko | |
| run: echo "${{ github.token }}" | ko login ghcr.io --username "dummy" --password-stdin | |
| - name: Build images | |
| run: make build build-debug | |
| env: | |
| SKIP_IMAGES: false # TODO(sr) re-enable when we publish base images on merge | |
| KO_DOCKER_REPO: "ghcr.io/${{ github.repository_owner }}" | |
| - name: Upload image tarball | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: image | |
| path: local.tar | |
| - name: Upload debug image tarball | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: image-debug | |
| path: local-debug.tar | |
| goreleaser: | |
| name: Goreleaser build | |
| needs: prereqs | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # v2.3.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - id: go_version | |
| name: Read go version | |
| run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT | |
| - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: ${{ steps.go_version.outputs.go_version }} | |
| - name: Install GoReleaser | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| install-only: true | |
| - name: GoReleaser (single) | |
| run: make release-single | |
| env: | |
| HOSTNAME: github.actions.local | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload binary tarball | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: binary | |
| path: dist/linux-build_linux_amd64_v1/eopa | |
| smoke-docker: | |
| name: Smoke test docker images | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: install skopeo | |
| uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 # v2.1.0 | |
| with: | |
| repo: lework/skopeo-binary | |
| extension-matching: disable | |
| tag: v1.16.0 | |
| cache: enable | |
| rename-to: skopeo | |
| chmod: 0755 | |
| - name: Download image tarball | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: image | |
| - name: Download debug image tarball | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: image-debug | |
| - name: load images | |
| run: | | |
| skopeo copy docker-archive:local.tar docker-daemon:ko.local/eopa:edge | |
| skopeo copy docker-archive:local-debug.tar docker-daemon:ko.local/eopa:edge-debug | |
| - name: docker build based on image | |
| run: | | |
| docker build -t test . | |
| docker run test eopa version | |
| working-directory: e2e/docker | |
| smoke-caps: | |
| name: Smoke Test Capabilities | |
| runs-on: ubuntu-24.04 | |
| needs: goreleaser | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Download binary tarball | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: binary | |
| - uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # version doesn't matter, latest is fine v2 | |
| with: | |
| version: "1.0.0" | |
| - name: build bundle with OPA | |
| run: | | |
| chmod +x ./eopa | |
| ./eopa capabilities --current > eopa-capabilities.json | |
| opa build --capabilities eopa-capabilities.json test/cli/smoke/ | |
| smoke-cli: | |
| name: Smoke Test CLI | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Download image tarball | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: image | |
| - name: EOPA image | |
| id: eopa | |
| run: echo "image=$(docker load --quiet --input local.tar | awk '{print $3}')" >> $GITHUB_OUTPUT | |
| - run: make test | |
| working-directory: e2e/cli | |
| env: | |
| IMAGE: ${{ steps.eopa.outputs.image }} | |
| # performance-related: | |
| # name: Performance | |
| # needs: prereqs | |
| # runs-on: ubuntu-24.04 | |
| # steps: | |
| # - name: Tune GitHub-hosted runner network | |
| # uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| # - name: Free disk space | |
| # run: | | |
| # df -h | |
| # sudo rm -rf /usr/share/dotnet | |
| # sudo rm -rf /opt/ghc | |
| # sudo rm -rf "/usr/local/share/boost" | |
| # sudo apt clean | |
| # docker image ls -aq | xargs -r docker rmi | |
| # df -h | |
| # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| # with: | |
| # path: eopa | |
| # - id: go_version | |
| # name: Read go version | |
| # run: echo "go_version=1.23.6" >> $GITHUB_OUTPUT | |
| # working-directory: eopa | |
| # # benchmark, gobenchdata | |
| # - run: make benchmark | |
| # working-directory: eopa | |
| # - name: gobenchdata check | |
| # if: ${{ github.ref != 'refs/heads/main' && github.actor != 'dependabot[bot]' }} | |
| # run: go run go.bobheadxi.dev/gobenchdata@v1 action | |
| # env: | |
| # INPUT_GO_TEST_FLAGS: -timeout=10m | |
| # INPUT_GO_TEST_PKGS: ./pkg/... | |
| # INPUT_SUBDIRECTORY: eopa | |
| # INPUT_CHECKS: true | |
| # INPUT_CHECKS_CONFIG: eopa/gobenchdata-checks.yml | |
| # INPUT_PUBLISH_BRANCH: benchmarks | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # timeout-minutes: 20 | |
| cross-build: | |
| runs-on: ubuntu-24.04 | |
| needs: prereqs | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| GOOS: | |
| - windows | |
| - linux | |
| GOARCH: | |
| - amd64 | |
| include: | |
| - GOOS: darwin | |
| GOARCH: arm64 | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| - name: Check out code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install tools | |
| uses: jdx/mise-action@e3d7b8d67a7958d1207f6ed871e83b1ea780e7b0 # v3.3.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: bb build/cross-build | |
| env: | |
| OUTPUTDIR: bins/ | |
| RELEASE: true | |
| GOOS: ${{ matrix.GOOS }} | |
| GOARCH: ${{ matrix.GOARCH }} | |
| - name: Upload cross-build binaries | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: cross-binaries-${{ matrix.GOOS }}-${{ matrix.GOARCH }} | |
| path: bins | |
| cross-test-releases: | |
| name: Cross Test Releases | |
| runs-on: ${{ matrix.os }} | |
| needs: cross-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| GOOS: linux | |
| GOARCH: amd64 | |
| - os: macos-latest | |
| GOOS: darwin | |
| GOARCH: arm64 | |
| - os: windows-latest | |
| GOOS: windows | |
| GOARCH: amd64 | |
| steps: | |
| - name: Tune GitHub-hosted runner network | |
| uses: smorimoto/tune-github-hosted-runner-network@bb252dcb5c8609a31087e7993daa086f5a1c0069 # v1.0.0 | |
| if: matrix.os != 'windows-latest' | |
| - run: | | |
| netsh int ipv4 show dynamicport tcp | |
| netsh int ipv4 show excludedportrange protocol=tcp | |
| if: matrix.os == 'windows-latest' | |
| - name: Free disk space | |
| run: | | |
| df -h | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf "/usr/local/share/boost" | |
| sudo apt clean | |
| docker image ls -aq | xargs -r docker rmi | |
| df -h | |
| if: matrix.os == 'ubuntu-24.04' | |
| - name: Download cross-build binaries | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: cross-binaries-${{ matrix.GOOS }}-${{ matrix.GOARCH }} | |
| path: bins | |
| - uses: turtlequeue/setup-babashka@2d4df498c7a578b4f3e906283f9af913590bdec7 # v1.7.0 | |
| # NOTE(sr): mise-install doesn't work reliably on windows, it seems. This action worked well before. | |
| with: | |
| babashka-version: 1.12.197 | |
| - run: bb bins/cross-run |