-
Notifications
You must be signed in to change notification settings - Fork 76
130 lines (114 loc) · 3.53 KB
/
Linux.yml
File metadata and controls
130 lines (114 loc) · 3.53 KB
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
name: Integration Tests
on:
push:
paths-ignore:
- '**.md'
- '.github/workflows/**'
- '!.github/workflows/Linux.yml'
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
jobs:
format-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install
run: |
pip3 install \
black==25.1.0 \
clang_format==11.0.1 \
cmake-format==0.6.13
- name: Format Check
run: |
python -m pip show black
python -m pip show cmake_format
python -m pip show clang_format
clang-format --version
clang-format --dump-config
make format-check
linux-tests-postgres:
name: Run tests on Linux
needs: format-check
runs-on: ubuntu-latest
strategy:
matrix:
# Add commits/tags to build against other DuckDB versions
duckdb_version: [ '<submodule_version>' ]
arch: ['linux_amd64']
vcpkg_version: [ '2023.04.15' ]
include:
- arch: 'linux_amd64'
vcpkg_triplet: 'x64-linux'
env:
VCPKG_TARGET_TRIPLET: ${{ matrix.vcpkg_triplet }}
GEN: Ninja
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
steps:
- name: Free disk space 1
uses: endersonmenezes/free-disk-space@v2.1.1
continue-on-error: true
with:
# remove_android: true # ~9.5GB in #52s
# remove_dotnet: true
remove_haskell: true # ~6.5GB in ~3s
remove_tool_cache: true # ~4.8GB in ~17s
# remove_swap: true
# remove_packages_one_command: true # ~7.5 GB in ~94s
testing: false
- name: Install required ubuntu packages
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq build-essential cmake ninja-build ccache python3
- name: Setup PostgreSQL for Linux/macOS/Windows
uses: ikalnytskyi/action-setup-postgres@v7
with:
postgres-version: '15'
username: 'postgres'
password: 'postgres'
database: 'postgres'
port: '5432'
ssl: true
- name: Test Postgres Setup
run: |
psql -c "SELECT 42"
env:
PGSERVICE: postgres
- 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 }}
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-postgres' }}
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgGitCommitId: 84bab45d415d22042bd0b9081aea57f362da3f35
- name: Build extension
env:
GEN: ninja
STATIC_LIBCPP: 1
run: |
make reldebug
- name: Test extension
env:
POSTGRES_TEST_DATABASE_AVAILABLE: 1
LOCAL_EXTENSION_REPO: 'build/reldebug/repository'
PGSERVICE: postgres
run: |
psql -c "SELECT 43"
source ./create-postgres-tables.sh
./build/reldebug/test/unittest --autoloading available