Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add NTS and TS support #12

Merged
merged 7 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 138 additions & 40 deletions .github/workflows/cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,97 +15,193 @@ jobs:
strategy:
matrix:
include:
# Linux x64 - PHP8.0
# Linux x64 - PHP8.0 - NTS
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.0'
phpts: 'nts'

# Macos x64 - PHP8.0
# Linux x64 - PHP8.1 - NTS
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.1'
phpts: 'nts'

# Linux x64 - PHP8.2 - NTS
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.2'
phpts: 'nts'

# Linux x64 - PHP8.3 - NTS
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.3'
phpts: 'nts'

# Macos x64 - PHP8.0 - NTS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.0'
phpts: 'nts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.0'

# Windows x64 - PHP8.0
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.0'

# Linux x64 - PHP8.1
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.1'
phpts: 'nts'

# Macos x64 - PHP8.1
# Macos x64 - PHP8.1 - NTS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.1'
phpts: 'nts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.1'
phpts: 'nts'

# Windows x64 - PHP8.1
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.1'
# Macos x64 - PHP8.2 - NTS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.2'
phpts: 'nts'

# Linux x64 - PHP8.2
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.2'
phpts: 'nts'

# Macos x64 - PHP8.3 - NTS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.3'
phpts: 'nts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.3'
phpts: 'nts'

# Macos x64 - PHP8.0 - TS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.0'
phpts: 'ts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.0'
phpts: 'ts'

# Macos x64 - PHP8.2
# Macos x64 - PHP8.1 - TS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.1'
phpts: 'ts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.1'
phpts: 'ts'

# Macos x64 - PHP8.2 - TS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.2'
phpts: 'ts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.2'
phpts: 'ts'

# Windows x64 - PHP8.2
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.2'

# Linux x64 - PHP8.3
- build: x86_64-unknown-linux-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
php-versions: '8.3'

# Macos x64 - PHP8.3
# Macos x64 - PHP8.3 - TS
- build: x86_64-apple-darwin
os: macos-latest
target: x86_64-apple-darwin
php-versions: '8.3'
phpts: 'ts'

- build: aarch64-apple-darwin
os: macos-latest
target: aarch64-apple-darwin
php-versions: '8.3'
phpts: 'ts'

# Windows x64 - PHP8.0 - NTS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.0'
phpts: 'nts'

# Windows x64 - PHP8.1 - NTS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.1'
phpts: 'nts'

# Windows x64 - PHP8.2 - NTS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.2'
phpts: 'nts'

# Windows x64 - PHP8.3 - NTS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.3'
phpts: 'nts'

# Windows x64 - PHP8.0 - TS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.0'
phpts: 'ts'

# Windows x64 - PHP8.1 - TS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.1'
phpts: 'ts'

# Windows x64 - PHP8.2 - TS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.2'
phpts: 'ts'

# Windows x64 - PHP8.3
# Windows x64 - PHP8.3 - TS
- build: x86_64-pc-windows-msvc
os: windows-2019
target: x86_64-pc-windows-msvc
php-versions: '8.3'
phpts: 'ts'

steps:
- name: Checkout
Expand All @@ -131,6 +227,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
env:
phpts: ${{ matrix.phpts }}

- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -152,7 +250,7 @@ jobs:
str_version=${{ env.VERSION }}
version=${str_version#turso-php-extension/}

dirname="$binary_name-$version-php-${{ matrix.php-versions }}-${{ matrix.target }}"
dirname="$binary_name-$version-php-${{ matrix.php-versions }}-${{ matrix.phpts }}-${{ matrix.target }}"
mkdir "$dirname"

if [ "${{ matrix.os }}" = "macos-latest" ]; then
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ test-parse.php
.flaskenv*
!.env.project
!.env.vault
notes/
notes/
*.bak
src/*.bak
29 changes: 12 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libsql_php"
version = "1.4.0"
version = "1.4.2"
edition = "2021"
authors = ["Imam Ali Mustofa <[email protected]>"]

Expand All @@ -14,7 +14,7 @@ crate-type = ["cdylib"]
base64 = "0.22.0"
ext-php-rs = "*"
lazy_static = "1.4.0"
libsql = { version = "0.5.0", features = ["remote", "replication", "core", "encryption"] }
libsql = { version = "0.6.0", features = ["remote", "replication", "core", "encryption"] }
once_cell = "1.19.0"
serde = { version = "1.0.199", features = ["derive"]}
serde_json = "1.0.116"
Expand Down
Loading