Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): apt update before install #7080

Merged
merged 8 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
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
run: sudo ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies

- name: Build wasm code
if: matrix.os_name == 'linux_openresty'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
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
run: sudo ./ci/linux_openresty_common_runner.sh linux_get_dependencies

- name: Linux Install
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
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
run: sudo ./ci/linux_openresty_common_runner.sh linux_get_dependencies

- name: Linux Before install
run: sudo ./ci/${{ matrix.job_name }}_runner.sh before_install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kubernetes-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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 ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1)
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tars-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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 ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies
sudo cpanm --notest Test::Nginx >build.log 2>&1 || (cat build.log && exit 1)
sudo --preserve-env=OPENRESTY_VERSION ./ci/${{ matrix.os_name }}_runner.sh do_install

Expand Down
5 changes: 5 additions & 0 deletions ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,8 @@ install_nodejs () {
}

GRPC_SERVER_EXAMPLE_VER=20210819

install_dependencies () {
apt update
apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl libpcre3 libpcre3-dev libldap2-dev
}
7 changes: 7 additions & 0 deletions ci/linux_openresty_common_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ after_success() {
echo "done"
}

linux_get_dependencies() {
install_dependencies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can put this in each runner.sh's do_install? So there is no need to put sudo ./ci/${{ matrix.os_name }}_runner.sh linux_get_dependencies in each workflow.

}

case_opt=$1
shift

Expand All @@ -117,4 +121,7 @@ script)
after_success)
after_success "$@"
;;
linux_get_dependencies)
linux_get_dependencies "$@"
;;
esac