Skip to content

Commit

Permalink
/{.github,go}: try fixing pgo build binaries, add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeegoddd committed Feb 15, 2024
1 parent 76661f9 commit af0e155
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/test-pgo-worflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
workflow_dispatch:

jobs:
test-pgo-workflow:
runs-on: ubuntu-22.04
steps:
- name: Trigger PGO build
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: pgo-release
client-payload: '{"version": "1.34.0", "server": "dolt", "bucket": "performance-benchmarking-github-actions-results", "actor": "coffeegoddd", "actor_email": "[email protected]", "profile_key": "2024/02/15/release/coffeegoddd/coffeegoddd-1.34.0-1708026697749950412/__DOLT__/cpu.pprof"}'
7 changes: 3 additions & 4 deletions go/utils/publishrelease/buildpgobinaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ cd $script_dir/../..

[ ! -z "$GO_BUILD_VERSION" ] || (echo "Must supply GO_BUILD_VERSION"; exit 1)

cmd='docker run --rm -v '`pwd`':/src -v golang:'"$GO_BUILD_VERSION"'-bookworm /bin/bash -c'
build_cmd='go build'

profile=""
if [ -n "$PROFILE" ]; then
echo "Building PGO binaries"
cmd='docker run --rm -v '`pwd`':/src -v '"$PROFILE"':/cpu.pprof golang:'"$GO_BUILD_VERSION"'-bookworm /bin/bash -c'
profile='-v '"$PROFILE"':/cpu.pprof'
build_cmd='go build -pgo=/cpu.pprof'
fi

eval "$cmd" '
docker run --rm -v `pwd`:/src "$profile" golang:"$GO_BUILD_VERSION"-bookworm /bin/bash -c '
set -e
set -o pipefail
apt-get update && apt-get install -y p7zip-full pigz
Expand Down

0 comments on commit af0e155

Please sign in to comment.