File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,28 @@ jobs:
129
129
matrix :
130
130
arch : ["Win32", "x64"]
131
131
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
+
132
145
- name : Checkout
133
146
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
134
147
with :
135
148
submodules : true
136
149
137
150
- 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 }}
139
154
140
155
- name : Build
141
156
run : cmake --build build --config Release
Original file line number Diff line number Diff line change @@ -728,7 +728,7 @@ echo "---------------------------- Test 131 -----------------------------" >>tes
728
728
echo " RC=$? " >> testtrygrep
729
729
730
730
echo " ---------------------------- 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
732
732
echo " RC=$? " >> testtrygrep
733
733
734
734
echo " ---------------------------- Test 133 -----------------------------" >> testtrygrep
Original file line number Diff line number Diff line change @@ -693,7 +693,7 @@ echo RC=^%ERRORLEVEL%>>testtrygrep
693
693
echo ---------------------------- Test 132 ----------------------------->> testtrygrep
694
694
:: The Unix tests use fd3 here, but Windows only has StdIn/StdOut/StdErr (which, at the kernel
695
695
:: 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
697
697
echo RC=^ %ERRORLEVEL% >> testtrygrep
698
698
699
699
echo ---------------------------- Test 133 ----------------------------->> testtrygrep
You can’t perform that action at this time.
0 commit comments