File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,28 @@ jobs:
129129 matrix :
130130 arch : ["Win32", "x64"]
131131 steps :
132+ - name : Setup
133+ run : |
134+ # GitHub Actions Windows images ship with Git for Windows, which is great,
135+ # but it also pollutes the PATH with a lot of Unix tools which we don't
136+ # want to require as build dependencies. This filters out the Unix tools.
137+ # The GitHub images still include an absolute ton of junk in the PATH,
138+ # but it seems to be rare for unintended dependencies to be added to our
139+ # build scripts, so we can live with it for now.
140+ $PATCHED_PATH = ($env:PATH -split ';' | Where-Object { $_ -notmatch 'C:\\Program Files\\Git\\usr\\bin|C:\\Program Files\\Git\\mingw64\\bin' }) -join ';'
141+ # We can't seem to use $GITHUB_PATH here because that only allows
142+ # appending to the PATH, not replacing it.
143+ echo "PATH=$PATCHED_PATH" >> "$env:GITHUB_ENV"
144+
132145 - name : Checkout
133146 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134147 with :
135148 submodules : true
136149
137150 - name : Configure
138- run : cmake -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 }}
151+ run : |
152+ echo "PATH=$env:PATH"
153+ cmake -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 }}
139154
140155 - name : Build
141156 run : cmake --build build --config Release
Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ echo "---------------------------- Test 131 -----------------------------" >>tes
728728echo " RC=$? " >> testtrygrep
729729
730730echo " ---------------------------- Test 132 -----------------------------" >> testtrygrep
731- (cd $srcdir ; exec 3< testdata/grepinput; $valgrind $vjs $pcre2grep -m1 -A3 ' ^match' < & 3; echo ' ---' ; head -1 < & 3; exec 3< & -) >> testtrygrep 2>&1
731+ (cd $srcdir ; exec 3< testdata/grepinput; $valgrind $vjs $pcre2grep -m1 -A3 ' ^match' < & 3; echo ' ---' ; $valgrind $vjs $pcre2grep -m1 ' .* ' < & 3; exec 3< & -) >> testtrygrep 2>&1
732732echo " RC=$? " >> testtrygrep
733733
734734echo " ---------------------------- Test 133 -----------------------------" >> testtrygrep
Original file line number Diff line number Diff line change @@ -693,7 +693,7 @@ echo RC=^%ERRORLEVEL%>>testtrygrep
693693echo ---------------------------- Test 132 ----------------------------->> testtrygrep
694694:: The Unix tests use fd3 here, but Windows only has StdIn/StdOut/StdErr (which, at the kernel
695695:: level, are not even numbered). Use a subshell instead.
696- (pushd %srcdir% & (%pcre2grep% -m1 -A3 " ^match" & echo ---& head -1 ) < testdata/grepinput & popd) >> testtrygrep 2 >& 1
696+ (pushd %srcdir% & (%pcre2grep% -m1 -A3 " ^match" & echo ---& %pcre2grep% -m1 " .* " ) < testdata/grepinput & popd) >> testtrygrep 2 >& 1
697697echo RC=^ %ERRORLEVEL% >> testtrygrep
698698
699699echo ---------------------------- Test 133 ----------------------------->> testtrygrep
You can’t perform that action at this time.
0 commit comments