-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updating ci pipeline #67
Conversation
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the two OS matrix for releasing? We don't need it to run for both right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those should be the 2 os more used, and 22 builds won't work on 20 and viceversa. If you think that releasing for 22 only is best, it's an easy fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yes that makes sense for us to publish two. @febo and I reviewed it more closely and had some questions on how it works.
run: | | ||
cargo publish -p plerkle_serialization --token $CARGO_TOKEN --no-verify || true | ||
sleep 30 | ||
cargo publish -p plerkle_messenger --token $CARGO_TOKEN --no-verify || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need these crate publishes I believe, and I don't see them in the new code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back those lines
jobs: | ||
release-stable: | ||
runs-on: buildjet-8vcpu-ubuntu-2004 | ||
build20: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the build20
job now has a "matrix" strategy, would this run twice (one for each OS) and therefore create 2 releases? Not sure if this is intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be done on both ways, that's a thing you may decide, I can publish to one release, and rename things (that's the current workflow). Or I can publish to two different releses in the same workflow.
We can even run the workflows separatedly, but will duplicate the code.
- name: Build plerkle plugin | ||
run: cargo build --verbose --release | ||
|
||
- name: Package libplerkle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to run for both OS, while the next one only runs for ubuntu-22.04
. Wonder if this is missing an if
statement. Also, related to the "matrix" strategy, we might need just one of these, since it will run the whole job twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of the job running in a matrix, is that it will execute the same code in each runner, but additionally, you can add task that will execute with the if statement, in a specific runner.
If you want to run the job only once, you need to define a single os version for the release.
Or you can have different releases in different jobs, or even files.
The way it's implemented here you have less duplicated code.
working-directory: target/release | ||
run: tar -cvjf plerkle2222-x86_64-unknown-linux-gnu.tar.bz2 libplerkle.so | ||
|
||
- name: Publish to release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably will create 2 releases, one per OS. Perhaps this should move to a separate job that runs just once (without the "matrix" strategy) and uses the binaries built on the previous job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should create a single release, with both binaries.
If it's clearer, or the wildcard doesn't resolve correctly, we can do 2 publish to release actions, with if statement, so each os version publish the specific artifact. This can publish to the same release or to two completely different ones.
Closing this as I think we have the pipeline fine now and this PR is old now. But in general, thank you for all your contributions and all the other PRs!!! |
This pr updates the ci pipeline to test and release using github workers for ubuntu 20 and 22.
Trgigers may be adjusted to something else that make more sense to the intended workflow.