forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 1
189 lines (162 loc) · 5.44 KB
/
OSX.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: OSX
on:
push:
paths-ignore:
- '**.md'
pull_request:
branches-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/master' || github.sha }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
AWS_ACCESS_KEY_ID: AKIAVBLKPL2ZW2T7TYFQ
AWS_SECRET_ACCESS_KEY: ${{ secrets.NODE_PRE_GYP_SECRETACCESSKEY }}
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
jobs:
xcode-debug:
name: OSX Debug
runs-on: macos-latest
env:
TREAT_WARNINGS_AS_ERRORS: 1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Build
shell: bash
run: make debug
- name: Test
shell: bash
run: make unittestci
- name: Amalgamation
shell: bash
run: |
python scripts/amalgamation.py --extended
python scripts/parquet_amalgamation.py
cd src/amalgamation
clang++ -std=c++11 -O0 -Wall -Werror -emit-llvm -S duckdb.cpp parquet-amalgamation.cpp
clang++ -DNDEBUG -O0 -std=c++11 -Wall -Werror -emit-llvm -S duckdb.cpp parquet-amalgamation.cpp
clang++ -DDEBUG -O0 -std=c++11 -Wall -Werror -emit-llvm -S duckdb.cpp parquet-amalgamation.cpp
xcode-release:
name: OSX Release
runs-on: macos-latest
needs: xcode-debug
env:
BUILD_ICU: 1
BUILD_TPCH: 1
BUILD_FTS: 1
BUILD_JSON: 1
BUILD_EXCEL: 1
BUILD_ODBC: 1
OSX_BUILD_UNIVERSAL: 1
ODBC_CONFIG: ../../build/unixodbc/build/bin/odbc_config
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
- name: Install UnixODBC
shell: bash
run: |
brew remove --ignore-dependencies unixodbc
CFLAGS="-arch x86_64 -arch arm64" ./scripts/install_unixodbc.sh
- name: Build
shell: bash
run: make
- name: Unit Test
shell: bash
run: make allunit
- name: Tools Tests
shell: bash
run: |
python tools/shell/shell-test.py build/release/duckdb
- name: Examples
shell: bash
run: |
(cd examples/embedded-c; make)
(cd examples/embedded-c++; make)
- name: Deploy
shell: bash
run: |
python scripts/amalgamation.py
zip -j duckdb_cli-osx-universal.zip build/release/duckdb
zip -j libduckdb-osx-universal.zip build/release/src/libduckdb*.dylib src/amalgamation/duckdb.hpp src/include/duckdb.h
zip -j duckdb_odbc-osx-universal.zip build/release/tools/odbc/libduckdb_odbc.dylib
python scripts/asset-upload-gha.py libduckdb-osx-universal.zip duckdb_cli-osx-universal.zip duckdb_odbc-osx-universal.zip
- uses: actions/upload-artifact@v2
with:
name: duckdb-binaries-osx
path: |
libduckdb-osx-universal.zip
duckdb_cli-osx-universal.zip
duckdb_odbc-osx-universal.zip
xcode-extensions:
name: OSX Extensions Release
runs-on: macos-latest
needs: xcode-debug
env:
AWS_ACCESS_KEY_ID: ${{secrets.S3_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.S3_KEY}}
DUCKDB_EXTENSION_SIGNING_PK: ${{ secrets.DUCKDB_EXTENSION_SIGNING_PK }}
AWS_DEFAULT_REGION: us-east-1
OSX_BUILD_UNIVERSAL: 1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install OpenSSL
shell: bash
run: |
mkdir -p build/openssl
cd build/openssl
mkdir sources build
curl https://www.openssl.org/source/openssl-3.0.5.tar.gz | tar xv -C sources --strip-components 1
export OPENSSL_ROOT_DIR=`pwd`/build
cd sources
export CC="clang -arch x86_64 -arch arm64"
perl ./Configure --prefix=$OPENSSL_ROOT_DIR darwin64-x86_64-cc no-asm
make -j
make install_sw
- name: Get OpenSSL path
shell: bash
run: |
export OPENSSL_ROOT_DIR=`pwd`/build/openssl/build
echo "OPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR" >> $GITHUB_ENV
- uses: ./.github/actions/build_extensions
with:
openssl_path: ${{ env.OPENSSL_ROOT_DIR }}
treat_warn_as_error: 0
post_install: rm build/release/src/libduckdb*
run_tests: 0
osx_universal: 1
- name: Deploy
shell: bash
run: |
if [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ && "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
pip install awscli
./scripts/extension-upload.sh osx_amd64 ${{ github.ref_name }}
./scripts/extension-upload.sh osx_arm64 ${{ github.ref_name }}
./scripts/extension-upload-test.sh
elif [[ "$GITHUB_REF" =~ ^(refs/heads/master)$ && "$GITHUB_REPOSITORY" = "duckdb/duckdb" ]] ; then
pip install awscli
./scripts/extension-upload.sh osx_amd64 `git log -1 --format=%h`
./scripts/extension-upload.sh osx_arm64 `git log -1 --format=%h`
./scripts/extension-upload-test.sh
else
./scripts/extension-upload-test.sh local
fi