forked from duckdb/duckdb-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (90 loc) · 2.76 KB
/
main.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
linux:
name: CentOS 7
runs-on: ubuntu-latest
container: centos:7
steps:
- name: Install
run: |
yum install -y gcc gcc-c++ make python3 postgresql-server sudo wget perl zlib-devel
- name: Install OpenSSL 1.1.1
shell: bash
run: |
wget --no-check-certificate https://www.openssl.org/source/openssl-1.1.1t.tar.gz
tar -xf openssl-1.1.1t.tar.gz
cd openssl-1.1.1t
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl no-shared zlib-dynamic
make
make install
echo "/usr/local/ssl/lib" > /etc/ld.so.conf.d/openssl-1.1.1t.conf
ldconfig -v
- name: Install recent git yay
run: |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum install -y git
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Postgres
run: |
mkdir pgdata
chown postgres pgdata
sudo -u postgres initdb -D pgdata
sudo -u postgres pg_ctl -D pgdata start
sleep 5
sudo -u postgres createuser root -s
createdb
psql -c "SELECT 42"
- name: Install even more
run: |
curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py
python3 get-pip.py --user
python3 -m pip install awscli cmake --upgrade --user
- name: Update DuckDB submodule
run: |
git config --global --add safe.directory '*'
git submodule init
git submodule update --remote --merge
- name: Build
run: |
export OPENSSL_ROOT_DIR=/usr/local/ssl
export PATH=/github/home/.local/bin:$PATH
make release
- name: Test
run: |
psql -c "SELECT 43"
source ./create-postgres-tables.sh
./build/release/test/unittest --test-dir . "[postgres_scanner]"
- uses: actions/upload-artifact@v3
with:
name: postgres-scanner-linux
path: |
build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension
windows:
name: Windows (64-bit)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install
shell: bash
run: |
choco install openssl -y --force
- name: Build
shell: bash
run: |
make release
- name: Test
shell: bash
run: |
./build/release/test/Debug/unittest --test-dir . test/postgres_scanner/aws-rds.test
- uses: actions/upload-artifact@v3
with:
name: postgres-scanner-windows
path: |
build/release/extension/postgres_scanner/postgres_scanner.duckdb_extension