Skip to content

Commit

Permalink
GH actions: Add test for MSYS2 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lfittl committed Jan 1, 2024
1 parent 4117d10 commit e54f95c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: make $FLAGS
env:
FLAGS: ${{ format('{0} {1} {2}', steps.make_flags.outputs.proto_flags, steps.make_flags.outputs.compiler_flags, steps.make_flags.outputs.debug_flags) }}
build_windows:
build_windows_msvc:
runs-on: windows-latest
strategy:
fail-fast: false
Expand All @@ -86,3 +86,21 @@ jobs:
uses: actions/checkout@v4
- name: Build and run tests
run: nmake /F Makefile.windows
build_windows_msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys: [mingw64, mingw32, ucrt64, clang64]
steps:
- name: Set up MSYS2 and compiler
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
pacboy: openssl:p
- name: Check out code
uses: actions/checkout@v4
- name: Build and run tests
shell: msys2 {0}
run: |
make
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ OBJ_FILES := $(SRC_FILES:.c=.o)

override CFLAGS += -g -I. -I./vendor -I./src/include -I./src/postgres/include -Wall -Wno-unused-function -Wno-unused-value -Wno-unused-variable -fno-strict-aliasing -fwrapv -fPIC

ifeq ($(OS),Windows_NT)
override CFLAGS += -I./src/postgres/include/port/win32
endif

override PG_CONFIGURE_FLAGS += -q --without-readline --without-zlib --without-icu

override TEST_CFLAGS += -g -I. -I./vendor -Wall
Expand Down

0 comments on commit e54f95c

Please sign in to comment.