-
Notifications
You must be signed in to change notification settings - Fork 123
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
ci: automate quic-network-simulator docker image build & push #1554
Conversation
.github/workflows/qns.yml
Outdated
|
||
on: | ||
push: | ||
branches: ["main", "docker"] # TODO: remove docker |
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.
branches: ["main", "docker"] # TODO: remove docker | |
branches: ["main"] |
To be removed before merge.
qns/Dockerfile
Outdated
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
ENV RUSTUP_HOME=/usr/local/rustup \ | |||
CARGO_HOME=/usr/local/cargo \ | |||
PATH=/usr/local/cargo/bin:$PATH \ | |||
RUST_VERSION=1.45.2 | |||
RUST_VERSION=1.70.0 |
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.
Same as version in check.yml
:
neqo/.github/workflows/check.yml
Line 20 in 6fb7a6c
rust-toolchain: [1.70.0, stable, beta] |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1554 +/- ##
=======================================
Coverage 86.52% 86.52%
=======================================
Files 117 117
Lines 38170 38170
=======================================
Hits 33025 33025
Misses 5145 5145 ☔ View full report in Codecov by Sentry. |
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 you think this could be made a "reusable workflow" contingent on the ubuntu-latest/1.70.0 run of the main CI succeeding?
Thank you for the quick review!
@larseggert can you expand on why a reusable workflow would be helpful here? Where would we be reusing this logic? For the sake of not pushing a faulty image, I have now made the Note that it does not depend on the matrix variant |
.github/workflows/check.yml
Outdated
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.
Given that this workflow goes beyond check
ing now, I suggest renaming the file to e.g. main.yml
. Thoughts?
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.
I would put your additions in a new file instead. Call it qns.yml
The conditions for this should be different. We want pushes to occur at most daily on main.
We should not build this for pull requests on the expectation that if tests pass, this build will work, so we don't need to run this process unless someone changes the qns.yml file or the Dockerfile (conditions you might add for a pull_request in that file).
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.
.github/workflows/check.yml
Outdated
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.
I would put your additions in a new file instead. Call it qns.yml
The conditions for this should be different. We want pushes to occur at most daily on main.
We should not build this for pull requests on the expectation that if tests pass, this build will work, so we don't need to run this process unless someone changes the qns.yml file or the Dockerfile (conditions you might add for a pull_request in that file).
.github/workflows/check.yml
Outdated
- name: Extract Rust version | ||
id: rust-version | ||
run: | | ||
RUST_VERSION=$(grep -m1 'rust-version' neqo-common/Cargo.toml | cut -d '"' -f 2) | ||
echo "::set-output name=version::$RUST_VERSION" |
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.
That's going to run this with our MSRV, rather than the latest. I would just run on stable.
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.
a98aa1e updates the workflow to use stable
.
qns/Dockerfile
Outdated
cp target/release/neqo-client target; \ | ||
cp target/release/neqo-server target; \ | ||
rm -rf target/release | ||
--bin neqo-client --bin neqo-server; |
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.
--bin neqo-client --bin neqo-server; | |
--bin neqo-client --bin neqo-server |
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.
👍 thanks for the catch! ae21e35
.github/workflows/check.yml
Outdated
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
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.
- name: Checkout | |
uses: actions/checkout@v3 |
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.
Cool. This was news to me.
qns/Dockerfile
Outdated
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=1.45.2 | ||
PATH=/usr/local/cargo/bin:$PATH | ||
|
||
RUN set -eux; \ | ||
curl -sSLf "https://static.rust-lang.org/rustup/archive/1.22.1/x86_64-unknown-linux-gnu/rustup-init" -o rustup-init; \ |
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 might be a good idea to update the version of rustup-init we use.
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.
👍 5d10ede
@@ -10,10 +10,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
&& apt-get autoremove -y && apt-get clean -y \ | |||
&& rm -rf /var/lib/apt/lists/* | |||
|
|||
ARG RUST_VERSION |
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.
I think that we can keep this change, but I would prefer if our builds use 'stable'.
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.
Thanks @martinthomson. Mind taking another look? |
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.
Let's give this a spin. We'll need to update the interop runner repo with the outcome.
|
Changes
ghcr.io/mozilla/neqo-qns
docker image on a daily schedule and test build on related pull requests.qns/update.sh
. Is this still needed?/neqo-reference
indirection inqns/Dockerfile
.Follow-ups
quic-interop/quic-interop
neqo image name.Fixes #1552