From f8f85fe02f566c2447dde33722fec54f8e5c41df Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Mon, 21 Aug 2023 06:37:21 -0500 Subject: [PATCH 1/8] Added GitHub Action to automatically build any master branch git commits --- .github/workflows/ci.yml | 133 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..114e457 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,133 @@ +name: CI + +on: + push: + branches: + - 'master' + pull_request: + branches: + - 'master' + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + # Each nginx version to build against + nginx-version: ['1.20.2', '1.22.1', '1.24.0', '1.25.1'] + # The following versions of libjwt are compatible: + # * v1.0 - v1.12.0 + # * v1.12.1 - v1.14.0 + # * v1.15.0+ + # At the time of writing this: + # * Debian and Ubuntu's repos have v1.10.2 + # * EPEL has v1.12.1 + # This compilles against each version prior to a breaking change and the latest release + libjwt-version: ['v1.12.0', 'v1.14.0', 'v1.15.3'] + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + path: 'ngx-http-auth-jwt-module' + + - name: Download jansson + uses: actions/checkout@v3 + with: + repository: 'akheron/jansson' + ref: 'v2.14' + path: 'jansson' + + - name: Build jansson + working-directory: ./jansson + run: | + cmake . -DJANSSON_BUILD_SHARED_LIBS=1 -DJANSSON_BUILD_DOCS=OFF && \ + make && \ + make check && \ + sudo make install + + - name: Download libjwt + uses: actions/checkout@v3 + with: + repository: 'benmcollins/libjwt' + ref: '${{matrix.libjwt-version}}' + path: 'libjwt' + + - name: Build libjwt + working-directory: ./libjwt + run: | + autoreconf -i && \ + ./configure && \ + make all && \ + sudo make install + + - name: Download NGINX + run: | + mkdir nginx + curl -O http://nginx.org/download/nginx-${{matrix.nginx-version}}.tar.gz + tar -xzf nginx-${{matrix.nginx-version}}.tar.gz --strip-components 1 -C nginx + + - name: Run configure + working-directory: ./nginx + run: | + BUILD_FLAGS='' + MAJ=$(echo ${{matrix.nginx-version}} | cut -f1 -d.) + MIN=$(echo ${{matrix.nginx-version}} | cut -f2 -d.) + REV=$(echo ${{matrix.nginx-version}} | cut -f3 -d.) + if [ "${MAJ}" -gt 1 ] || [ "${MAJ}" -eq 1 -a "${MIN}" -ge 23 ]; then + BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'" + fi + ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS} + + - name: Run make + working-directory: ./nginx + run: make modules + + - name: Create release archive + run: | + cp ./nginx/objs/ngx_http_auth_jwt_module.so ./ + tar czf ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz ngx_http_auth_jwt_module.so + + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + if-no-files-found: error + name: ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz + path: ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz + + update_releases_page: + name: Upload builds to Releases + if: github.event_name != 'pull_request' + needs: + - build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Set up variables + id: vars + run: | + echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}" + + - name: Download build artifacts from previous jobs + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Upload builds to Releases + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifactErrorsFailBuild: true + artifacts: artifacts/*/* + body: | + > [!WARNING] + > This is an automatically generated in-development pre-release version of the application, that includes the latest master branch changes. + > Please report any bugs you find to the issue tracker. + + - Last build date: `${{ steps.vars.outputs.date_now }}` + - Reference commit: ${{ github.sha }} + name: Development build + prerelease: true + removeArtifacts: true + tag: dev-build From 7a08fba2769e26625fb2e0d9fd845e751be48f57 Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:45:51 -0500 Subject: [PATCH 2/8] Update .github/workflows/ci.yml Co-authored-by: Josh McCullough --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 114e457..c64671c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: # * Debian and Ubuntu's repos have v1.10.2 # * EPEL has v1.12.1 # This compilles against each version prior to a breaking change and the latest release - libjwt-version: ['v1.12.0', 'v1.14.0', 'v1.15.3'] + libjwt-version: ['1.12.0', '1.14.0', '1.15.3'] runs-on: ubuntu-latest steps: - name: Checkout code From 58f45a640e8874ac43f4fc84b25535e461b869be Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:46:32 -0500 Subject: [PATCH 3/8] Update .github/workflows/ci.yml Co-authored-by: Josh McCullough --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c64671c..dcadcd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: uses: actions/checkout@v3 with: repository: 'benmcollins/libjwt' - ref: '${{matrix.libjwt-version}}' + ref: 'v${{matrix.libjwt-version}}' path: 'libjwt' - name: Build libjwt From 7ae1026b4ad1d447765ea37e30f92f384ab0048e Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:46:56 -0500 Subject: [PATCH 4/8] Update .github/workflows/ci.yml Co-authored-by: Josh McCullough --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcadcd6..a049cee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,11 +122,12 @@ jobs: artifacts: artifacts/*/* body: | > [!WARNING] - > This is an automatically generated in-development pre-release version of the application, that includes the latest master branch changes. + > [!WARNING] + > This is an automatically generated pre-release version of the module, which includes the latest master branch changes. > Please report any bugs you find to the issue tracker. - - Last build date: `${{ steps.vars.outputs.date_now }}` - - Reference commit: ${{ github.sha }} + - Build Date: `${{ steps.vars.outputs.date_now }}` + - Commit: ${{ github.sha }} name: Development build prerelease: true removeArtifacts: true From 14274ad616fa18fa74aad16e6bd333c73587b652 Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:47:08 -0500 Subject: [PATCH 5/8] Update .github/workflows/ci.yml Co-authored-by: Josh McCullough --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a049cee..77391af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: - Build Date: `${{ steps.vars.outputs.date_now }}` - Commit: ${{ github.sha }} - name: Development build + name: 'Development build: ${{ github.ref_name }}@${{ github.sha }}' prerelease: true removeArtifacts: true tag: dev-build From a2379dd3b4111886e717fb2d5c811344cfeba258 Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Wed, 23 Aug 2023 16:52:05 -0500 Subject: [PATCH 6/8] Removed redundant Warning tag --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77391af..d7f4b6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,6 @@ jobs: artifactErrorsFailBuild: true artifacts: artifacts/*/* body: | - > [!WARNING] > [!WARNING] > This is an automatically generated pre-release version of the module, which includes the latest master branch changes. > Please report any bugs you find to the issue tracker. From 939ee0f1913a1d1cdd6b2bcd18352b6985e89647 Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Thu, 21 Nov 2024 06:06:48 -0600 Subject: [PATCH 7/8] Delete .github/workflows/ci.yml --- .github/workflows/ci.yml | 133 --------------------------------------- 1 file changed, 133 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d7f4b6b..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,133 +0,0 @@ -name: CI - -on: - push: - branches: - - 'master' - pull_request: - branches: - - 'master' - workflow_dispatch: - -jobs: - build: - strategy: - matrix: - # Each nginx version to build against - nginx-version: ['1.20.2', '1.22.1', '1.24.0', '1.25.1'] - # The following versions of libjwt are compatible: - # * v1.0 - v1.12.0 - # * v1.12.1 - v1.14.0 - # * v1.15.0+ - # At the time of writing this: - # * Debian and Ubuntu's repos have v1.10.2 - # * EPEL has v1.12.1 - # This compilles against each version prior to a breaking change and the latest release - libjwt-version: ['1.12.0', '1.14.0', '1.15.3'] - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - path: 'ngx-http-auth-jwt-module' - - - name: Download jansson - uses: actions/checkout@v3 - with: - repository: 'akheron/jansson' - ref: 'v2.14' - path: 'jansson' - - - name: Build jansson - working-directory: ./jansson - run: | - cmake . -DJANSSON_BUILD_SHARED_LIBS=1 -DJANSSON_BUILD_DOCS=OFF && \ - make && \ - make check && \ - sudo make install - - - name: Download libjwt - uses: actions/checkout@v3 - with: - repository: 'benmcollins/libjwt' - ref: 'v${{matrix.libjwt-version}}' - path: 'libjwt' - - - name: Build libjwt - working-directory: ./libjwt - run: | - autoreconf -i && \ - ./configure && \ - make all && \ - sudo make install - - - name: Download NGINX - run: | - mkdir nginx - curl -O http://nginx.org/download/nginx-${{matrix.nginx-version}}.tar.gz - tar -xzf nginx-${{matrix.nginx-version}}.tar.gz --strip-components 1 -C nginx - - - name: Run configure - working-directory: ./nginx - run: | - BUILD_FLAGS='' - MAJ=$(echo ${{matrix.nginx-version}} | cut -f1 -d.) - MIN=$(echo ${{matrix.nginx-version}} | cut -f2 -d.) - REV=$(echo ${{matrix.nginx-version}} | cut -f3 -d.) - if [ "${MAJ}" -gt 1 ] || [ "${MAJ}" -eq 1 -a "${MIN}" -ge 23 ]; then - BUILD_FLAGS="${BUILD_FLAGS} --with-cc-opt='-DNGX_LINKED_LIST_COOKIES=1'" - fi - ./configure --with-compat --add-dynamic-module=../ngx-http-auth-jwt-module ${BUILD_FLAGS} - - - name: Run make - working-directory: ./nginx - run: make modules - - - name: Create release archive - run: | - cp ./nginx/objs/ngx_http_auth_jwt_module.so ./ - tar czf ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz ngx_http_auth_jwt_module.so - - - name: Upload build artifact - uses: actions/upload-artifact@v3 - with: - if-no-files-found: error - name: ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz - path: ngx_http_auth_jwt_module_${{github.ref_name}}_libjwt_${{matrix.libjwt-version}}_nginx_${{matrix.nginx-version}}.tgz - - update_releases_page: - name: Upload builds to Releases - if: github.event_name != 'pull_request' - needs: - - build - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Set up variables - id: vars - run: | - echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}" - - - name: Download build artifacts from previous jobs - uses: actions/download-artifact@v3 - with: - path: artifacts - - - name: Upload builds to Releases - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifactErrorsFailBuild: true - artifacts: artifacts/*/* - body: | - > [!WARNING] - > This is an automatically generated pre-release version of the module, which includes the latest master branch changes. - > Please report any bugs you find to the issue tracker. - - - Build Date: `${{ steps.vars.outputs.date_now }}` - - Commit: ${{ github.sha }} - name: 'Development build: ${{ github.ref_name }}@${{ github.sha }}' - prerelease: true - removeArtifacts: true - tag: dev-build From 4237fa19239e4790753f4d3586055b1ffddf1f5c Mon Sep 17 00:00:00 2001 From: KnownEntity <42591012+KnownEntity@users.noreply.github.com> Date: Thu, 21 Nov 2024 06:07:45 -0600 Subject: [PATCH 8/8] Added NGINX v1.26.2 to make-releases.yml --- .github/workflows/make-releases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make-releases.yml b/.github/workflows/make-releases.yml index 037823b..00024cc 100644 --- a/.github/workflows/make-releases.yml +++ b/.github/workflows/make-releases.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: # NGINX versions to build/test against - nginx-version: ['1.20.2', '1.22.1', '1.24.0', '1.25.3'] + nginx-version: ['1.20.2', '1.22.1', '1.24.0', '1.25.3', '1.26.2'] # The following versions of libjwt are compatible: # * v1.0 - v1.12.0