-
-
Notifications
You must be signed in to change notification settings - Fork 25
79 lines (68 loc) · 2.54 KB
/
test_on_macos.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
name: MacOS
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
test:
runs-on: macos-latest
strategy:
matrix:
ruby: ['3.1.6', '3.2.6', '3.3.6', '3.4.0-preview2', 'head']
duckdb: ['1.1.3', '1.1.1', '1.0.0']
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: duckdb cache
id: duckdb-cache
uses: actions/cache@v4
with:
path: duckdb-v${{ matrix.duckdb }}
key: ${{ runner.os }}-duckdb-v${{ matrix.duckdb }}
- name: Build duckdb ${{ matrix.duckdb }}
env:
DUCKDB_VERSION: ${{ matrix.duckdb }}
if: steps.duckdb-cache.outputs.cache-hit != 'true'
run: |
git clone -b v$DUCKDB_VERSION https://github.com/cwida/duckdb.git duckdb-tmp-v$DUCKDB_VERSION
cd duckdb-tmp-v$DUCKDB_VERSION && make && cd ..
rm -rf duckdb-v$DUCKDB_VERSION
mkdir -p duckdb-v$DUCKDB_VERSION/build/release/src duckdb-v$DUCKDB_VERSION/src
cp -rip duckdb-tmp-v$DUCKDB_VERSION/build/release/src/*.dylib duckdb-v$DUCKDB_VERSION/build/release/src
cp -rip duckdb-tmp-v$DUCKDB_VERSION/src/include duckdb-v$DUCKDB_VERSION/src/
- name: bundle install with Ruby ${{ matrix.ruby }}
env:
DUCKDB_VERSION: ${{ matrix.duckdb }}
run: |
bundle install --jobs 4 --retry 3
- name: Build test with DUCKDB_API_NO_DEPRECATED and Ruby ${{ matrix.ruby }}
env:
DUCKDB_VERSION: ${{ matrix.duckdb }}
run: |
env DUCKDB_API_NO_DEPRECATED=1 bundle exec rake build -- --with-duckdb-include=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/src/include --with-duckdb-lib=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/build/release/src/
bundle exec rake clean
- name: Build with Ruby ${{ matrix.ruby }}
env:
DUCKDB_VERSION: ${{ matrix.duckdb }}
run: |
bundle exec rake build -- --with-duckdb-include=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/src/include --with-duckdb-lib=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/build/release/src/
- name: test with Ruby ${{ matrix.ruby }}
env:
DUCKDB_VERSION: ${{ matrix.duckdb }}
run: |
export DYLD_LIBRARY_PATH=${GITHUB_WORKSPACE}/duckdb-v${DUCKDB_VERSION}/build/release/src:${DYLD_LIBRARY_PATH}
env RUBYOPT=-W:deprecated rake test
post-test:
name: All tests passed on macos
runs-on: macos-latest
needs: test
steps:
- run: echo ok