Skip to content

Commit e3a6871

Browse files
committed
Build and check workflow for MS Windows
1 parent dcdc52f commit e3a6871

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build and Check (windows-latest)
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 0 * * 5'
9+
10+
jobs:
11+
build_and_test:
12+
13+
runs-on: windows-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
pg_version: [10, 11, 12, 13, 14, 15, 16, 17]
19+
use_healpix: [0]
20+
21+
name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }} (windows-latest)
22+
23+
defaults:
24+
run:
25+
shell: msys2 {0}
26+
27+
steps:
28+
29+
- name: Install MSYS2
30+
uses: msys2/setup-msys2@v2
31+
with:
32+
update: true
33+
msystem: mingw64
34+
install: >-
35+
base-devel
36+
curl
37+
git
38+
make
39+
perl
40+
flex
41+
bison
42+
diffutils
43+
mingw-w64-x86_64-zlib
44+
mingw-w64-x86_64-icu
45+
mingw-w64-x86_64-gcc
46+
47+
- name: Install PostgreSQL
48+
run: |
49+
echo "Workspace: ${GITHUB_WORKSPACE}"
50+
git clone --single-branch -b "REL_${{ matrix.pg_version }}_STABLE" git://git.postgresql.org/git/postgresql.git
51+
cd ${GITHUB_WORKSPACE}/postgresql
52+
./configure --enable-cassert --without-icu
53+
make -j$(nproc)
54+
make install
55+
56+
- name: Clone pgSphere
57+
uses: actions/checkout@v4
58+
with:
59+
ref: 'master'
60+
fetch-depth: 1
61+
62+
- name: Build pgSphere
63+
run: |
64+
make --keep-going -j$(nproc) PROFILE='-Werror -Wall' USE_HEALPIX=0
65+
make USE_HEALPIX=0 install
66+
67+
- name: Test pgSphere
68+
run: |
69+
initdb -D pgdata -U postgres
70+
pg_ctl -D pgdata -l postgres.log start
71+
make USE_HEALPIX=0 installcheck
72+
73+
- name: Upload artifacts
74+
uses: actions/upload-artifact@v4
75+
if: success() || failure()
76+
with:
77+
name: ${{ env.GITHUB_REF_SLUG_URL }}-pg${{ matrix.pg_version }}-use-healpix-${{ matrix.use_healpix }}-${{ github.run_id }}
78+
if-no-files-found: ignore
79+
path: |
80+
./**/*.log
81+
./**/*.diffs

0 commit comments

Comments
 (0)