Fix windows GH action (#399)

This commit is contained in:
Evan Miller 2022-12-17 05:33:40 -05:00 committed by GitHub
parent 9e1ec2a588
commit 0b96ecaff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 10 deletions

View File

@ -108,19 +108,34 @@ jobs:
MDBPATH: test/data MDBPATH: test/data
windows: windows:
runs-on: windows-latest runs-on: windows-latest
env: strategy:
MSYSTEM: MINGW64 fail-fast: false
matrix:
iconv: [ enable-iconv, disable-iconv]
glib: [ enable-glib, disable-glib ]
defaults:
run:
shell: msys2 {0}
steps: steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
autotools
base-devel
gcc
git
glib2
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Check out test data - name: Check out test data
run: git clone https://github.com/mdbtools/mdbtestdata.git test run: git clone https://github.com/mdbtools/mdbtestdata.git test
- name: Autoconf - name: Autoconf
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && autoreconf -i -f' run: autoreconf -i -f
- name: Configure - name: Configure
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && ./configure' run: ./configure --${{ matrix.glib }} --${{ matrix.iconv }}
- name: Make - name: Make
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && make' run: make
- name: Test - name: Test
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && bash -e -x ./test_script.sh' run: bash -e -x ./test_script.sh
- name: SQL Test - name: SQL Test
run: C:\msys64\usr\bin\bash -c -l 'cd "$GITHUB_WORKSPACE" && bash -e -x ./test_sql.sh' run: bash -e -x ./test_sql.sh

View File

@ -86,7 +86,7 @@ AC_SUBST(LFLAGS)
CFLAGS="$CFLAGS -Wall -Werror" CFLAGS="$CFLAGS -Wall -Werror"
LOCALE_T=locale_t LOCALE_T=locale_t
AS_CASE([$host], AS_CASE([$host],
[*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" LOCALE_T=_locale_t], []) [*mingw*], [LDFLAGS="$LDFLAGS -no-undefined" CFLAGS="$CFLAGS -D_spawnv=spawnv"], [])
AC_SUBST(LOCALE_T) AC_SUBST(LOCALE_T)
dnl See if iconv is present and wanted dnl See if iconv is present and wanted

View File

@ -304,7 +304,7 @@ find_sql_terminator(char *s)
} }
sp = &s[len-1]; sp = &s[len-1];
while (sp > s && isspace(*sp)) { while (sp > s && isspace((int)*sp)) {
sp--; sp--;
} }
@ -464,7 +464,7 @@ main(int argc, char **argv)
if (in) { if (in) {
fprintf(stderr, "Can not handle nested opens\n"); fprintf(stderr, "Can not handle nested opens\n");
} else { } else {
while (*fname && isspace(*fname)) while (*fname && isspace((int)*fname))
fname++; fname++;
if (!(in = fopen(fname, "r"))) { if (!(in = fopen(fname, "r"))) {
fprintf(stderr,"Unable to open file %s\n", fname); fprintf(stderr,"Unable to open file %s\n", fname);