Conversation
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
0ddf0fe to
d169ac1
Compare
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
d169ac1 to
2bdec3c
Compare
Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Ubuntu Noble (24.04) as a container environment for the CI system. The change updates the CI infrastructure to use Noble instead of Jammy (22.04) as the base Ubuntu version for building and testing.
Key changes:
- Add a new Noble container preparation script with updated package versions
- Update CI workflows to use Ubuntu 24.04 runners and Noble containers
- Upgrade compiler versions from gcc-10/gfortran-11 to gcc-14/gfortran-14
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/prepare-container-noble.sh | New container setup script for Ubuntu Noble with updated package versions |
| Dockerfile-noble | New Dockerfile for building Noble-based container image |
| .github/workflows/container.yaml | Add Noble container build workflow and update tag management |
| .github/workflows/CI.yaml | Update CI to use Ubuntu 24.04 runners and gcc-14/gfortran-14 |
| scripts/indent.sh | Fix typo and update indent arguments |
| scripts/ci-clang-16-gfortran-14-*.sh | Update Fortran compiler from gfortran-11 to gfortran-14 |
| if (( check_only == 0 )); then | ||
| mv "${file}" "${file}.backup" | ||
| bashat "${file}.backup" > "${file}" | ||
| bashate "${file}.backup" > "${file}" |
There was a problem hiding this comment.
Fixed typo: 'bashat' was corrected to 'bashate'
| bashate "${file}.backup" > "${file}" | |
| # If you want to auto-format, use shfmt. Otherwise, just keep the backup. | |
| # shfmt -w "${file}.backup" | |
| mv "${file}.backup" "${file}" |
| deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main | ||
| # deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main | ||
| EOF | ||
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | ${SUDO} tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc |
There was a problem hiding this comment.
Consider verifying the GPG key fingerprint before adding it to the trusted keyring to prevent potential man-in-the-middle attacks
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | ${SUDO} tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
| # Download the LLVM GPG key to a temporary file | |
| LLVM_GPG_KEY_URL="https://apt.llvm.org/llvm-snapshot.gpg.key" | |
| LLVM_GPG_KEY_FP="F6B0FC61" # Replace with the actual expected fingerprint (last 8 chars) | |
| TMP_KEY_FILE=$(mktemp) | |
| wget -qO "${TMP_KEY_FILE}" "${LLVM_GPG_KEY_URL}" | |
| # Check the fingerprint | |
| ACTUAL_FP=$(gpg --with-fingerprint --show-keys "${TMP_KEY_FILE}" | grep -Eo '([A-F0-9]{8})$' | head -n1) | |
| if [ "${ACTUAL_FP}" != "${LLVM_GPG_KEY_FP}" ]; then | |
| echo "ERROR: LLVM GPG key fingerprint mismatch! Expected: ${LLVM_GPG_KEY_FP}, Got: ${ACTUAL_FP}" | |
| rm -f "${TMP_KEY_FILE}" | |
| exit 1 | |
| fi | |
| # Add the key to the trusted keyring | |
| cat "${TMP_KEY_FILE}" | ${SUDO} tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null | |
| rm -f "${TMP_KEY_FILE}" |
| # deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu noble main | ||
| EOF | ||
| gpg --keyserver keyserver.ubuntu.com \ | ||
| --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F |
There was a problem hiding this comment.
Consider verifying the GPG key fingerprint (60C317803A41BA51845E371A1E9377A2BA9EF27F) before adding it to the trusted keyring to prevent potential key substitution attacks
| --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F | |
| --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F | |
| # Verify the GPG key fingerprint before trusting | |
| FINGERPRINT=$(gpg --fingerprint 60C317803A41BA51845E371A1E9377A2BA9EF27F | grep -A1 'pub' | tail -n1 | tr -d ' ') | |
| EXPECTED_FINGERPRINT="60C317803A41BA51845E371A1E9377A2BA9EF27F" | |
| if [ "${FINGERPRINT}" != "${EXPECTED_FINGERPRINT}" ]; then | |
| echo "ERROR: GPG key fingerprint does not match expected value!" | |
| exit 1 | |
| fi |
Signed-off-by: Nicolas Bock nicolasbock@gmail.com