| | name: Build |
| | on: |
| | workflow_dispatch: |
| | inputs: |
| | job_id: |
| | type: choice |
| | description: Specific job to run |
| | default: all |
| | required: true |
| | options: |
| | - all |
| | - linux |
| | - alpine |
| | - macos |
| | - windows |
| | - freebsd |
| | - openbsd |
| | - solaris |
| | - zos |
| | - distcheck |
| | - coverage |
| | push: |
| | branches: [ main, "release/**" ] |
| | pull_request: |
| | branches: [ main ] |
| |
|
| | permissions: |
| | contents: read |
| |
|
| | env: |
| | CFLAGS_GCC_STYLE: '-Wall -Wextra -pedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings -Wimplicit-fallthrough' |
| | CFLAGS_MSVC: '/W3' |
| | CFLAGS_SOLARIS_CC: '-errtags=yes -erroff=E_STATEMENT_NOT_REACHED' |
| | CMAKE_FLAGS: '-Wdev -Werror=dev -Wdeprecated -Werror=deprecated --warn-uninitialized' |
| |
|
| | jobs: |
| | linux: |
| | name: Linux |
| | runs-on: ubuntu-latest |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'linux') |
| | steps: |
| | - name: Setup |
| | run: | |
| | sudo apt-get -qq update |
| | sudo apt-get -qq install zlib1g-dev libbz2-dev |
| | |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Configure |
| | run: ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-Werror |
| |
|
| | - name: Build |
| | run: make -j3 |
| |
|
| | - name: Test (main test script) |
| | run: ./RunTest |
| |
|
| | - name: Test (JIT test program) |
| | run: ./pcre2_jit_test |
| |
|
| | - name: Test (pcre2grep test script) |
| | run: ./RunGrepTest |
| |
|
| | - name: Test (pcre2posix program) |
| | run: ./pcre2posix_test -v |
| |
|
| | - name: Install |
| | run: | |
| | make install "DESTDIR=`pwd`/install-dir" |
| | maint/RunManifestTest install-dir maint/manifest-makeinstall-linux |
| | maint/RunSymbolTest install-dir/usr/local/lib/ maint/ |
| | |
| | alpine: |
| | name: alpine |
| | runs-on: ubuntu-latest |
| | container: alpine |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'alpine') |
| | steps: |
| | - name: Setup |
| | run: apk add --no-cache automake autoconf gcc libtool make musl-dev git zlib zlib-dev bzip2 bzip2-dev |
| |
|
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Configure |
| | run: ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-Werror |
| |
|
| | - name: Build |
| | run: make -j3 |
| |
|
| | - name: Test (main test script) |
| | run: ./RunTest |
| |
|
| | - name: Test (JIT test program) |
| | run: ./pcre2_jit_test |
| |
|
| | - name: Test (pcre2grep test script) |
| | run: ./RunGrepTest |
| |
|
| | - name: Test (pcre2posix program) |
| | run: ./pcre2posix_test -v |
| |
|
| | - name: Install |
| | run: | |
| | make install "DESTDIR=`pwd`/install-dir" |
| | maint/RunManifestTest install-dir maint/manifest-makeinstall-linux |
| | maint/RunSymbolTest install-dir/usr/local/lib/ maint/ |
| | |
| | macos: |
| | name: macOS universal |
| | runs-on: macos-latest |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'macos') |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Configure |
| | run: cmake $CMAKE_FLAGS -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build |
| |
|
| | - name: Build |
| | run: cd build && make -j3 |
| |
|
| | - name: Test |
| | run: cd build && ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) |
| |
|
| | - name: Install |
| | run: | |
| | cd build |
| | cmake --install . --prefix install-dir |
| | ../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-macos |
| | ../maint/RunSymbolTest install-dir/lib/ ../maint/ |
| | |
| | - name: Test CMake install interface |
| | run: | |
| | INSTALL_PREFIX=`pwd`/build/install-dir |
| | cd maint/cmake-tests/install-interface |
| | |
| | for useStaticLibs in ON OFF; do |
| | echo "== Testing CMake install interface with PCRE2_USE_STATIC_LIBS=$useStaticLibs ==" |
| | rm -rf build |
| | cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" -DPCRE2_USE_STATIC_LIBS=$useStaticLibs -B build |
| | (cd build; make) |
| | ./build/test_executable |
| | otool -L ./build/test_executable |
| | if [ $useStaticLibs = ON ]; then |
| | (otool -L ./build/test_executable | grep -q "pcre2") && (echo "Error: PCRE2 found in otool output" && exit 1) |
| | else |
| | |
| | (otool -L ./build/test_executable | grep -q "@rpath/libpcre2-8.0.dylib") || (echo "Error: Shared library not linked in" && exit 1) |
| | fi |
| | done |
| |
|
| | - name: Test CMake build interface |
| | run: | |
| | BUILD_DIR=`pwd` |
| | cp -rp maint/cmake-tests/build-interface ../cmake-tests-build-interface |
| | cd ../cmake-tests-build-interface |
| | ln -s "$BUILD_DIR" pcre2 |
| | |
| | for buildLibs in "ON;OFF" "OFF;ON"; do |
| | static=`echo $buildLibs | cut -d';' -f1` |
| | shared=`echo $buildLibs | cut -d';' -f2` |
| | echo "== Testing CMake build interface with BUILD_STATIC_LIBS=$static and BUILD_SHARED_LIBS=$shared ==" |
| | rm -rf build |
| | cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DBUILD_STATIC_LIBS=$static -DBUILD_SHARED_LIBS=$shared -B build |
| | (cd build; make) |
| | ./build/test_executable |
| | otool -L ./build/test_executable |
| | if [ $static = ON ]; then |
| | (otool -L ./build/test_executable | grep -q "pcre2") && (echo "Error: PCRE2 found in ldd output" && exit 1) |
| | else |
| | |
| | (otool -L ./build/test_executable | grep -q "@rpath/libpcre2-8.0.dylib") || (echo "Error: Shared library not linked in" && exit 1) |
| | fi |
| | done |
| |
|
| | windows: |
| | name: Windows |
| | runs-on: windows-latest |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'windows') |
| | strategy: |
| | fail-fast: false |
| | matrix: |
| | arch: ["Win32", "x64"] |
| | steps: |
| | - name: Setup |
| | run: | |
| | # GitHub Actions Windows images ship with Git for Windows, which is great, |
| | # but it also pollutes the PATH with a lot of Unix tools which we don't |
| | # want to require as build dependencies. This filters out the Unix tools. |
| | # The GitHub images still include an absolute ton of junk in the PATH, |
| | # but it seems to be rare for unintended dependencies to be added to our |
| | # build scripts, so we can live with it for now. |
| | $PATCHED_PATH = ($env:PATH -split ';' | Where-Object { $_ -notmatch 'C:\\Program Files\\Git\\usr\\bin|C:\\Program Files\\Git\\mingw64\\bin' }) -join ';' |
| | # We can't seem to use $GITHUB_PATH here because that only allows |
| | # appending to the PATH, not replacing it. |
| | echo "PATH=$PATCHED_PATH" >> "$env:GITHUB_ENV" |
| | |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Configure |
| | run: | |
| | echo "PATH=$env:PATH" |
| | cmake $CMAKE_FLAGS -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DCMAKE_C_FLAGS="$CFLAGS_MSVC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A ${{ matrix.arch }} |
| | |
| | - name: Build |
| | run: cmake --build build --config Release |
| |
|
| | - name: Test |
| | run: cd build && ctest -C Release -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) |
| |
|
| | - name: Install |
| | run: | |
| | cd build |
| | cmake --install . --config Release --prefix install-dir |
| | ../maint/RunManifestTest.ps1 install-dir ../maint/manifest-cmakeinstall-windows |
| | ../maint/RunSymbolTest.ps1 install-dir/bin ../maint/ |
| | |
| | - name: Test CMake install interface |
| | run: | |
| | $INSTALL_PREFIX = (pwd).Path + "\build\install-dir" |
| | cd maint/cmake-tests/install-interface |
| | |
| | $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" |
| | $dumpbin = & $vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe | Select-Object -First 1 |
| |
|
| | foreach ($useStaticLibs in @("ON", "OFF")) { |
| | echo "== Testing CMake install interface with PCRE2_USE_STATIC_LIBS=$useStaticLibs ==" |
| | if (Test-Path build) { rm -Recurse -Force build } |
| | cmake $CMAKE_FLAGS "-DCMAKE_PREFIX_PATH=$INSTALL_PREFIX" "-DPCRE2_USE_STATIC_LIBS=$useStaticLibs" -B build -A ${{ matrix.arch }} |
| | cmake --build build --config Release |
| | ./build/Release/test_executable.exe |
| | & $dumpbin /dependents ./build/Release/test_executable.exe |
| | if ($useStaticLibs -eq "ON") { |
| | if ((& $dumpbin /dependents ./build/Release/test_executable.exe | Out-String).Contains("pcre2")) { |
| | Write-Error "Error: PCRE2 found in dumpbin output" |
| | exit 1 |
| | } |
| | } else { |
| | |
| | if (-not ((& $dumpbin /dependents ./build/Release/test_executable.exe | Out-String).Contains("pcre2-8.dll"))) { |
| | Write-Error "Error: Shared library not linked in" |
| | exit 1 |
| | } |
| | } |
| | } |
| |
|
| | - name: Test CMake build interface |
| | run: | |
| | $BUILD_DIR = (pwd).Path |
| | cp -Recurse -Path maint/cmake-tests/build-interface ../cmake-tests-build-interface |
| | cd ../cmake-tests-build-interface |
| | New-Item -ItemType SymbolicLink -Path "pcre2" -Target "$BUILD_DIR" |
| | |
| | $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" |
| | $dumpbin = & $vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe | Select-Object -First 1 |
| |
|
| | foreach ($buildLibs in @(@{static="ON"; shared="OFF"}, @{static="OFF"; shared="ON"})) { |
| | echo "== Testing CMake build interface with BUILD_STATIC_LIBS=$($buildLibs.static) ==" |
| | if (Test-Path build) { rm -Recurse -Force build } |
| | cmake $CMAKE_FLAGS "-DBUILD_STATIC_LIBS=$($buildLibs.static)" "-DBUILD_SHARED_LIBS=$($buildLibs.shared)" -B build -A ${{ matrix.arch }} |
| | cmake --build build --config Debug |
| | ./build/Debug/test_executable.exe |
| | & $dumpbin /dependents ./build/Debug/test_executable.exe |
| | if ($buildLibs.static -eq "ON") { |
| | if ((& $dumpbin /dependents ./build/Debug/test_executable.exe | Out-String).Contains("pcre2")) { |
| | Write-Error "Error: PCRE2 found in dumpbin output" |
| | exit 1 |
| | } |
| | } else { |
| | |
| | if (-not ((& $dumpbin /dependents ./build/Debug/test_executable.exe | Out-String).Contains("pcre2-8d.dll"))) { |
| | Write-Error "Error: Shared library not linked in" |
| | exit 1 |
| | } |
| | } |
| | } |
| |
|
| | freebsd: |
| | name: FreeBSD |
| | runs-on: ubuntu-latest |
| | if: | |
| | (github.event_name == 'workflow_dispatch' && (inputs.job_id == 'all' || inputs.job_id == 'freebsd')) || |
| | github.event_name == 'push' |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Build & test |
| | uses: vmactions/freebsd-vm@0cd283ca698d48b59cda444a9948f48a30709627 |
| | with: |
| | envs: 'CFLAGS_GCC_STYLE CMAKE_FLAGS' |
| | usesh: true |
| | prepare: | |
| | set -e |
| | pkg install -y cmake |
| | |
| | run: | |
| | set -e |
| | |
| | cp -rp . ../build-autoconf |
| | cp -rp . ../build-cmake |
| |
|
| | echo "== Autoconf ==" |
| | cd ../build-autoconf |
| |
|
| | ./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-Werror |
| | make -j3 |
| | (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc) |
| |
|
| | make install "DESTDIR=`pwd`/install-dir" |
| | maint/RunManifestTest install-dir maint/manifest-makeinstall-freebsd |
| | maint/RunSymbolTest install-dir/usr/local/lib/ maint/ |
| |
|
| | echo "== CMake ==" |
| | cd ../build-cmake |
| |
|
| | cmake $CMAKE_FLAGS -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build |
| | cd build |
| | make -j3 |
| | ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) |
| | cmake --install . --prefix install-dir |
| | ../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-freebsd |
| | ../maint/RunSymbolTest install-dir/lib/ ../maint/ |
| |
|
| | openbsd: |
| | name: OpenBSD |
| | runs-on: ubuntu-latest |
| | if: | |
| | (github.event_name == 'workflow_dispatch' && (inputs.job_id == 'all' || inputs.job_id == 'openbsd')) || |
| | github.event_name == 'push' |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Build & test |
| | uses: vmactions/openbsd-vm@7fd5a3e251db9d8bdff2f34aae11a43b6be5ad60 |
| | with: |
| | envs: 'CFLAGS_GCC_STYLE CMAKE_FLAGS' |
| | usesh: true |
| | prepare: | |
| | set -e |
| | pkg_add cmake |
| | |
| | run: | |
| | set -e |
| | |
| | export MALLOC_OPTIONS="USRJGFC>>" |
| | EXTRA_CFLAGS="-DSLJIT_WX_EXECUTABLE_ALLOCATOR" |
| |
|
| | cp -rp . ../build-autoconf |
| | cp -rp . ../build-cmake |
| |
|
| | echo "== Autoconf ==" |
| | cd ../build-autoconf |
| |
|
| | ./configure CFLAGS="$CFLAGS_GCC_STYLE $EXTRA_CFLAGS" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-Werror |
| | make -j3 |
| | (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc) |
| |
|
| | make install "DESTDIR=`pwd`/install-dir" |
| | |
| | |
| | |
| | |
| |
|
| | echo "== CMake ==" |
| | cd ../build-cmake |
| |
|
| | cmake $CMAKE_FLAGS -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE $EXTRA_CFLAGS" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build |
| | cd build |
| | make -j3 |
| | ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) |
| | cmake --install . --prefix install-dir |
| | |
| | |
| |
|
| | solaris: |
| | name: Solaris |
| | runs-on: ubuntu-latest |
| | if: | |
| | (github.event_name == 'workflow_dispatch' && (inputs.job_id == 'all' || inputs.job_id == 'solaris')) || |
| | github.event_name == 'push' |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Transfer Oracle Studio certificates |
| | env: |
| | PKG_ORACLE_COM_CERTIFICATE_PEM: ${{ secrets.PKG_ORACLE_COM_CERTIFICATE_PEM }} |
| | PKG_ORACLE_COM_KEY_PEM: ${{ secrets.PKG_ORACLE_COM_KEY_PEM }} |
| | run: | |
| | printenv PKG_ORACLE_COM_CERTIFICATE_PEM > pkg.oracle.com.certificate.pem |
| | printenv PKG_ORACLE_COM_KEY_PEM > pkg.oracle.com.key.pem |
| | |
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Build & test |
| | uses: vmactions/solaris-vm@47bea106d03acaf91084e52548ee460556011602 |
| | with: |
| | envs: 'CFLAGS_SOLARIS_CC CMAKE_FLAGS' |
| | usesh: true |
| | |
| | |
| | |
| | |
| | prepare: | |
| | set -e |
| | cp "$GITHUB_WORKSPACE/pkg.oracle.com.key.pem" /root/pkg.oracle.com.key.pem |
| | cp "$GITHUB_WORKSPACE/pkg.oracle.com.certificate.pem" /root/pkg.oracle.com.certificate.pem |
| | sudo pkg set-publisher \ |
| | -k /root/pkg.oracle.com.key.pem \ |
| | -c /root/pkg.oracle.com.certificate.pem \ |
| | -G "*" -g https://pkg.oracle.com/solarisstudio/release solarisstudio |
| | pkg install developer/build/make developer/build/cmake system/header |
| | pkg install --accept developerstudio-126/cc |
| | |
| | run: | |
| | set -e |
| | PATH=/opt/developerstudio12.6/bin:"$PATH" |
| | export PATH |
| | |
| | cp -rp . ../build-autoconf-32 |
| | cp -rp . ../build-autoconf-64 |
| | cp -rp . ../build-cmake-64 |
| |
|
| | echo "== Autoconf, 32-bit ==" |
| | cd ../build-autoconf-32 |
| |
|
| | ./configure CC="cc -m32" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn |
| | make |
| | (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc) |
| |
|
| | make install "DESTDIR=`pwd`/install-dir" |
| | maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris |
| | maint/RunSymbolTest install-dir/usr/local/lib/ maint/ |
| |
|
| | echo "== Autoconf, 64-bit ==" |
| | cd ../build-autoconf-64 |
| |
|
| | ./configure CC="cc -m64" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn |
| | make |
| | (make check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc) |
| |
|
| | make install "DESTDIR=`pwd`/install-dir" |
| | maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris |
| | maint/RunSymbolTest install-dir/usr/local/lib/ maint/ |
| |
|
| | echo "== CMake, 64-bit ==" |
| | cd ../build-cmake-64 |
| |
|
| | CC="cc -m64" cmake $CMAKE_FLAGS -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_SOLARIS_CC" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build |
| | cd build |
| | make |
| | ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) |
| | cmake --install . --prefix install-dir |
| | ../maint/RunManifestTest install-dir ../maint/manifest-cmakeinstall-solaris |
| | ../maint/RunSymbolTest install-dir/lib/ ../maint/ |
| |
|
| | zos: |
| | name: z/OS |
| | runs-on: ubuntu-latest |
| | |
| | if: | |
| | (github.event_name == 'workflow_dispatch' && (inputs.job_id == 'all' || inputs.job_id == 'zos')) |
| | concurrency: |
| | group: zos-ssh-build |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: ./autogen.sh |
| |
|
| | - name: Build & test |
| | env: |
| | ZOS_HOST: ${{ secrets.ZOS_HOST }} |
| | ZOS_PORT: ${{ secrets.ZOS_PORT }} |
| | ZOS_PRIVATE_KEY: ${{ secrets.ZOS_PRIVATE_KEY }} |
| | ZOS_KNOWN_HOSTS: ${{ secrets.ZOS_KNOWN_HOSTS }} |
| | run: | |
| | (umask 0077 && printenv ZOS_PRIVATE_KEY > id_rsa_zos) |
| | mkdir -p ~/.ssh |
| | printenv ZOS_KNOWN_HOSTS > ~/.ssh/known_hosts |
| | |
| | tar czf ../pcre2-build.tar.gz --exclude=.git . |
| | mv ../pcre2-build.tar.gz . |
| |
|
| | scp -i id_rsa_zos -P "$ZOS_PORT" pcre2-build.tar.gz "$ZOS_HOST:/data/" |
| | ssh -i id_rsa_zos -p "$ZOS_PORT" "$ZOS_HOST" /data/zopen/usr/local/bin/bash -c \ |
| | 'export _BPXK_AUTOCVT=ON; |
| | export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"; |
| | export _TAG_REDIR_ERR=txt; |
| | export _TAG_REDIR_IN=txt; |
| | export _TAG_REDIR_OUT=txt; |
| | export PATH="/data/zopen/usr/local/bin:/data/zopen/usr/bin:/data/zopen/bin:/data/zopen/boot:/bin:/usr/lpp/IBM/cnw/v2r1/openxl/bin"; |
| | . /data/zopen/etc/zopen-config; |
| | set -e; |
| | set -x; |
| | cd /data; |
| | |
| | echo "== Autoconf, XLC compiler =="; |
| | rm -rf pcre2-build; |
| | mkdir pcre2-build; |
| | gtar xzf pcre2-build.tar.gz -C pcre2-build; |
| | cd pcre2-build; |
| | chtag -R -tc ISO8859-1 .; |
| | MAKE=gmake CC=xlc ./configure --enable-ebcdic --disable-unicode; |
| | gmake; |
| | (gmake check; rc=$?; for i in test-suite.log Run*Test.log pcre2*_test.log; do echo "== $i =="; cat $i; done; exit $rc); |
| | |
| | echo "== CMake, IBM-Clang -m64 compiler =="; |
| | cd ..; |
| | rm -rf pcre2-build; |
| | mkdir pcre2-build; |
| | gtar xzf pcre2-build.tar.gz -C pcre2-build; |
| | cd pcre2-build; |
| | chtag -R -tc ISO8859-1 .; |
| | cmake $CMAKE_FLAGS -G Ninja -DPCRE2_EBCDIC=ON -DPCRE2_SUPPORT_UNICODE=OFF -DCMAKE_C_COMPILER=ibm-clang -DCMAKE_C_FLAGS="-m64 $CFLAGS_GCC_STYLE" -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build |
| | cd build; |
| | ninja; |
| | ctest -j3 --output-on-failure; && (cat ./Testing/Temporary/LastTest.log || true) |
| | ' |
| |
|
| | distcheck: |
| | name: Build & verify distribution |
| | runs-on: ubuntu-latest |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'distcheck') |
| | permissions: |
| | id-token: write |
| | attestations: write |
| | contents: read |
| | steps: |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Prepare |
| | run: | |
| | ./autogen.sh |
| | |
| | |
| | |
| | |
| | chmod u=rw,go=r m4/*.m4 |
| |
|
| | - name: Configure |
| | run: ./configure |
| |
|
| | - name: Distcheck |
| | run: make distcheck -j3 |
| |
|
| | - name: Manifest |
| | run: | |
| | mkdir tarball-dir |
| | tar -C tarball-dir -xzf pcre2-*.tar.gz |
| | # Budge the directory, so we don't bake the version number into the |
| | # `manifest-tarball` file: |
| | mv tarball-dir/pcre2-* tarball-dir/pcre2-SNAPSHOT |
| | maint/RunManifestTest tarball-dir maint/manifest-tarball |
| | |
| | - name: Upload to GitHub artifacts |
| | uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 |
| | with: |
| | name: "Distribution release" |
| | path: | |
| | pcre2-*.tar.bz2 |
| | pcre2-*.tar.gz |
| | pcre2-*.zip |
| | if-no-files-found: error |
| |
|
| | - name: Attest |
| | uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a |
| | if: | |
| | github.event_name != 'pull_request' && |
| | (startsWith(github.ref, 'refs/heads/release/') || |
| | startsWith(github.ref, 'refs/tags/pcre2-')) |
| | with: |
| | subject-path: 'pcre2-*.tar.bz2, pcre2-*.tar.gz, pcre2-*.zip' |
| |
|
| | coverage: |
| | name: Code coverage |
| | runs-on: ubuntu-latest |
| | if: github.event_name != 'workflow_dispatch' || (inputs.job_id == 'all' || inputs.job_id == 'coverage') |
| | steps: |
| | - name: Setup |
| | run: | |
| | sudo apt-get -qq update |
| | sudo apt-get -qq install zlib1g-dev libbz2-dev libedit-dev lcov |
| | |
| | - name: Checkout |
| | uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 |
| | with: |
| | submodules: true |
| |
|
| | - name: Configure |
| | |
| | |
| | run: CC="clang -fprofile-instr-generate -fcoverage-mapping" cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DPCRE2_DEBUG=OFF -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DPCRE2_SUPPORT_LIBEDIT=ON -DPCRE2_SUPPORT_LIBREADLINE=OFF -B build |
| |
|
| | - name: Build |
| | run: cd build && make -j3 |
| |
|
| | - name: Test |
| | run: | |
| | cd build |
| | ../maint/RunCoverage |
| | |
| | - name: Upload report to GitHub artifacts |
| | uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 |
| | with: |
| | name: "Coverage report" |
| | path: './build/coverage-html' |
| | if-no-files-found: error |
| |
|
| | - name: Upload report to Codecov |
| | uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 |
| | with: |
| | token: ${{ secrets.CODECOV_TOKEN }} |
| | fail_ci_if_error: true |
| | disable_search: true |
| | files: ./build/coverage-lcov.info |
| |
|