Skip to content

Comments

feat: automate adding new go-libp2p versions to perf#256

Merged
galargh merged 2 commits intomasterfrom
ci/go
Sep 2, 2023
Merged

feat: automate adding new go-libp2p versions to perf#256
galargh merged 2 commits intomasterfrom
ci/go

Conversation

@galargh
Copy link
Member

@galargh galargh commented Aug 11, 2023

This PR implements the process described here: libp2p/go-libp2p#2442 (comment)

Additionally:

  • it finds the latest go-libp2p version itself
  • updates Go in the go.mod file to the latest stable version

Automatically created PR: #255
Automatically triggered perf run: https://github.com/libp2p/test-plans/actions/runs/5836370405

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work @galargh! Thank you!!

id: remote
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh api repos/$REPO/releases/latest --jq '.tag_name' | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered using go list -m -versions github.com/libp2p/go-libp2p@latest?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, didn't know about this one. If you prefer, this should behave the same.

Suggested change
run: gh api repos/$REPO/releases/latest --jq '.tag_name' | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT
run: go list -m github.com/$REPO@latest | cut -d' ' -f2 | xargs -I{} echo "version={}" | tee -a $GITHUB_OUTPUT

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Piotr! Ready to merge from my end.

clean:
rm perf
rm .cache
rm v0.28
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is created when one runs go build .. That said, fine to remove it.

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
gh workflow run perf.yml --ref $BRANCH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@galargh galargh marked this pull request as ready for review August 16, 2023 09:54
@BigLep
Copy link
Contributor

BigLep commented Aug 21, 2023

Sweet! What's needed to merge this?
@mxinden : will you create something similar for rust-libp2p and js-libp2p?

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge from my end.

@mxinden
Copy link
Member

mxinden commented Sep 1, 2023

@mxinden : will you create something similar for rust-libp2p and js-libp2p?

Ideally. That said, it is not high on my priority list. E.g. I am prioritizing #261

@galargh galargh merged commit 2980863 into master Sep 2, 2023
@galargh galargh deleted the ci/go branch September 2, 2023 08:16
codemaestro64 pushed a commit to codemaestro64/test-plans that referenced this pull request Oct 28, 2025
* feat: automate adding new go-libp2p versions to perf

* fix: put add-new-impl-versions.yml on schedule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants