From d2dff02ccd3a5a7039c304ebedeb087883b38d33 Mon Sep 17 00:00:00 2001 From: owl Date: Fri, 15 Dec 2023 16:43:53 +0800 Subject: [PATCH] fix: remove old os action because github action have been not support --- .github/workflows/old_os.yml | 189 ----------------------------------- 1 file changed, 189 deletions(-) delete mode 100644 .github/workflows/old_os.yml diff --git a/.github/workflows/old_os.yml b/.github/workflows/old_os.yml deleted file mode 100644 index 9590efc9..00000000 --- a/.github/workflows/old_os.yml +++ /dev/null @@ -1,189 +0,0 @@ -name: Build and test for Ubuntu 18.04 - -on: [push, pull_request] - -jobs: - build: - name: Build and install dependencies - runs-on: ubuntu-18.04 - strategy: - matrix: - openresty-version: [1.13.6.2, 1.15.8.3, 1.17.8.2, 1.19.9.1] - luarocks-version: [3.8.0] - - steps: - - name: Update and install OS dependencies - run: sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert - - - name: Set environment variables - env: - LUAROCKS_VER: ${{ matrix.luarocks-version }} - OPENRESTY_VER: ${{ matrix.openresty-version }} - run: | - echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV - export DOWNLOAD_PATH=$HOME/download-root - echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV - export INSTALL_PATH=$HOME/install-root - echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV - echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV - export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER - echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV - export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER - echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV - echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV - - - name: Checkout lua-resty-healthcheck - uses: actions/checkout@v2 - - - name: Lookup build cache - uses: actions/cache@v2 - id: cache-deps - with: - path: | - ${{ env.INSTALL_PATH }} - ~/perl5 - key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }} - - - name: Create needed paths - if: steps.cache-deps.outputs.cache-hit != 'true' - run: | - mkdir -p $DOWNLOAD_PATH - mkdir -p $INSTALL_PATH - - - name: Build and install OpenResty ${{ matrix.openresty-version }} - if: steps.cache-deps.outputs.cache-hit != 'true' - run: | - if [ ! -d $INSTALL_PATH/openresty-$OPENRESTY_VER ]; - then - pushd $DOWNLOAD_PATH - echo "Downloading from http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz" - wget -O $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz - echo "tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz" - tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz - echo "result: $?" - pushd openresty-$OPENRESTY_VER - ./configure --prefix=$OPENRESTY_PREFIX - make - make install - popd - popd - fi - - - name: Build and install LuaRocks ${{ matrix.luarocks-version }} - if: steps.cache-deps.outputs.cache-hit != 'true' - run: | - if [ ! -d $INSTALL_PATH/luarocks-$LUAROCKS_VER ]; - then - pushd $DOWNLOAD_PATH - echo "Downloading from https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz" - wget -O $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz - tar -zxf $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz - pushd luarocks-$LUAROCKS_VER - ./configure --prefix=$LUAROCKS_PREFIX --with-lua=$OPENRESTY_PREFIX/luajit --with-lua-include=$OPENRESTY_PREFIX/luajit/include/luajit-2.1 --lua-suffix=jit - make build - make install - popd - luarocks install luacheck - popd - fi - - - name: Install Test::NGINX - if: steps.cache-deps.outputs.cache-hit != 'true' - run: | - if [ ! -f $DOWNLOAD_PATH/cpanm ]; - then - wget -O $DOWNLOAD_PATH/cpanm https://cpanmin.us/ - chmod +x $DOWNLOAD_PATH/cpanm - cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib) - cpanm --notest Test::Nginx - fi - - lint: - name: Static code analysis - runs-on: ubuntu-18.04 - needs: build - strategy: - matrix: - openresty-version: [1.13.6.2, 1.15.8.3, 1.17.8.2, 1.19.9.1] - luarocks-version: [3.8.0] - steps: - - name: Checkout lua-resty-healthcheck - uses: actions/checkout@v2 - - - name: Set environment variables - env: - LUAROCKS_VER: ${{ matrix.luarocks-version }} - OPENRESTY_VER: ${{ matrix.openresty-version }} - run: | - echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV - export DOWNLOAD_PATH=$HOME/download-root - echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV - export INSTALL_PATH=$HOME/install-root - echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV - echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV - export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER - echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV - export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER - echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV - echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV - - - name: Lookup build cache - uses: actions/cache@v2 - id: cache-deps - with: - path: | - ${{ env.INSTALL_PATH }} - ~/perl5 - key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }} - - - name: Lint code - run: | - eval `luarocks path` - luacheck lib - - install-and-test: - name: Test lua-resty-healthcheck - runs-on: ubuntu-18.04 - needs: build - strategy: - matrix: - openresty-version: [1.13.6.2, 1.15.8.3, 1.17.8.2, 1.19.9.1] - luarocks-version: [3.8.0] - steps: - - name: Checkout lua-resty-healthcheck - uses: actions/checkout@v2 - - - name: Set environment variables - env: - LUAROCKS_VER: ${{ matrix.luarocks-version }} - OPENRESTY_VER: ${{ matrix.openresty-version }} - run: | - echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV - export DOWNLOAD_PATH=$HOME/download-root - echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV - export INSTALL_PATH=$HOME/install-root - echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV - echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV - export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER - echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV - export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER - echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV - echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV - - - name: Lookup build cache - uses: actions/cache@v2 - id: cache-deps - with: - path: | - ${{ env.INSTALL_PATH }} - ~/perl5 - key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }} - - - name: Install lua-resty-healthcheck - run: luarocks make - - - name: Run tests - run: | - eval `luarocks path` - eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib) - TEST_NGINX_RANDOMIZE=1 prove -I. -r t