-
Notifications
You must be signed in to change notification settings - Fork 4
152 lines (131 loc) · 4.55 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
147
148
149
150
151
152
name: Linux
on:
push:
tags:
- "v*"
branches:
- main
pull_request:
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
permissions:
contents: read
id-token: write
jobs:
linux:
name: Linux Release
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
duckdb_version: ["v0.8.1"]
arch: ["linux_amd64_gcc4", "linux_amd64"]
include:
- arch: "linux_amd64"
container: "ubuntu:22.04"
- arch: "linux_amd64_gcc4"
container: "quay.io/pypa/manylinux2014_x86_64"
env:
GEN: ninja
steps:
- name: Set Up Env Vars for Dev Override if Applicable
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'dev')
run: |
echo "Overriding Env Vars for Dev Build"
echo "ENVIRONMENT=dev" >> $GITHUB_ENV
- name: Set Up Env Vars for Dev Override if Applicable
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main' || github.event_name == 'push' && github.event.ref != 'refs/heads/main'
run: |
echo "Overriding Env Vars for Dev Build"
echo "ENVIRONMENT=dev" >> $GITHUB_ENV
- name: Set Up Env Vars for Prod
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev')
run: |
echo "Setting Prod Build Env Vars"
echo "ENVIRONMENT=prd" >> $GITHUB_ENV
- 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 libssl-dev zip unzip checkinstall libffi-dev curl libz-dev ccache git wget pkg-config build-essential autoconf libbz2-dev liblzma-dev libcurl4-openssl-dev
- name: Additional Yum Packages
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
run: |
yum install -y autoconf bzip2-devel xz-devel curl-devel openssl-devel
- name: Install CMake 3.21
shell: bash
if: ${{ matrix.arch == 'linux_amd64' }}
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3-linux-x86_64.sh
chmod +x cmake-3.21.3-linux-x86_64.sh
./cmake-3.21.3-linux-x86_64.sh --skip-license --prefix=/usr/local
cmake --version
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: "true"
- name: Setup mamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment.yml
cache-downloads: true
cache-environment: true
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Checkout DuckDB to version
if: ${{ matrix.duckdb_version != '<submodule_version>'}}
run: |
cd duckdb
git checkout ${{ matrix.duckdb_version }}
- if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
uses: ./duckdb/.github/actions/centos_7_setup
with:
openssl: 1
# Build extension
- name: Build extension
shell: bash -el {0}
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
- name: Test extension
shell: bash -el {0}
continue-on-error: true
run: |
make test
- uses: actions/upload-artifact@v2
with:
name: ${{matrix.arch}}-extensions
path: |
build/release/extension/exon/exon.duckdb_extension
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-west-2
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-deploy-role
- name: upload to s3 no gcc
shell: bash -el {0}
if: ${{ matrix.arch == 'linux_amd64' }}
env:
ENVIRONMENT: ${{ env.ENVIRONMENT }}
run: |
python bin/upload-artifacts.py
- name: upload to s3 gcc4
shell: bash -el {0}
if: ${{ matrix.arch == 'linux_amd64_gcc4' }}
env:
ENVIRONMENT: ${{ env.ENVIRONMENT }}
run: |
python bin/upload-artifacts.py --gcc4