Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,64 +441,3 @@ jobs:

- name: Test
run: bazelisk test //... --enable_runfiles --incompatible_strict_action_env --test_output=all

heron:
# Job to verify that the tasks performed by UpdateAlways have been done. It is
# the committer's responsibility (currently) to run UpdateAlways themselves when
# making a PR, so that everything is kept in-sync.
name: Check autogenerated file freshness
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: false
fetch-depth: 0 # Necessary for maint/UpdateAlways
fetch-tags: false
# Check out the unmerged source branch for `pull_request`-triggered runs;
# otherwise use the tip of the branch for `workflow_dispatch` and `pull` triggers.
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}

- name: UpdateDates
if: |
github.event_name != 'pull_request' &&
(startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/pcre2-'))
run: maint/UpdateDates.py

- name: UpdateAlways
run: maint/UpdateAlways

- name: 'Rebuild *.h.generic'
run: |
./autogen.sh && ./configure

# Workaround for incorrect filesystem permissions on /usr/share/aclocal, which
# causes the m4 macros to be copied with incorrect permissions.
# https://github.com/actions/runner-images/issues/11212
chmod u=rw,go=r m4/*.m4

rm -f src/*.generic
make src/config.h.generic src/pcre2.h.generic

# If we're in a forked repo, it's too onerous to expect contributors to run the
# checks locally to keep these files up to date (since the tool versions are very
# fussy and brittle).
#
# However, we still want to run the steps above, to check that the UpdateAlways
# process is able to run to completion, since it can pick up errors in the man pages.

- name: Commit and push, if not in a forked repo
if: github.event_name != 'pull_request' || ( ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' )
run: |
if [ -n "`git status --porcelain`" ] ; then
# Dirty working tree: push it
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -u
git commit -m "Sync autogenerated files #noupdate"
git push
fi
3 changes: 2 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Deploy Pages
on:
workflow_dispatch:
workflow_run:
workflows: [ 'Sync doc changes' ]
workflows: [ 'Sync' ]
types:
- completed
branches: [ master ]
push:
branches: [ pages ]
pull_request:
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Sync
on:
workflow_dispatch:
push:
branches: [ master, "release/**" ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
sync-autogenerated:
# Job to verify that the tasks performed by UpdateAlways have been done. It is
# the committer's responsibility (currently) to run UpdateAlways themselves when
# making a PR, so that everything is kept in-sync.
name: Check autogenerated file freshness
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: false
fetch-depth: 0 # Necessary for maint/UpdateAlways
fetch-tags: false
# Check out the unmerged source branch for `pull_request`-triggered runs;
# otherwise use the tip of the branch for `workflow_dispatch` and `pull` triggers.
ref: ${{ github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}

- name: UpdateDates
if: |
github.event_name != 'pull_request' &&
(startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/pcre2-'))
run: maint/UpdateDates.py

- name: UpdateAlways
run: maint/UpdateAlways

- name: 'Rebuild *.h.generic'
run: |
./autogen.sh && ./configure

# Workaround for incorrect filesystem permissions on /usr/share/aclocal, which
# causes the m4 macros to be copied with incorrect permissions.
# https://github.com/actions/runner-images/issues/11212
chmod u=rw,go=r m4/*.m4

rm -f src/*.generic
make src/config.h.generic src/pcre2.h.generic

# If we're in a forked repo, it's too onerous to expect contributors to run the
# checks locally to keep these files up to date (since the tool versions are very
# fussy and brittle).
#
# However, we still want to run the steps above, to check that the UpdateAlways
# process is able to run to completion, since it can pick up errors in the man pages.

- name: Commit and push, if not in a forked repo
if: github.event_name != 'pull_request' || ( ! github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' )
run: |
if [ -n "`git status --porcelain`" ] ; then
# Dirty working tree: push it
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -u
git commit -m "Sync autogenerated files #noupdate"
git push
fi

sync-docs:
name: Sync content from master to pages
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
needs: ['sync-autogenerated']
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: false
fetch-depth: 0 # Necessary to get both the master and pages branches
fetch-tags: false
ref: pages

- name: Commit and push, if docs have changed
run: |
if ! git diff --exit-code origin/master -- \
./doc ./AUTHORS.md ./LICENCE.md ./SECURITY.md ./README.md \
./README ./NON-AUTOTOOLS-BUILD >/dev/null ; then
# Differences from master: merge and push
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git merge origin/master --no-edit -m"Sync content from master to pages"
git push
else
echo "No content changes to sync"
fi
36 changes: 0 additions & 36 deletions .github/workflows/syncpages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion m4/pcre2_zos.m4
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ AC_DEFUN([PCRE2_ZOS_FIXES],
fi

fi
])
])
Loading