-
Notifications
You must be signed in to change notification settings - Fork 30
Add earliest and latest compilers #118
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
Conversation
Test jobs on OpenCI:
Test jobs on internal CI: |
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.
A few minor change requests.
The test results look good, but we'll have to re-run at least some after updating the docker files.
rm -rf /var/lib/apt/lists/ | ||
rm -rf /var/lib/apt/lists/ && \ | ||
# create symbolic links for earliest gcc and clang versions | ||
ln -s /usr/bin/gcc-4.7 /usr/bin/gcc-earliest && \ |
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.
Please create the symlinks in /usr/local/bin
. /usr
is for what comes with the distribution. Also applies in the 22.04 dockerfile.
|
||
RUN apt-get update -q && apt-get install -yq \ | ||
# provides some useful scripts for adding and removing repositories | ||
software-properties-common && \ |
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.
Please group all the installations from the standard repository in the same batch. It makes the file easier to read and the caching of intermediate steps more efficient.
apt-get install -yq \ | ||
# to build Mbed TLS using latest clang version | ||
clang-16 \ | ||
# to build Mbed TLS using latest gcc 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.
More precisely, latest gcc version available from Ubuntu.
# add an apt package source from https://apt.llvm.org/ to install clang-16 | ||
add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' -y && \ | ||
apt-get install -yq \ | ||
# to build Mbed TLS using latest clang 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.
More precisely, the latest clang version at the time of writing. (As opposed to: at the time the docker image is built, or at the time the tests run.)
This commit updates the Ubuntu 16.04 dockerfile to include the earliest versions of GCC (4.7) and Clang (3.5) available in 16.04. For Ubuntu 22.04 the latest compiler versions of GCC (12) and Clang (16) are installed. Also creates couple of symlinks of those compilers for simplified usage in the all.sh. Signed-off-by: Gowtham Suresh Kumar <[email protected]>
Signed-off-by: Gowtham Suresh Kumar <[email protected]>
bd7c707
to
2c78a19
Compare
Test jobs on OpenCI: development → PASS Test jobs on internal CI: use_earliest_latest_compilers → PASS |
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.
LGTM
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.
Just a few readability issues
# to build Mbed TLS with MBEDTLS_ZILIB_SUPPORT (removed in 3.0) | ||
zlib1g-dev \ | ||
# to build Mbed TLS using latest gcc version available from Ubuntu | ||
gcc-12 \ |
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.
Please keep the list in alphabetical order, it makes it easier to eyeball what's in there.
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.
Will fix it.
# For installing clang-16, we add the llvm package source and add corresponding key | ||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 15CF4D18AF4F7421 \ | ||
# add an apt package source from https://apt.llvm.org/ | ||
&& add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' -y \ |
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.
Please be consistent about putting &&
at the end or beginning of the line. In this file the convention is end of line.
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.
Will change it.
|
||
# For installing clang-16, we add the llvm package source and add corresponding key | ||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 15CF4D18AF4F7421 \ | ||
# add an apt package source from https://apt.llvm.org/ |
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.
Please use more indentation when continuing arguments of a command than when starting a new command after &&
. Following the established pattern, this line should be intended to 4 spaces, and the list of arguments to apt-get install
should be intented to 8 spaces.
Note: in the future, please address review comments in new commits, rather than by pushing a new history, unless there's a good reason to overwrite the existing history. |
Signed-off-by: Gowtham Suresh Kumar <[email protected]>
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.
Looks good to me on code review. I'll check the CI logs when it's run on the latest release (no need to re-run all jobs, but at least build the image on both jenkins instances).
Thanks for the review :) |
Triggered. |
Both internal and external CI runs are green :) |
This commit updates the Ubuntu 16.04 docker file to include the earliest versions of GCC (4.7) and Clang (3.5) available in 16.04. For Ubuntu 22.04 the latest compiler versions of GCC (12) and Clang (16) are installed.
Also creates couple of symlinks of those compilers for simplified usage in the all.sh script.
all.sh
will start using the new compiler versions in Mbed-TLS/mbedtls#7968 and Mbed-TLS/mbedtls#7969.Resolves #110