File tree Expand file tree Collapse file tree 6 files changed +32
-11
lines changed
Expand file tree Collapse file tree 6 files changed +32
-11
lines changed Original file line number Diff line number Diff line change 55 pull_request :
66 workflow_dispatch :
77
8+ defaults :
9+ run :
10+ shell : bash
11+
812jobs :
913 build-autoconf :
1014 name : linux-autoconf
4145 toolchain :
4246 - linux-gcc
4347 - macos-clang
44- - windows-msvc
48+ - windows-msvc-shared
49+ - windows-msvc-static
4550
4651 configuration :
4752 - Release
5560 os : macos-latest
5661 compiler : clang
5762
58- - toolchain : windows-msvc
63+ - toolchain : windows-msvc-shared
64+ os : windows-latest
65+ compiler : msvc
66+
67+ - toolchain : windows-msvc-static
5968 os : windows-latest
6069 compiler : msvc
6170
@@ -64,10 +73,22 @@ jobs:
6473 uses : actions/checkout@v4
6574
6675 - name : Configure (${{ matrix.configuration }})
67- run : cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
76+ run : |
77+ if [ "${{ matrix.toolchain }}" == "windows-msvc-shared" ]; then
78+ cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_SHARED_LIBS=ON
79+ elif [ "${{ matrix.toolchain }}" == "windows-msvc-static" ]; then
80+ cmake -S . -Bbuild -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON -DBASH_EXECUTABLE="C:/Program Files/Git/bin/bash.exe" -DBUILD_SHARED_LIBS=OFF
81+ else
82+ cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DBUILD_TESTING=ON
83+ fi
6884
6985 - name : Build with ${{ matrix.compiler }}
70- run : cmake --build build
86+ run : |
87+ if [ "${{ matrix.compiler }}" == "msvc" ]; then
88+ cmake --build build --config ${{ matrix.configuration }}
89+ else
90+ cmake --build build
91+ fi
7192
7293 - name : Test
73- run : cd build && ctest -V .
94+ run : ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ readonly SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
2020" ${SHPDUMP:- $top_builddir / shpdump} " -precision 8 " test" > " test.out"
2121
2222
23- if result=$( diff " $SCRIPTDIR /expect.out" " test.out" ) ; then
23+ if result=$( diff --strip-trailing-cr " $SCRIPTDIR /expect.out" " test.out" ) ; then
2424 echo " ******* Test Succeeded *********"
2525 exit 0
2626else
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ double xshift = 0, yshift = 0; /* NO SHIFT */
107107/* -------------------------------------------------------------------- */
108108void setext (char * pt , const char * ext )
109109{
110- int i = strlen (pt ) - 1 ;
110+ int i = ( int )( strlen (pt ) - 1 ) ;
111111 for (; i > 0 && pt [i ] != '.' && pt [i ] != '/' && pt [i ] != '\\' ; i -- )
112112 {
113113 }
@@ -278,7 +278,7 @@ void mergefields()
278278int strncasecmp2 (char * s1 , char * s2 , int n )
279279{
280280 if (n < 1 )
281- n = strlen (s1 ) + 1 ;
281+ n = ( int )( strlen (s1 ) + 1 ) ;
282282
283283 for (int i = 0 ; i < n ; i ++ )
284284 {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ echo -------------------------------------------------------------------------
3434} > s1.out
3535
3636
37- if result=$( diff " $EXPECT " " s1.out" ) ; then
37+ if result=$( diff --strip-trailing-cr " $EXPECT " " s1.out" ) ; then
3838 echo " ******* Stream 1 Succeeded *********"
3939 exit 0
4040else
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13; do
1212 " ${SHPDUMP:- ./ shpdump} " test${i} .shp
1313done > " s2.out"
1414
15- if result=$( diff " $EXPECT " " s2.out" ) ; then
15+ if result=$( diff --strip-trailing-cr " $EXPECT " " s2.out" ) ; then
1616 echo " ******* Stream 2 Succeeded *********"
1717 exit 0
1818else
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ readonly EXPECT="${1:-$SCRIPTDIR/expect3.out}"
2727" ${DBFDUMP:- ./ dbfdump} " test.dbf
2828} > s3.out
2929
30- if result=$( diff " $EXPECT " " s3.out" ) ; then
30+ if result=$( diff --strip-trailing-cr " $EXPECT " " s3.out" ) ; then
3131 echo " ******* Stream 3 Succeeded *********"
3232 exit 0
3333else
You can’t perform that action at this time.
0 commit comments