diff --git a/.github/workflows/source-install.yml b/.github/workflows/source-install.yml index 45b767c3a4891..982bf55913da9 100644 --- a/.github/workflows/source-install.yml +++ b/.github/workflows/source-install.yml @@ -1,4 +1,4 @@ -name: CLI Test +name: Source Code Install on: push: @@ -20,13 +20,13 @@ permissions: contents: read jobs: - build-from-multiple-platforms: + install-on-multi-platform: strategy: fail-fast: false matrix: platform: - ubuntu-20.04 - build_platform: + os_platform: - centos7 - ubuntu - redhat @@ -59,25 +59,25 @@ jobs: cache-name: cache-deps with: path: deps - key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.build_platform }}-${{ hashFiles('apisix-master-0.rockspec') }} + key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_platform }}-${{ hashFiles('apisix-master-0.rockspec') }} - - name: Install and start apisix on ${{ matrix.build_platform }} + - name: Install and start apisix on ${{ matrix.os_platform }} env: - BUILD_PLATFORM: ${{ matrix.build_platform }} + INSTALL_PLATFORM: ${{ matrix.os_platform }} run: | - if [[ $BUILD_PLATFORM == "ubuntu" ]]; then - # install apisix + if [[ $INSTALL_PLATFORM == "ubuntu"]]; then + sudo apt-get update + sudo apt-get install -y git sudo make make deps sudo make install - # start apisix apisix start - elif [[ $BUILD_PLATFORM == "redhat" ]]; then + elif [[ $INSTALL_PLATFORM == "redhat" ]]; then docker run -itd -v ${{ github.workspace }}:/apisix --name ubi8 --net="host" --dns 8.8.8.8 --dns-search apache.org registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash docker exec ubi8 bash -c "yum install -y git sudo make" docker exec ubi8 bash -c "cd apisix && make deps" docker exec ubi8 bash -c "cd apisix && make install" docker exec ubi8 bash -c "cd apisix && apisix start" - elif [[ $BUILD_PLATFORM == "centos7" ]]; then + elif [[ $INSTALL_PLATFORM == "centos7" ]]; then docker run -itd -v ${{ github.workspace }}:/apisix --name centos7Instance --net="host" --dns 8.8.8.8 --dns-search apache.org docker.io/centos:7 /bin/bash docker exec centos7Instance bash -c "yum install -y git sudo make" docker exec centos7Instance bash -c "cd apisix && make deps" @@ -108,7 +108,6 @@ jobs: cat logs/error.log exit 125 fi - apisix stop - name: Check error log run: | diff --git a/.requirements b/.requirements index 978772db5eed5..b5d22118a3c42 100644 --- a/.requirements +++ b/.requirements @@ -17,4 +17,4 @@ APISIX_PACKAGE_NAME=apisix -APISIX_RUNTIME=1.1.0 +APISIX_RUNTIME=1.1.1 diff --git a/utils/install-dependencies.sh b/utils/install-dependencies.sh index f5566be741e5d..e6da272747cc2 100755 --- a/utils/install-dependencies.sh +++ b/utils/install-dependencies.sh @@ -129,7 +129,11 @@ function multi_distro_uninstallation() { } function install_apisix_runtime() { - curl "https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime.sh" | luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -O0" runtime_version=${APISIX_RUNTIME} version=latest bash - + export runtime_version=${APISIX_RUNTIME} + wget "https://raw.githubusercontent.com/api7/apisix-build-tools/apisix-runtime/${APISIX_RUNTIME}/build-apisix-runtime.sh" + chmod +x build-apisix-runtime.sh + ./build-apisix-runtime.sh latest + rm build-apisix-runtime.sh } # Install LuaRocks