forked from MobilityDB/MobilityDB
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (73 loc) · 2.09 KB
/
windows_msys2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build for Windows
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/windows_msys2.yml'
- 'cmake/**'
- 'meos/**'
- 'mobilitydb/**'
- 'postgis/**'
- 'CMakeLists.txt'
branch_ignore: gh-pages
pull_request:
paths:
- '.github/workflows/windows_msys2.yml'
- 'cmake/**'
- 'meos/**'
- 'mobilitydb/**'
- 'postgis/**'
- 'CMakeLists.txt'
branch_ignore: gh-pages
jobs:
build:
name: windows
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: 'Setup'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-postgresql
mingw-w64-ucrt-x86_64-postgis
mingw-w64-ucrt-x86_64-gsl
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
- name: Build
run: |
cd build
cmake --build .
cmake --install .
- name: Test install
run: |
# Create a new PostgreSQL database cluster
export PGDATA="D:/a/_temp/msys64/usr/local/pgsql/data"
initdb
# Configure PostgreSQL for MobilityDB
{
echo "port = 5432"
echo "shared_preload_libraries = 'postgis-3.dll'"
echo "max_locks_per_transaction = 128"
} >> "${PGDATA}/postgresql.conf"
# Start PostgreSQL
pg_ctl start
# Create database and add the MobilityDB extension
createdb -U runneradmin mydb
psql -p 5432 -U runneradmin -d mydb -c "CREATE EXTENSION mobilitydb CASCADE; SELECT postgis_full_version(); SELECT mobilitydb_full_version(); SELECT tfloat '[1@2000-01-01]';"
# - name: Run tests
# run: |
# cd build
# ctest --output-on-failure