diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index cce2d05..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,55 +0,0 @@ -version: 2.1 - -# use circleci's pipeline argument to ease configuration. -# this allows you to track the right packages, and to add extra dependencies if needed -# just change the default here -parameters: - pc-repo: - description: the packagecloud repository to find the Varnish Cache packages. It should match the version you are building against - type: string - default: "varnish-weekly" - dep-pkgs: - description: which packages to install to build your vmod(s) - type: string - default: "make automake libtool python-sphinx" - -# for now, we just build for centos:7, be we can do it for more platforms if needed -jobs: - build: - docker: - - image: centos:7 - working_directory: /workspace - steps: - - run: - name: Install dependencies - command: | - curl -s https://packagecloud.io/install/repositories/varnishcache/<< pipeline.parameters.pc-repo >>/script.rpm.sh | bash - yum install -y epel-release - yum install -y git varnish-devel << pipeline.parameters.dep-pkgs >> - - checkout - - run: - name: Build and test - command: | - ./autogen.sh - ./configure - make - make check -j 4 - make install - -# two workflows, identical but for their triggers ()commit/scheduled -workflows: - version: 2 - # run the build job for all commits - commit: &jobs - jobs: - - build - # every week, run build too, in case packages got updated - nightly: - <<: *jobs - triggers: - - schedule: - cron: "0 4 * * *" - filters: - branches: - only: - - master diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml index 78150aa..7890289 100644 --- a/.github/workflows/build-deb.yml +++ b/.github/workflows/build-deb.yml @@ -1,33 +1,34 @@ name: build-deb -# Controls when the action will run. +# Controls when the action will run. on: push: tags: - - 'v*' + - "v*" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: release: - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" outputs: upload_url: ${{steps.create_release.outputs.upload_url}} steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: true - prerelease: true + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: true + prerelease: true build: needs: release strategy: fail-fast: false matrix: os: + - "ubuntu-22.04" - "ubuntu-20.04" - "ubuntu-18.04" vrt: @@ -36,39 +37,40 @@ jobs: - 71 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: install build depends - run: | - sudo apt-get install python3-docutils python3-sphinx build-essential devscripts debhelper python-docutils dh-autoreconf pkg-config autogen automake autotools-dev autoconf libtool - - name: install varnish - run: | - cd $GITHUB_WORKSPACE - ./sw_vrt.sh ${{ matrix.vrt }} - cd debian.vrt - ./pkg.sh - ./bf_build_${{ matrix.vrt }}.sh - - name: build vmod - run: | - cd $GITHUB_WORKSPACE - rm -f ../*.deb - debuild -us -uc -b - ls ../ - - name: Get filename - id: filename - run: find ${GITHUB_WORKSPACE}/../ -maxdepth 1 -name *.deb -type f -printf "::set-output name=deb::%f\n" - - name: Test pkg - run: | - cd ${GITHUB_WORKSPACE}/../ - sudo dpkg -i ${{ steps.filename.outputs.deb }} - cd ${GITHUB_WORKSPACE}/debian.vrt - varnishtest test.vtc - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.release.outputs.upload_url }} - asset_path: ../${{ steps.filename.outputs.deb }} - asset_name: ${{ steps.filename.outputs.deb }} - asset_content_type: application/vnd.debian.binary-package + - uses: actions/checkout@v4 + - name: install build depends + run: | + sudo apt-get update + sudo apt-get install python3-docutils python3-sphinx build-essential devscripts debhelper python-docutils dh-autoreconf pkg-config autogen automake autotools-dev autoconf libtool + - name: install varnish + run: | + cd $GITHUB_WORKSPACE + ./sw_vrt.sh ${{ matrix.vrt }} + cd debian.vrt + ./pkg.sh + ./bf_build_${{ matrix.vrt }}.sh + - name: build vmod + run: | + cd $GITHUB_WORKSPACE + rm -f ../*.deb + debuild -us -uc -b + ls ../ + - name: Get filename + id: filename + run: find ${GITHUB_WORKSPACE}/../ -maxdepth 1 -name *.deb -type f -printf "::set-output name=deb::%f\n" + - name: Test pkg + run: | + cd ${GITHUB_WORKSPACE}/../ + sudo dpkg -i ${{ steps.filename.outputs.deb }} + cd ${GITHUB_WORKSPACE}/debian.vrt + varnishtest test.vtc + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ../${{ steps.filename.outputs.deb }} + asset_name: ${{ steps.filename.outputs.deb }} + asset_content_type: application/vnd.debian.binary-package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c5dca5..e1cf63a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,20 +17,19 @@ jobs: matrix: varnish: - "https://github.com/varnishcache/varnish-cache/archive/master.tar.gz" #VRT=14.0 + - "https://varnish-cache.org/_downloads/varnish-7.5.0.tgz" #VRT=14.0 + - "https://varnish-cache.org/_downloads/varnish-7.4.3.tgz" #VRT=14.0 - "https://varnish-cache.org/_downloads/varnish-7.0.0.tgz" #VRT=14.0 - - "https://varnish-cache.org/_downloads/varnish-6.6.1.tgz" #VRT=13.0 - - "https://varnish-cache.org/_downloads/varnish-6.5.2.tgz" #VRT=12.0 - - "https://varnish-cache.org/_downloads/varnish-6.4.0.tgz" #VRT=11.0 - - "https://varnish-cache.org/_downloads/varnish-6.3.2.tgz" #VRT=10.0 - - "https://varnish-cache.org/_downloads/varnish-6.2.3.tgz" #VRT=9.0 - - "https://varnish-cache.org/_downloads/varnish-6.0.10.tgz" #VRT=7.1 + - "https://varnish-cache.org/_downloads/varnish-6.0.13.tgz" include: - varnish: "https://github.com/varnishcache/varnish-cache/archive/master.tar.gz" allow_failures: "true" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install build depends - run: sudo apt-get install python3-docutils python3-sphinx + run: | + sudo apt-get update + sudo apt-get install python3-docutils python3-sphinx - name: build varnish run: | wget ${{ matrix.varnish }}