{"thread":{"id":"56961","subject":"[PATCH v3] ci: add a job for PCRE2","startedAt":"2021-11-22T22:29:39Z","lastAt":"2021-11-22T22:29:39Z","messageCount":1,"participants":["Hamza Mahfooz"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"442040","messageId":"20211122222933.11872-1-someguy@effective-light.com","threadId":"56961","inReplyTo":null,"subject":"[PATCH v3] ci: add a job for PCRE2","fromName":"Hamza Mahfooz","fromEmail":"someguy@effective-light.com","sentAt":"2021-11-22T22:29:33Z","receivedAt":"2021-11-22T22:29:39Z","isPatch":true,"sender":{"key":"someguy@effective-light.com","avatar":"https://avatars.githubusercontent.com/u/3885502?v=4"},"body":"Since, git aspires to support many PCRE2 versions, it is only sensible to\ntest changes to git against versions of PCRE2 that are deemed to be\nnotable, to ensure those changes to git don't cause regressions when using\nthe aforementioned PCRE2 versions. This is underscored by the fact that,\ncommit ae39ba431a (grep/pcre2: fix an edge case concerning ascii patterns\nand UTF-8 data, 2021-10-15) was able to make it's way to master while\ncausing an otherwise easy to catch regression when an older version of\nPCRE2 is used. So, to address this issue, add a job for PCRE2 to build all\nof the notable versions, compile all of them against git and only run the\ntests that can possibly be impacted by PCRE2.\n\nSuggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nSigned-off-by: Hamza Mahfooz <someguy@effective-light.com>\n---\nv2: use 'ref' instead of doing a manual checkout and add jobname to\n    the env.\n\nv3: make the changes suggested by Ævar.\n---\n .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++\n 1 file changed, 33 insertions(+)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 6ed6a9e807..e30cf6155e 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -319,3 +319,36 @@ jobs:\n     - uses: actions/checkout@v2\n     - run: ci/install-dependencies.sh\n     - run: ci/test-documentation.sh\n+  pcre2:\n+    needs: ci-config\n+    if: needs.ci-config.outputs.enabled == 'yes'\n+    strategy:\n+      fail-fast: false\n+      matrix:\n+        jit: ['--enable-jit', '--disable-jit']\n+        unicode: ['--enable-unicode', '--disable-unicode']\n+        version:\n+        - 'pcre2-10.20'\n+        - 'pcre2-10.31'\n+        - 'pcre2-10.34'\n+        - 'pcre2-10.36'\n+        - '`git tag -l --sort=-version:refname | head -n 1`'\n+    env:\n+      jobname: linux-gcc-default\n+    runs-on: ubuntu-latest\n+    steps:\n+    - uses: actions/checkout@v2\n+    - run: echo \"VER=${{matrix.version}}\" >>$GITHUB_ENV\n+    - uses: actions/checkout@v2\n+      with:\n+        repository: 'PhilipHazel/pcre2'\n+        path: 'compat/pcre2-repo'\n+        ref: ${{env.VER}}\n+    - run: ci/install-dependencies.sh\n+    - run: |\n+        cd compat/pcre2-repo &&\n+        ./autogen.sh &&\n+        ./configure ${{matrix.jit}} ${{matrix.unicode}} --prefix=\"$PWD/inst\" &&\n+        make install\n+    - run: make USE_LIBPCRE=Y LIBPCREDIR=\"$PWD/compat/pcre2-repo/inst\"\n+    - run: cd t && make *{grep,log,pickaxe}*\n-- \n2.34.0\n\n"}]}