From cc5b1d42b004f9568dc7889550befbc913286597 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Tue, 31 Dec 2024 12:53:41 +0800 Subject: [PATCH] ci: disable pyo3 build tasks (#5256) * ci: disable pyo3 build tasks * ci: skip installing python for windows * ci: also removed python dependencies from docker base image --- .github/actions/build-images/action.yml | 4 ++-- .github/actions/build-linux-artifacts/action.yml | 14 +------------- .github/actions/build-windows-artifacts/action.yml | 9 --------- .github/workflows/develop.yml | 8 +------- .github/workflows/nightly-ci.yml | 8 +------- .github/workflows/release.yml | 12 ------------ docker/buildx/centos/Dockerfile | 4 ---- docker/buildx/ubuntu/Dockerfile | 12 +----------- docker/ci/centos/Dockerfile | 4 +--- docker/ci/ubuntu/Dockerfile | 7 ------- 10 files changed, 7 insertions(+), 75 deletions(-) diff --git a/.github/actions/build-images/action.yml b/.github/actions/build-images/action.yml index c339adc0ee..a315106cc3 100644 --- a/.github/actions/build-images/action.yml +++ b/.github/actions/build-images/action.yml @@ -41,8 +41,8 @@ runs: image-name: ${{ inputs.image-name }} image-tag: ${{ inputs.version }} docker-file: docker/ci/ubuntu/Dockerfile - amd64-artifact-name: greptime-linux-amd64-pyo3-${{ inputs.version }} - arm64-artifact-name: greptime-linux-arm64-pyo3-${{ inputs.version }} + amd64-artifact-name: greptime-linux-amd64-${{ inputs.version }} + arm64-artifact-name: greptime-linux-arm64-${{ inputs.version }} platforms: linux/amd64,linux/arm64 push-latest-tag: ${{ inputs.push-latest-tag }} diff --git a/.github/actions/build-linux-artifacts/action.yml b/.github/actions/build-linux-artifacts/action.yml index 21f1d12de7..a6e5ea5f01 100644 --- a/.github/actions/build-linux-artifacts/action.yml +++ b/.github/actions/build-linux-artifacts/action.yml @@ -48,19 +48,7 @@ runs: path: /tmp/greptime-*.log retention-days: 3 - - name: Build standard greptime - uses: ./.github/actions/build-greptime-binary - with: - base-image: ubuntu - features: pyo3_backend,servers/dashboard - cargo-profile: ${{ inputs.cargo-profile }} - artifacts-dir: greptime-linux-${{ inputs.arch }}-pyo3-${{ inputs.version }} - version: ${{ inputs.version }} - working-dir: ${{ inputs.working-dir }} - image-registry: ${{ inputs.image-registry }} - image-namespace: ${{ inputs.image-namespace }} - - - name: Build greptime without pyo3 + - name: Build greptime if: ${{ inputs.dev-mode == 'false' }} uses: ./.github/actions/build-greptime-binary with: diff --git a/.github/actions/build-windows-artifacts/action.yml b/.github/actions/build-windows-artifacts/action.yml index bb7c525705..d840660587 100644 --- a/.github/actions/build-windows-artifacts/action.yml +++ b/.github/actions/build-windows-artifacts/action.yml @@ -33,15 +33,6 @@ runs: - name: Rust Cache uses: Swatinem/rust-cache@v2 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Install PyArrow Package - shell: pwsh - run: pip install pyarrow numpy - - name: Install WSL distribution uses: Vampire/setup-wsl@v2 with: diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index c9a25abd7e..aef1b920ea 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -668,12 +668,6 @@ jobs: uses: taiki-e/install-action@nextest - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - name: Install PyArrow Package - run: pip install pyarrow numpy - name: Setup etcd server working-directory: tests-integration/fixtures/etcd run: docker compose -f docker-compose-standalone.yml up -d --wait @@ -687,7 +681,7 @@ jobs: working-directory: tests-integration/fixtures/postgres run: docker compose -f docker-compose-standalone.yml up -d --wait - name: Run nextest cases - run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info -F pyo3_backend -F dashboard -F pg_kvbackend + run: cargo llvm-cov nextest --workspace --lcov --output-path lcov.info -F dashboard -F pg_kvbackend env: CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" RUST_BACKTRACE: 1 diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 824d2b053d..ff00ce5f0c 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -91,18 +91,12 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Install Cargo Nextest uses: taiki-e/install-action@nextest - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Install PyArrow Package - run: pip install pyarrow numpy - name: Install WSL distribution uses: Vampire/setup-wsl@v2 with: distribution: Ubuntu-22.04 - name: Running tests - run: cargo nextest run -F pyo3_backend,dashboard + run: cargo nextest run -F dashboard env: CARGO_BUILD_RUSTFLAGS: "-C linker=lld-link" RUST_BACKTRACE: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 732423b73d..8968d06b80 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -222,18 +222,10 @@ jobs: arch: aarch64-apple-darwin features: servers/dashboard artifacts-dir-prefix: greptime-darwin-arm64 - - os: ${{ needs.allocate-runners.outputs.macos-runner }} - arch: aarch64-apple-darwin - features: pyo3_backend,servers/dashboard - artifacts-dir-prefix: greptime-darwin-arm64-pyo3 - os: ${{ needs.allocate-runners.outputs.macos-runner }} features: servers/dashboard arch: x86_64-apple-darwin artifacts-dir-prefix: greptime-darwin-amd64 - - os: ${{ needs.allocate-runners.outputs.macos-runner }} - features: pyo3_backend,servers/dashboard - arch: x86_64-apple-darwin - artifacts-dir-prefix: greptime-darwin-amd64-pyo3 runs-on: ${{ matrix.os }} outputs: build-macos-result: ${{ steps.set-build-macos-result.outputs.build-macos-result }} @@ -271,10 +263,6 @@ jobs: arch: x86_64-pc-windows-msvc features: servers/dashboard artifacts-dir-prefix: greptime-windows-amd64 - - os: ${{ needs.allocate-runners.outputs.windows-runner }} - arch: x86_64-pc-windows-msvc - features: pyo3_backend,servers/dashboard - artifacts-dir-prefix: greptime-windows-amd64-pyo3 runs-on: ${{ matrix.os }} outputs: build-windows-result: ${{ steps.set-build-windows-result.outputs.build-windows-result }} diff --git a/docker/buildx/centos/Dockerfile b/docker/buildx/centos/Dockerfile index 9f4f525f5e..588290661c 100644 --- a/docker/buildx/centos/Dockerfile +++ b/docker/buildx/centos/Dockerfile @@ -13,8 +13,6 @@ RUN yum install -y epel-release \ openssl \ openssl-devel \ centos-release-scl \ - rh-python38 \ - rh-python38-python-devel \ which # Install protoc @@ -43,8 +41,6 @@ RUN yum install -y epel-release \ openssl \ openssl-devel \ centos-release-scl \ - rh-python38 \ - rh-python38-python-devel \ which WORKDIR /greptime diff --git a/docker/buildx/ubuntu/Dockerfile b/docker/buildx/ubuntu/Dockerfile index 8d6fc8b1fb..3f52e9affd 100644 --- a/docker/buildx/ubuntu/Dockerfile +++ b/docker/buildx/ubuntu/Dockerfile @@ -20,10 +20,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ curl \ git \ build-essential \ - pkg-config \ - python3.10 \ - python3.10-dev \ - python3-pip + pkg-config # Install Rust. SHELL ["/bin/bash", "-c"] @@ -46,15 +43,8 @@ ARG OUTPUT_DIR RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get \ -y install ca-certificates \ - python3.10 \ - python3.10-dev \ - python3-pip \ curl -COPY ./docker/python/requirements.txt /etc/greptime/requirements.txt - -RUN python3 -m pip install -r /etc/greptime/requirements.txt - WORKDIR /greptime COPY --from=builder /out/target/${OUTPUT_DIR}/greptime /greptime/bin/ ENV PATH /greptime/bin/:$PATH diff --git a/docker/ci/centos/Dockerfile b/docker/ci/centos/Dockerfile index 8cddcfc539..14f3e793a8 100644 --- a/docker/ci/centos/Dockerfile +++ b/docker/ci/centos/Dockerfile @@ -7,9 +7,7 @@ RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo RUN yum install -y epel-release \ openssl \ openssl-devel \ - centos-release-scl \ - rh-python38 \ - rh-python38-python-devel + centos-release-scl ARG TARGETARCH diff --git a/docker/ci/ubuntu/Dockerfile b/docker/ci/ubuntu/Dockerfile index 580b73e56f..b543e35778 100644 --- a/docker/ci/ubuntu/Dockerfile +++ b/docker/ci/ubuntu/Dockerfile @@ -8,15 +8,8 @@ ARG TARGET_BIN=greptime RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ - python3.10 \ - python3.10-dev \ - python3-pip \ curl -COPY $DOCKER_BUILD_ROOT/docker/python/requirements.txt /etc/greptime/requirements.txt - -RUN python3 -m pip install -r /etc/greptime/requirements.txt - ARG TARGETARCH ADD $TARGETARCH/$TARGET_BIN /greptime/bin/