Skip to content

Commit 036b0f1

Browse files
authored
Merge pull request #12 from pandanotabear/main
feat: add NTS and TS support
2 parents c4b8cbe + 6bfa7fd commit 036b0f1

File tree

8 files changed

+212
-315
lines changed

8 files changed

+212
-315
lines changed

.github/workflows/cross-compile.yml

+138-40
Original file line numberDiff line numberDiff line change
@@ -15,97 +15,193 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18-
# Linux x64 - PHP8.0
18+
# Linux x64 - PHP8.0 - NTS
1919
- build: x86_64-unknown-linux-gnu
2020
os: ubuntu-latest
2121
target: x86_64-unknown-linux-gnu
2222
php-versions: '8.0'
23+
phpts: 'nts'
2324

24-
# Macos x64 - PHP8.0
25+
# Linux x64 - PHP8.1 - NTS
26+
- build: x86_64-unknown-linux-gnu
27+
os: ubuntu-latest
28+
target: x86_64-unknown-linux-gnu
29+
php-versions: '8.1'
30+
phpts: 'nts'
31+
32+
# Linux x64 - PHP8.2 - NTS
33+
- build: x86_64-unknown-linux-gnu
34+
os: ubuntu-latest
35+
target: x86_64-unknown-linux-gnu
36+
php-versions: '8.2'
37+
phpts: 'nts'
38+
39+
# Linux x64 - PHP8.3 - NTS
40+
- build: x86_64-unknown-linux-gnu
41+
os: ubuntu-latest
42+
target: x86_64-unknown-linux-gnu
43+
php-versions: '8.3'
44+
phpts: 'nts'
45+
46+
# Macos x64 - PHP8.0 - NTS
2547
- build: x86_64-apple-darwin
2648
os: macos-latest
2749
target: x86_64-apple-darwin
2850
php-versions: '8.0'
51+
phpts: 'nts'
2952

3053
- build: aarch64-apple-darwin
3154
os: macos-latest
3255
target: aarch64-apple-darwin
3356
php-versions: '8.0'
34-
35-
# Windows x64 - PHP8.0
36-
- build: x86_64-pc-windows-msvc
37-
os: windows-2019
38-
target: x86_64-pc-windows-msvc
39-
php-versions: '8.0'
40-
41-
# Linux x64 - PHP8.1
42-
- build: x86_64-unknown-linux-gnu
43-
os: ubuntu-latest
44-
target: x86_64-unknown-linux-gnu
45-
php-versions: '8.1'
57+
phpts: 'nts'
4658

47-
# Macos x64 - PHP8.1
59+
# Macos x64 - PHP8.1 - NTS
4860
- build: x86_64-apple-darwin
4961
os: macos-latest
5062
target: x86_64-apple-darwin
5163
php-versions: '8.1'
64+
phpts: 'nts'
5265

5366
- build: aarch64-apple-darwin
5467
os: macos-latest
5568
target: aarch64-apple-darwin
5669
php-versions: '8.1'
70+
phpts: 'nts'
5771

58-
# Windows x64 - PHP8.1
59-
- build: x86_64-pc-windows-msvc
60-
os: windows-2019
61-
target: x86_64-pc-windows-msvc
62-
php-versions: '8.1'
72+
# Macos x64 - PHP8.2 - NTS
73+
- build: x86_64-apple-darwin
74+
os: macos-latest
75+
target: x86_64-apple-darwin
76+
php-versions: '8.2'
77+
phpts: 'nts'
6378

64-
# Linux x64 - PHP8.2
65-
- build: x86_64-unknown-linux-gnu
66-
os: ubuntu-latest
67-
target: x86_64-unknown-linux-gnu
79+
- build: aarch64-apple-darwin
80+
os: macos-latest
81+
target: aarch64-apple-darwin
6882
php-versions: '8.2'
83+
phpts: 'nts'
84+
85+
# Macos x64 - PHP8.3 - NTS
86+
- build: x86_64-apple-darwin
87+
os: macos-latest
88+
target: x86_64-apple-darwin
89+
php-versions: '8.3'
90+
phpts: 'nts'
91+
92+
- build: aarch64-apple-darwin
93+
os: macos-latest
94+
target: aarch64-apple-darwin
95+
php-versions: '8.3'
96+
phpts: 'nts'
97+
98+
# Macos x64 - PHP8.0 - TS
99+
- build: x86_64-apple-darwin
100+
os: macos-latest
101+
target: x86_64-apple-darwin
102+
php-versions: '8.0'
103+
phpts: 'ts'
104+
105+
- build: aarch64-apple-darwin
106+
os: macos-latest
107+
target: aarch64-apple-darwin
108+
php-versions: '8.0'
109+
phpts: 'ts'
69110

70-
# Macos x64 - PHP8.2
111+
# Macos x64 - PHP8.1 - TS
112+
- build: x86_64-apple-darwin
113+
os: macos-latest
114+
target: x86_64-apple-darwin
115+
php-versions: '8.1'
116+
phpts: 'ts'
117+
118+
- build: aarch64-apple-darwin
119+
os: macos-latest
120+
target: aarch64-apple-darwin
121+
php-versions: '8.1'
122+
phpts: 'ts'
123+
124+
# Macos x64 - PHP8.2 - TS
71125
- build: x86_64-apple-darwin
72126
os: macos-latest
73127
target: x86_64-apple-darwin
74128
php-versions: '8.2'
129+
phpts: 'ts'
75130

76131
- build: aarch64-apple-darwin
77132
os: macos-latest
78133
target: aarch64-apple-darwin
79134
php-versions: '8.2'
135+
phpts: 'ts'
80136

81-
# Windows x64 - PHP8.2
82-
- build: x86_64-pc-windows-msvc
83-
os: windows-2019
84-
target: x86_64-pc-windows-msvc
85-
php-versions: '8.2'
86-
87-
# Linux x64 - PHP8.3
88-
- build: x86_64-unknown-linux-gnu
89-
os: ubuntu-latest
90-
target: x86_64-unknown-linux-gnu
91-
php-versions: '8.3'
92-
93-
# Macos x64 - PHP8.3
137+
# Macos x64 - PHP8.3 - TS
94138
- build: x86_64-apple-darwin
95139
os: macos-latest
96140
target: x86_64-apple-darwin
97141
php-versions: '8.3'
142+
phpts: 'ts'
98143

99144
- build: aarch64-apple-darwin
100145
os: macos-latest
101146
target: aarch64-apple-darwin
102147
php-versions: '8.3'
148+
phpts: 'ts'
149+
150+
# Windows x64 - PHP8.0 - NTS
151+
- build: x86_64-pc-windows-msvc
152+
os: windows-2019
153+
target: x86_64-pc-windows-msvc
154+
php-versions: '8.0'
155+
phpts: 'nts'
156+
157+
# Windows x64 - PHP8.1 - NTS
158+
- build: x86_64-pc-windows-msvc
159+
os: windows-2019
160+
target: x86_64-pc-windows-msvc
161+
php-versions: '8.1'
162+
phpts: 'nts'
163+
164+
# Windows x64 - PHP8.2 - NTS
165+
- build: x86_64-pc-windows-msvc
166+
os: windows-2019
167+
target: x86_64-pc-windows-msvc
168+
php-versions: '8.2'
169+
phpts: 'nts'
170+
171+
# Windows x64 - PHP8.3 - NTS
172+
- build: x86_64-pc-windows-msvc
173+
os: windows-2019
174+
target: x86_64-pc-windows-msvc
175+
php-versions: '8.3'
176+
phpts: 'nts'
177+
178+
# Windows x64 - PHP8.0 - TS
179+
- build: x86_64-pc-windows-msvc
180+
os: windows-2019
181+
target: x86_64-pc-windows-msvc
182+
php-versions: '8.0'
183+
phpts: 'ts'
184+
185+
# Windows x64 - PHP8.1 - TS
186+
- build: x86_64-pc-windows-msvc
187+
os: windows-2019
188+
target: x86_64-pc-windows-msvc
189+
php-versions: '8.1'
190+
phpts: 'ts'
191+
192+
# Windows x64 - PHP8.2 - TS
193+
- build: x86_64-pc-windows-msvc
194+
os: windows-2019
195+
target: x86_64-pc-windows-msvc
196+
php-versions: '8.2'
197+
phpts: 'ts'
103198

104-
# Windows x64 - PHP8.3
199+
# Windows x64 - PHP8.3 - TS
105200
- build: x86_64-pc-windows-msvc
106201
os: windows-2019
107202
target: x86_64-pc-windows-msvc
108203
php-versions: '8.3'
204+
phpts: 'ts'
109205

110206
steps:
111207
- name: Checkout
@@ -131,6 +227,8 @@ jobs:
131227
uses: shivammathur/setup-php@v2
132228
with:
133229
php-version: ${{ matrix.php-versions }}
230+
env:
231+
phpts: ${{ matrix.phpts }}
134232

135233
- name: Build (Linux)
136234
if: matrix.os == 'ubuntu-latest'
@@ -152,7 +250,7 @@ jobs:
152250
str_version=${{ env.VERSION }}
153251
version=${str_version#turso-php-extension/}
154252
155-
dirname="$binary_name-$version-php-${{ matrix.php-versions }}-${{ matrix.target }}"
253+
dirname="$binary_name-$version-php-${{ matrix.php-versions }}-${{ matrix.phpts }}-${{ matrix.target }}"
156254
mkdir "$dirname"
157255
158256
if [ "${{ matrix.os }}" = "macos-latest" ]; then

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ test-parse.php
1111
.flaskenv*
1212
!.env.project
1313
!.env.vault
14-
notes/
14+
notes/
15+
*.bak
16+
src/*.bak

Cargo.lock

+12-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libsql_php"
3-
version = "1.4.0"
3+
version = "1.4.2"
44
edition = "2021"
55
authors = ["Imam Ali Mustofa <[email protected]>"]
66

@@ -14,7 +14,7 @@ crate-type = ["cdylib"]
1414
base64 = "0.22.0"
1515
ext-php-rs = "*"
1616
lazy_static = "1.4.0"
17-
libsql = { version = "0.5.0", features = ["remote", "replication", "core", "encryption"] }
17+
libsql = { version = "0.6.0", features = ["remote", "replication", "core", "encryption"] }
1818
once_cell = "1.19.0"
1919
serde = { version = "1.0.199", features = ["derive"]}
2020
serde_json = "1.0.116"

0 commit comments

Comments
 (0)