-
Notifications
You must be signed in to change notification settings - Fork 17
131 lines (117 loc) · 4.91 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
name: Linux
on: [push, pull_request,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
AZURE_STORAGE_CONNECTION_STRING: 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;'
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 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
apt-get install -y -qq tar pkg-config
- 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: install Azure test service
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
run: |
yum install -y nodejs npm
npm install -g azurite
echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/azure-cli.repo
yum install -y azure-cli
- name: install Azure test service
if: ${{ matrix.arch == 'linux_amd64' }}
run: |
curl -fsSL https://deb.nodesource.com/setup_16.x | bash
apt-get install -y -qq nodejs
node -v
npm -v
npm install -g azurite
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
- name: Launch & populate Azure test service
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_amd64_gcc4' }}
run: |
azurite > azurite_log.txt 2>&1 &
sleep 10
./scripts/upload_test_files_to_azurite.sh
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
- name: Setup ManyLinux2014
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
run: |
./duckdb/scripts/setup_manylinux2014.sh general aws-cli ccache ssh openssl python_alias
- name: Setup Ubuntu
if: ${{ matrix.arch == 'linux_amd64' || matrix.arch == 'linux_arm64' }}
uses: ./duckdb/.github/actions/ubuntu_18_setup
with:
aarch64_cross_compile: 1
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 9edb1b8e590cc086563301d735cae4b6e732d2d2
# Build extension
- name: Build extension
env:
GEN: ninja
STATIC_LIBCPP: 1
CC: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-gcc' || '' }}
CXX: ${{ matrix.arch == 'linux_arm64' && 'aarch64-linux-gnu-g++' || '' }}
run: |
make release
# Todo: fix azurite crashing on ubuntu when testing
- name: Test extension
# if: ${{ matrix.arch == 'linux_amd64_gcc4' || matrix.arch == 'linux_amd64'}}
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
run: |
make test
- name: Azure test server log
if: always() && matrix.arch == 'linux_amd64_gcc4'
shell: bash
run: |
cat azurite_log.txt