From db3eee53a3a1fc9d60bebae448cc6c07ea6d0e6a Mon Sep 17 00:00:00 2001 From: Hu Yueh-Wei Date: Tue, 7 Jan 2025 19:15:34 +0800 Subject: [PATCH] chore: remove ubuntu 18.04 support --- .github/workflows/build_docker.yml | 3 - .github/workflows/build_linux_ubuntu1804.yml | 122 ------------------ docs/ten_framework/preparation.md | 14 +- .../ubuntu/18.04/Dockerfile | 121 ----------------- 4 files changed, 3 insertions(+), 257 deletions(-) delete mode 100644 .github/workflows/build_linux_ubuntu1804.yml delete mode 100644 tools/docker_for_building/ubuntu/18.04/Dockerfile diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 2d6f616cb6..dc867d92eb 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -19,9 +19,6 @@ jobs: - image_name: "ubuntu2204" workdir: "tools/docker_for_building/ubuntu/22.04" platforms: linux/amd64,linux/arm64 - - image_name: "ubuntu1804" - workdir: "tools/docker_for_building/ubuntu/18.04" - platforms: linux/amd64 runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/build_linux_ubuntu1804.yml b/.github/workflows/build_linux_ubuntu1804.yml deleted file mode 100644 index ee391ded40..0000000000 --- a/.github/workflows/build_linux_ubuntu1804.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: Build - linux ubuntu1804 - -on: - release: - types: [created] - pull_request: - types: [opened, synchronize, reopened] - paths-ignore: - - "tools/**" - - "docs/**" - - ".vscode/**" - - ".devcontainer/**" - - ".github/**" - - "!.github/workflows/build_linux_ubuntu1804.yml" - - "**.md" - -jobs: - build-linux-ubuntu1804: - concurrency: - group: build-linux-ubuntu1804-${{ github.head_ref }}-${{ matrix.build_type }} - cancel-in-progress: true - runs-on: ubuntu-22.04 - strategy: - matrix: - build_type: [release] - container: - image: ghcr.io/ten-framework/ten_building_ubuntu1804 - steps: - - name: Configure Git - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Manual Checkout Repository - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global --add safe.directory $(pwd) - git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git . - git checkout ${{ github.event.pull_request.head.sha }} - git submodule update --init --recursive - - - name: Update version - run: | - git config --global --add safe.directory $(pwd) - python3 tools/version/update_version_in_ten_framework.py - python3 tools/version/check_version_in_ten_framework.py - - - name: Build - run: | - export PATH=$(pwd)/core/ten_gn/:$PATH - echo $PATH - go env -w GOFLAGS="-buildvcs=false" - rustup default nightly - df -h . - tgn gen linux x64 ${{ matrix.build_type }} -- is_clang=false log_level=1 enable_serialized_actions=true ten_enable_serialized_rust_action=true ten_enable_integration_tests=false ten_enable_ten_manager=false ten_rust_enable_gen_cargo_config=false ten_enable_cargo_clean=true ten_enable_rust_incremental_build=false ten_manager_enable_frontend=false ten_enable_integration_tests_prebuilt=false ten_enable_nodejs_binding=false - tgn build linux x64 ${{ matrix.build_type }} - df -h . - tree -I 'gen|obj' out - - - name: Run Tests (ten_utils_unit_test) - env: - ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1 - MALLOC_CHECK_: 3 - TEN_ENABLE_MEMORY_TRACKING: "true" - TEN_ENABLE_BACKTRACE_DUMP: "true" - run: | - chmod +x out/linux/x64/tests/standalone/ten_utils_unit_test - out/linux/x64/tests/standalone/ten_utils_unit_test || { echo "test failed"; exit 1; } - - - name: Run Tests (ten_runtime_unit_test) - env: - ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1 - MALLOC_CHECK_: 3 - TEN_ENABLE_MEMORY_TRACKING: "true" - TEN_ENABLE_BACKTRACE_DUMP: "true" - run: | - chmod +x out/linux/x64/tests/standalone/ten_runtime_unit_test - out/linux/x64/tests/standalone/ten_runtime_unit_test || { echo "test failed"; exit 1; } - - - name: Run Tests (ten_runtime_smoke_test) - env: - ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1 - MALLOC_CHECK_: 3 - TEN_ENABLE_MEMORY_TRACKING: "true" - TEN_ENABLE_BACKTRACE_DUMP: "true" - run: | - chmod +x out/linux/x64/tests/standalone/ten_runtime_smoke_test - out/linux/x64/tests/standalone/ten_runtime_smoke_test || { echo "test failed"; exit 1; } - - - name: Run Tests (ten_rust standalone tests) - env: - ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1:color=always:unmap_shadow_on_exit=1:abort_on_error=1 - MALLOC_CHECK_: 3 - TEN_ENABLE_MEMORY_TRACKING: "true" - TEN_ENABLE_BACKTRACE_DUMP: "true" - run: | - cd out/linux/x64/tests/standalone/ten_rust - - chmod +x unit_test - chmod +x integration_test - - ./unit_test || { echo "ten_rust unit test failed"; exit 1; } - ./integration_test || { echo "ten_rust integration test failed"; exit 1; } - - - name: Install jq - if: startsWith(github.ref, 'refs/tags/') - run: apt-get update && apt-get install -y jq - - - name: Package assets - if: startsWith(github.ref, 'refs/tags/') - run: | - cd out/linux/x64 - zip -vr ten_packages-linux-ubuntu1804-x64-gcc-${{ matrix.build_type }}.zip \ - ten_packages/system/ten_runtime \ - ten_packages/system/ten_runtime_go \ - ten_packages/system/ten_runtime_python \ - ten_packages/extension/default_extension_cpp \ - ten_packages/extension/default_extension_go \ - ten_packages/extension/default_extension_python \ - ten_packages/extension/default_async_extension_python \ - ten_packages/addon_loader/python_addon_loader diff --git a/docs/ten_framework/preparation.md b/docs/ten_framework/preparation.md index 08fdb04d01..dc4d178612 100644 --- a/docs/ten_framework/preparation.md +++ b/docs/ten_framework/preparation.md @@ -71,19 +71,11 @@ The TEN framework uses `ten_gn` as its build system. `ten_gn` is a build system We provide pre-written Docker files that allow you to create a container with all the necessary packages required to build the TEN framework from source. -### Ubuntu 18.04 +### Ubuntu 22.04 -Navigate to `tools/docker_for_building/ubuntu/18.04` and run the following commands to create and enter the build environment. +Navigate to `tools/docker_for_building/ubuntu/22.04` and run the following commands to create and enter the build environment. ```shell docker-compose up -d -docker-compose run ten-building-ubuntu-1804 -``` - -### Ubuntu 21.10 - -Follow the same steps as for Ubuntu 18.04, but use the following command to enter the Ubuntu 21.10 build container. - -```shell -docker-compose run ten-building-ubuntu-2110 +docker-compose run ten-building-ubuntu-2204 ``` diff --git a/tools/docker_for_building/ubuntu/18.04/Dockerfile b/tools/docker_for_building/ubuntu/18.04/Dockerfile deleted file mode 100644 index 748bd91857..0000000000 --- a/tools/docker_for_building/ubuntu/18.04/Dockerfile +++ /dev/null @@ -1,121 +0,0 @@ -FROM ubuntu:18.04 - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get clean && \ - apt-get update && \ - apt-get install -y --no-install-recommends apt-utils software-properties-common && \ - add-apt-repository ppa:git-core/ppa && \ - apt-get update && \ - apt-get install -y --no-install-recommends curl \ - lsb-release \ - iwyu \ - libssl-dev \ - p7zip-full \ - p7zip-rar \ - git \ - tree \ - zip \ - unzip \ - libasan5 \ - autoconf \ - libtool \ - uuid-dev \ - libmsgpack-dev \ - libmysqlclient-dev \ - libmysqlcppconn-dev \ - libcrypto++-dev \ - libexpat1-dev \ - libxdamage1 \ - make \ - vim \ - libxcomposite-dev \ - libdrm-dev \ - libavformat-dev \ - libavfilter-dev \ - libx264-dev \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - libgdbm-dev \ - libnss3-dev \ - libssl-dev \ - libreadline-dev \ - libffi-dev \ - wget \ - gpg-agent - -# ======================================= -# Installing cmake -# -# The default version of cmake of Ubuntu 18.04 is 3.10, but TEN needs cmake version greater than 3.14, so we need to install it from cmake official site. - -RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \ - && apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" \ - && apt-get update \ - && apt-get install -y --no-install-recommends cmake - -# ======================================= -# Installing gcc13 -# -# NOTE: Install gcc after cmake, while cmake will auto-install gcc7. -# Install gcc13 as default. - -RUN apt-get purge -y gcc gcc-7 g++-7 && \ - apt-add-repository -y ppa:ubuntu-toolchain-r/test && \ - apt-get update && \ - apt-get install -y --no-install-recommends gcc-13 g++-13 && \ - apt-get install -y gcc-9-multilib g++-13-multilib && \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 - -# ======================================= -# Install golang - -# /root/go is GOPATH. - -ENV PATH="$PATH:/usr/local/go/bin:/root/go/bin" - -# TEN go binding needs to be compatible with GO 1.20, so we need to install GO -# 1.20 to check the compatibility. -RUN curl -OL https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && \ - rm -rf /usr/local/go && tar -C /usr/local -xvf go1.22.3.linux-amd64.tar.gz && rm go1.22.3.linux-amd64.tar.gz && \ - go install golang.org/dl/go1.20.12@latest && go1.20.12 download - -# ======================================= -# Install cargo for rust. - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ - /root/.cargo/bin/rustup install nightly && \ - /root/.cargo/bin/rustup default nightly && \ - /root/.cargo/bin/cargo install --force cbindgen - -ENV PATH="/root/.cargo/bin:$PATH" - -# ======================================= -# Installing Python3.10 from source code. - -ENV PYTHON_VERSION=3.10.14 - -RUN wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \ - tar -zxvf Python-${PYTHON_VERSION}.tgz && \ - cd Python-${PYTHON_VERSION} && \ - ./configure --with-lto --with-computed-gotos --with-system-ffi --prefix=/usr --disable-test-modules --enable-shared && \ - make -j && \ - make altinstall && \ - rm -rf Python-{PYTHON_VERSION}* - -RUN ln -sf /usr/bin/python3.10-config /usr/bin/python3-config && \ - ln -sf /usr/bin/python3.10 /usr/bin/python3 && \ - ln -sf /usr/bin/python3.10 /usr/bin/python && \ - ln -sf /usr/bin/pip3.10 /usr/bin/pip3 && \ - cp /usr/lib/python3/dist-packages/lsb_release.py /usr/bin && \ - pip3 install --upgrade setuptools && \ - pip3 install --upgrade pip && \ - pip3 install requests oss2 && \ - pip3 install --use-pep517 python-dotenv jinja2 - -# ======================================= -# Cleanup - -RUN apt-get clean && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*