From aaa2e51e225f28dd49855a6b7e992450e9bba8d1 Mon Sep 17 00:00:00 2001 From: satoshiotomakan <127754187+satoshiotomakan@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:58:02 +0700 Subject: [PATCH] [Chore]: Linux CI upgrade to Ubuntu 24.04 (#4062) * Fix Linux CI * Try to install any libc and libstd versions * Try to use `mjp41/workaround8649` package * Try to use `mjp41/workaround8649` package * Use ubuntu-22.04 * Try to disable the temporary fix for ubuntu-latest * Downgrade lcov to 1.15 * Downgrade lcov to 1.15-1 * Downgrade lcov to 1.15-1 * Disable derive_function_end_line setting * Install lcov 1.15-1 manually * Install lcov 1.15-1 manually * Install lcov 1.15-1 manually * Install lcov 1.15-1 manually * Minor changes * [CI] Trigger CI * Update emsdk to 3.1.33 * Install gcc-multilib * Revert wasm-ci.yml --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/linux-sampleapp-ci.yml | 2 +- codegen/lib/code_generator.rb | 2 +- tools/install-sys-dependencies-linux | 28 ++++++++---------------- tools/install-wasm-dependencies | 2 +- 5 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 653fbf0c135..89424cd4081 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - name: Install system dependencies run: | - tools/install-sys-dependencies-linux ci + tools/install-sys-dependencies-linux tools/install-rust-dependencies - name: Cache internal dependencies id: internal_cache diff --git a/.github/workflows/linux-sampleapp-ci.yml b/.github/workflows/linux-sampleapp-ci.yml index da1aa11656b..e67011507cd 100644 --- a/.github/workflows/linux-sampleapp-ci.yml +++ b/.github/workflows/linux-sampleapp-ci.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - name: Install system dependencies run: | - tools/install-sys-dependencies-linux ci + tools/install-sys-dependencies-linux tools/install-rust-dependencies - name: Cache internal dependencies id: internal_cache diff --git a/codegen/lib/code_generator.rb b/codegen/lib/code_generator.rb index 087a75b34c2..d1fcf3881af 100644 --- a/codegen/lib/code_generator.rb +++ b/codegen/lib/code_generator.rb @@ -136,7 +136,7 @@ def render_kotlin_jni_c def render(file, locals = {}) @locals = locals path = File.expand_path(file, File.join(File.dirname(__FILE__), 'templates')) - template = ERB.new(File.read(path), nil, '-') + template = ERB.new(File.read(path), trim_mode: '-') template.result(binding) end diff --git a/tools/install-sys-dependencies-linux b/tools/install-sys-dependencies-linux index 2f1e7db8e44..3a2c786eff9 100755 --- a/tools/install-sys-dependencies-linux +++ b/tools/install-sys-dependencies-linux @@ -2,23 +2,13 @@ set -e -# Downgrade libc to temporarily fix https://github.com/actions/runner-images/issues/8659 -if [[ "$1" == "ci" ]]; then - LIBSTD_PACKAGE_VERSION="12.3.0-1ubuntu1~22.04" - # Bump this version if the CI has been broken due to the packages update. - LIBC_PACKAGE_VERSION="2.35-0ubuntu3.8" - - echo "Remove GCC 13 from runner image - runner-images/8659 workaround" - echo "NOTE: Bump $LIBC_PACKAGE_VERSION version if the CI has been broken due to the packages update" - - sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list - sudo apt-get update - sudo apt-get install -y --allow-downgrades \ - libc6=$LIBC_PACKAGE_VERSION \ - libc6-dev=$LIBC_PACKAGE_VERSION \ - libstdc++6=$LIBSTD_PACKAGE_VERSION \ - libgcc-s1=$LIBSTD_PACKAGE_VERSION -fi - # build-essential clang-14 libc++-dev libc++abi-dev ruby-full cmake -sudo apt-get update && sudo apt-get install ninja-build lcov llvm-14 clang-tidy-14 libboost-all-dev rustc --fix-missing +sudo apt-get update && sudo apt-get install ninja-build llvm-14 clang-tidy-14 libboost-all-dev rustc --fix-missing gcc-multilib g++-multilib + +# As of now, Ubuntu 24.04 has lcov 2.0-4ubuntu2 only, but we don't support it yet. +# Install lcov 1.15-1 manually. +LCOV_TEMP="$(mktemp -d)" +LCOV_DEB="$LCOV_TEMP/lcov.deb" +wget -O "$LCOV_DEB" http://mirrors.kernel.org/ubuntu/pool/universe/l/lcov/lcov_1.15-1_all.deb +sudo apt-get install "$LCOV_DEB" +rm -rf $LCOV_TEMP diff --git a/tools/install-wasm-dependencies b/tools/install-wasm-dependencies index 31fc852b850..d19611616ce 100755 --- a/tools/install-wasm-dependencies +++ b/tools/install-wasm-dependencies @@ -2,7 +2,7 @@ set -e -emsdk_version=3.1.30 +emsdk_version=3.1.33 git clone https://github.com/emscripten-core/emsdk.git