Skip to content

Commit

Permalink
fix: how new go-libp2p versions are added to perf
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Sep 4, 2023
1 parent 2980863 commit bbd5163
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/add-new-impl-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
uses: actions/checkout@v3
- name: Configure git
run: |
git fetch $BRANCH && git checkout $BRANCH && git rebase $GITHUB_REF -X theirs || git checkout -b $BRANCH
git fetch origin $BRANCH && git checkout $BRANCH || git checkout -b $BRANCH
git rebase $GITHUB_REF -X theirs || git rebase --abort
git config --global user.email $GITHUB_ACTOR@users.noreply.github.com
git config --global user.name $GITHUB_ACTOR
- id: go
Expand Down Expand Up @@ -62,6 +63,9 @@ jobs:
git add .
git commit -m "chore: add go-libp2p@$REMOTE_VERSION to $DIR"
git push origin $BRANCH --force
gh pr create --title "chore: add go-libp2p@$REMOTE_VERSION to $DIR" --body "This PR adds go-libp2p@$REMOTE_VERSION to $DIR" --head $BRANCH --base $GITHUB_REF
# create a PR if an open one doesn't exist yet
if [[ $(gh pr list --state open --base $GITHUB_REF --head $BRANCH | wc -l) -eq 0 ]]; then
gh pr create --title "chore: add go-libp2p@$REMOTE_VERSION to $DIR" --body "This PR adds go-libp2p@$REMOTE_VERSION to $DIR" --head $BRANCH --base $GITHUB_REF
fi
gh workflow run perf.yml --ref $BRANCH
working-directory: ${{ env.DIR }}
1 change: 0 additions & 1 deletion perf/impl/go-libp2p/v0.29/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
perf
.cache
v0.29
14 changes: 0 additions & 14 deletions perf/impl/go-libp2p/v0.29/Dockerfile

This file was deleted.

3 changes: 1 addition & 2 deletions perf/impl/go-libp2p/v0.29/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ GO_FILES := $(wildcard *.go)
all: perf

perf: $(GO_FILES)
docker run --rm --user "$(shell id -u):$(shell id -g)" -v "$(shell pwd)":/usr/src/myapp -w /usr/src/myapp -e GOCACHE=/usr/src/myapp/.cache golang:1.20 go build -o perf .
docker run --rm --user "$(shell id -u):$(shell id -g)" -v "$(shell pwd)":/usr/src/myapp -w /usr/src/myapp -e GOCACHE=/usr/src/myapp/.cache golang:$(shell awk '/^go [0-9]+\.[0-9]+$$/ {print $$2}' go.mod) go build -o perf .

clean:
rm v0.29
rm -r .cache
rm perf

Expand Down

0 comments on commit bbd5163

Please sign in to comment.