-
Notifications
You must be signed in to change notification settings - Fork 199
134 lines (123 loc) · 4.21 KB
/
sqlite3-ruby.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
# for Actions OS info, see https://github.com/actions/runner-images#available-images
name: test suite
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * 3" # At 08:00 on Wednesday # https://crontab.guru/#0_8_*_*_3
push:
branches:
- master
- v*.*.x
tags:
- v*.*.*
pull_request:
types: [opened, synchronize]
branches:
- '*'
jobs:
sqlite3:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ["3.2", "3.1", "3.0", "2.7"]
lib: [system, packaged]
include:
- { os: ubuntu-latest, ruby: truffleruby-head, lib: packaged }
- { os: ubuntu-latest, ruby: head, lib: packaged }
- { os: ubuntu-latest, ruby: head, lib: system }
- { os: windows-latest, ruby: ucrt, lib: system }
- { os: windows-latest, ruby: mswin, lib: system }
runs-on: ${{matrix.os}}
steps:
- if: matrix.os == 'windows-latest'
name: configure git crlf
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
apt-get: libsqlite3-dev
brew: sqlite3 pkg-config
mingw: sqlite3
vcpkg: sqlite3
- if: matrix.lib == 'packaged'
uses: actions/cache@v3
with:
path: ports
key: ports-${{matrix.os}}-${{hashFiles('ext/sqlite3/extconf.rb','dependencies.yml')}}
- run: bundle exec rake compile -- --disable-system-libraries
if: matrix.lib == 'packaged'
- run: bundle exec rake compile -- --enable-system-libraries
if: matrix.lib == 'system' && !startsWith(matrix.os, 'macos')
- run: bundle exec rake compile -- --enable-system-libraries --with-opt-dir=$(brew --prefix sqlite3)
if: matrix.lib == 'system' && startsWith(matrix.os, 'macos')
- run: bundle exec rake test
old_sqlite3:
runs-on: ubuntu-latest
container:
image: ruby:2.7.5-buster # old enough to not support SQLITE_DBCONFIG_DQS_DDL
steps:
- uses: actions/checkout@v4
- run: bundle install
- run: bundle exec rake compile -- --enable-system-libraries
- run: bundle exec rake test
# reported at https://github.com/sparklemotion/sqlite3-ruby/issues/354
# TODO remove once https://github.com/flavorjones/mini_portile/issues/118 is fixed
fedora:
runs-on: ubuntu-latest
container:
image: fedora:35
steps:
- run: |
dnf group install -y "C Development Tools and Libraries"
dnf install -y ruby ruby-devel libyaml-devel
- uses: actions/checkout@v4
- run: bundle install
- run: bundle exec rake compile -- --disable-system-libraries
- run: bundle exec rake test
sqlcipher:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ruby: ["3.2", "2.7"] # oldest and newest
include:
- { os: windows-latest, ruby: mingw }
- { os: windows-latest, ruby: mswin }
runs-on: ${{matrix.os}}
steps:
- if: matrix.os == 'windows-latest'
name: configure git crlf
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
apt-get: libsqlcipher-dev
brew: sqlcipher pkg-config
mingw: sqlcipher
vcpkg: sqlcipher
- run: bundle exec rake compile -- --with-sqlcipher
- run: bundle exec rake test
valgrind:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.2"
bundler-cache: true
apt-get: libsqlite3-dev valgrind
- run: bundle install
- run: bundle exec rake compile
- run: bundle exec rake test:valgrind