diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef861c828288..ba4318a2b1ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,9 +79,6 @@ jobs: rm -rf $(ls -1 --ignore=*.tgz --ignore=ci --ignore=t --ignore=utils --ignore=.github) tar zxvf ${{ steps.branch_env.outputs.fullname }} - - name: Linux Get dependencies - run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev - - name: Build wasm code if: matrix.os_name == 'linux_openresty' run: | @@ -93,6 +90,12 @@ jobs: - name: Linux Before install run: sudo ./ci/${{ matrix.os_name }}_runner.sh before_install + - name: Start CI env + run: | + # launch deps env + make ci-env-up + sudo ./ci/linux-ci-init-service.sh + - name: Start Dubbo Backend if: matrix.os_name == 'linux_openresty' run: | diff --git a/.github/workflows/cli-master.yml b/.github/workflows/cli-master.yml index 506dc23e8408..f804c58140d3 100644 --- a/.github/workflows/cli-master.yml +++ b/.github/workflows/cli-master.yml @@ -46,9 +46,6 @@ jobs: run: | project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up - - name: Linux Get dependencies - run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev - - name: Linux Install run: | sudo --preserve-env=OPENRESTY_VERSION \ diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 8d1576ce5093..f4aff90e275a 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -51,9 +51,6 @@ jobs: run: | project_compose_ci=ci/pod/docker-compose.common.yml make ci-env-up - - name: Linux Get dependencies - run: sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev - - name: Linux Before install run: sudo ./ci/${{ matrix.job_name }}_runner.sh before_install diff --git a/.github/workflows/kubernetes-ci.yml b/.github/workflows/kubernetes-ci.yml index 40aa34fc399a..210cc10df81b 100644 --- a/.github/workflows/kubernetes-ci.yml +++ b/.github/workflows/kubernetes-ci.yml @@ -81,8 +81,7 @@ jobs: - name: Linux Install run: | - sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev - sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1) + sudo ./ci/${{ matrix.os_name }}_runner.sh before_install sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install - name: Run test cases diff --git a/ci/common.sh b/ci/common.sh index 6353957ec587..fd5575c0ffac 100644 --- a/ci/common.sh +++ b/ci/common.sh @@ -80,3 +80,8 @@ install_nodejs () { } GRPC_SERVER_EXAMPLE_VER=20210819 + +linux_get_dependencies () { + apt update + apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev +} diff --git a/ci/linux_apisix_current_luarocks_runner.sh b/ci/linux_apisix_current_luarocks_runner.sh index b630c1db9955..3989d0df04c6 100755 --- a/ci/linux_apisix_current_luarocks_runner.sh +++ b/ci/linux_apisix_current_luarocks_runner.sh @@ -19,6 +19,8 @@ . ./ci/common.sh do_install() { + linux_get_dependencies + export_or_prefix ./utils/linux-install-openresty.sh diff --git a/ci/linux_apisix_master_luarocks_runner.sh b/ci/linux_apisix_master_luarocks_runner.sh index 75ca91eb245e..2ffa94cdef97 100755 --- a/ci/linux_apisix_master_luarocks_runner.sh +++ b/ci/linux_apisix_master_luarocks_runner.sh @@ -19,6 +19,8 @@ . ./ci/common.sh do_install() { + linux_get_dependencies + export_or_prefix ./utils/linux-install-openresty.sh diff --git a/ci/linux_openresty_common_runner.sh b/ci/linux_openresty_common_runner.sh index ad8dccb062ec..4a76c385a84f 100755 --- a/ci/linux_openresty_common_runner.sh +++ b/ci/linux_openresty_common_runner.sh @@ -19,11 +19,9 @@ . ./ci/common.sh before_install() { - sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1) + linux_get_dependencies - # launch deps env - make ci-env-up - ./ci/linux-ci-init-service.sh + sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1) } do_install() {