Tiny documentation/comment fixes #1269
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Prepare | |
run: ./autogen.sh | |
- name: Configure | |
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 | |
- name: Build | |
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror' | |
- 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 | |
alpine: | |
name: alpine | |
runs-on: ubuntu-latest | |
container: alpine | |
steps: | |
- name: Setup | |
run: apk add --no-cache automake autoconf gcc libtool make musl-dev git #musl-locales | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Prepare | |
run: ./autogen.sh | |
- name: Configure | |
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 | |
- name: Build | |
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror' | |
- 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 | |
macos: | |
name: macOS universal | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Configure | |
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS='-Wall -Wextra' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build | |
- name: Build | |
run: cmake --build build | |
- name: Test (main test script) | |
run: | | |
cd build | |
../RunTest | |
- name: Test (JIT test program) | |
run: | | |
cd build | |
./pcre2_jit_test | |
- name: Test (pcre2grep test script) | |
run: | | |
cd build | |
../RunGrepTest | |
- name: Test (pcre2posix program) | |
run: | | |
cd build | |
./pcre2posix_test -v | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
arch: ["Win32", "x64"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Configure | |
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A ${{ matrix.arch }} | |
- name: Build | |
run: cmake --build build --config Release | |
- name: Test | |
id: test | |
run: | | |
cd build | |
ctest -C Release . | |
- name: Debug | |
if: ${{ failure() && steps.test.outcome == 'failure' }} | |
run: type build/Testing/Temporary/LastTest.log | |
coverage: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Configure | |
run: CC="clang -fprofile-instr-generate -fcoverage-mapping" cmake -DCMAKE_BUILD_TYPE=Debug -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -B build | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
run: LLVM_PROFILE_FILE="coverage-%m.profraw" cmake --build build --target test | |
- name: Report | |
run: | | |
LLVM_VER=`clang --version | head -n1 | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f1` | |
echo "Using LLVM version $LLVM_VER" | |
# Merge the profiles gathered | |
cd build | |
llvm-profdata-$LLVM_VER merge -sparse coverage-*.profraw -o coverage.profdata | |
# Output HTML, for archiving and browsing later | |
llvm-cov-$LLVM_VER show \ | |
-format=html -output-dir=coverage-report -show-line-counts-or-regions -show-branches=percent \ | |
-instr-profile=coverage.profdata \ | |
./pcre2test -object ./pcre2grep -object ./pcre2posix_test -object ./pcre2_jit_test \ | |
../src/ ./ | |
# Output LCOV-compatible output, for downstream tools | |
llvm-cov-$LLVM_VER export \ | |
-format=lcov \ | |
-instr-profile=coverage.profdata \ | |
./pcre2test -object ./pcre2grep -object ./pcre2posix_test -object ./pcre2_jit_test \ | |
../src/ ./ \ | |
> ./coverage-lcov.info | |
# Output text summary to build log | |
echo '```' > "$GITHUB_STEP_SUMMARY" | |
llvm-cov-$LLVM_VER report \ | |
-instr-profile=coverage.profdata \ | |
./pcre2test -object ./pcre2grep -object ./pcre2posix_test -object ./pcre2_jit_test \ | |
../src/ ./ \ | |
>> "$GITHUB_STEP_SUMMARY" | |
echo '```' >> "$GITHUB_STEP_SUMMARY" | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "Coverage report" | |
path: './build/coverage-report' | |
if-no-files-found: error |