-
Notifications
You must be signed in to change notification settings - Fork 43
146 lines (133 loc) · 5.13 KB
/
Linux.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
name: Linux
on:
push:
paths-ignore:
- '**/README.md'
- 'doc/**'
pull_request:
paths-ignore:
- '**/README.md'
- 'doc/**'
repository_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
linux:
name: Linux Release
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>' ]
arch: ['linux_amd64', 'linux_arm64', 'linux_amd64_gcc4']
vcpkg_version: [ '2023.04.15' ]
include:
- arch: 'linux_amd64_gcc4'
container: 'quay.io/pypa/manylinux2014_x86_64'
vcpkg_triplet: 'x64-linux'
- arch: 'linux_amd64'
container: 'ubuntu:18.04'
vcpkg_triplet: 'x64-linux'
- arch: 'linux_arm64'
container: 'ubuntu:18.04'
vcpkg_triplet: 'arm64-linux'
env:
VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }}
GEN: ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
TREAT_WARNINGS_AS_ERRORS: 1
steps:
- name: Install required ubuntu packages
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
run: |
apt-get update -y -qq
apt-get install -y -qq software-properties-common
add-apt-repository ppa:git-core/ppa
apt-get update -y -qq
apt-get install -y -qq lsb-release ninja-build make gcc-multilib g++-multilib libssl-dev wget openjdk-8-jdk zip maven unixodbc-dev libc6-dev-i386 lib32readline6-dev libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip build-essential checkinstall libffi-dev curl libz-dev openssh-client
- name: Install Git 2.18.5
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
run: |
wget https://github.com/git/git/archive/refs/tags/v2.18.5.tar.gz
tar xvf v2.18.5.tar.gz
cd git-2.18.5
make
make prefix=/usr install
git --version
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
# Setup ccache (not on _gcc4)
- name: ccache
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.arch }}
- name: Setup ManyLinux2014
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
run: |
./duckdb/scripts/setup_manylinux2014.sh general ccache openssl
- name: Setup Ubuntu
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
uses: ./duckdb/.github/actions/ubuntu_18_setup
with:
aarch64_cross_compile: ${{ matrix.arch == 'linux_arm64' && 1 }}
openssl: 0
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 501db0f17ef6df184fcdbfbe0f87cde2313b6ab1
# Build extension
- name: Build extension
env:
GEN: ninja
STATIC_OPENSSL: 1
STATIC_LIBCPP: 1
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make release
- name: Build extension
if: ${{ matrix.arch != 'linux_arm64'}}
run: |
make test_release
# - uses: actions/upload-artifact@v2
# with:
# name: ${{matrix.arch}}-extensions-${{ matrix.duckdb_version == '<submodule_version>' && 'latest' || matrix.duckdb_version }}
# path: |
# build/release/extension/spatial/spatial.duckdb_extension
#
# - name: Deploy
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.S3_DEPLOY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DEPLOY_KEY }}
# AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
# BUCKET_NAME: ${{ secrets.S3_BUCKET }}
# run: |
# git config --global --add safe.directory '*'
# cd duckdb
# git fetch --tags
# export DUCKDB_VERSION=`git tag --points-at HEAD`
# export DUCKDB_VERSION=${DUCKDB_VERSION:=`git log -1 --format=%h`}
# cd ..
# if [[ "$AWS_ACCESS_KEY_ID" == "" ]] ; then
# echo 'No key set, skipping'
# elif [[ "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then
# python3 -m pip install pip awscli
# ./scripts/extension-upload.sh spatial ${{ github.ref_name }} $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME true
# elif [[ "$GITHUB_REF" =~ ^(refs/heads/main)$ ]] ; then
# python3 -m pip install pip awscli
# ./scripts/extension-upload.sh spatial `git log -1 --format=%h` $DUCKDB_VERSION ${{matrix.arch}} $BUCKET_NAME false
# fi