-
Notifications
You must be signed in to change notification settings - Fork 203
121 lines (111 loc) · 3.85 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
# 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:
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-2022]
# use quotes for versions, otherwise "3.0" -> "3", "2.10" -> "2.1"
ruby: ["3.1", "3.0", "2.7", "2.6"]
lib: [system, packaged]
include:
- { os: ubuntu-latest, ruby: truffleruby-head, lib: packaged }
- { os: ubuntu-22.04 , ruby: head , lib: packaged }
- { os: ubuntu-22.04 , ruby: head , lib: system }
- { os: windows-2022 , ruby: ucrt , lib: system }
- { os: windows-2022 , ruby: mswin , lib: system }
runs-on: ${{matrix.os}}
steps:
- if: matrix.os == 'windows-2022'
name: configure git crlf
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v3
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
apt-get: libsqlite3-dev
brew: sqlite3
mingw: sqlite3
vcpkg: sqlite3
- if: matrix.lib == 'packaged'
uses: actions/cache@v3
with:
path: ports
key: ports-${{matrix.os}}-${{hashFiles('ext/sqlite3/extconf.rb')}}
- 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@v3
- 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
- uses: actions/checkout@v3
- 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-2022]
# use quotes for versions, otherwise "3.0" -> "3", "2.10" -> "2.1"
ruby: ["3.1", "2.6"] # oldest and newest
include:
- { os: windows-2022, ruby: mingw }
- { os: windows-2022, ruby: mswin }
runs-on: ${{matrix.os}}
steps:
- if: matrix.os == 'windows-2022'
name: configure git crlf
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v3
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true
apt-get: libsqlcipher-dev
brew: sqlcipher
mingw: sqlcipher
vcpkg: sqlcipher
- run: bundle exec rake compile -- --with-sqlcipher
- run: bundle exec rake test