Skip to content

Commit af2345c

Browse files
committed
update
1 parent d73f4e9 commit af2345c

File tree

3 files changed

+70
-42
lines changed

3 files changed

+70
-42
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build
22

3-
on: [push]
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
47

58
env:
69
EXTENSION_NAME: php_rocksdb_rc
@@ -16,33 +19,34 @@ jobs:
1619
strategy:
1720
matrix:
1821
include:
19-
# -
20-
# target: x86_64-unknown-linux-gnu
21-
# platform: linux/amd64
22-
# php-version: '8.0'
23-
# -
24-
# os: ubuntu-latest
25-
# target: aarch64-unknown-linux-gnu
26-
# platform: linux/arm64
27-
# php-version: '8.0'
28-
# -
29-
# target: x86_64-unknown-linux-gnu
30-
# platform: linux/amd64
31-
# php-version: '8.1'
32-
-
33-
os: ubuntu-latest
22+
- target: x86_64-unknown-linux-gnu
23+
platform: linux/amd64
24+
php-version: '8.0'
25+
- os: ubuntu-latest
3426
target: aarch64-unknown-linux-gnu
3527
platform: linux/arm64
28+
php-version: '8.0'
29+
- target: x86_64-unknown-linux-gnu
30+
platform: linux/amd64
3631
php-version: '8.1'
37-
# -
38-
# target: x86_64-unknown-linux-gnu
39-
# platform: linux/amd64
40-
# php-version: '8.2'
41-
# -
42-
# os: ubuntu-latest
43-
# target: aarch64-unknown-linux-gnu
44-
# platform: linux/arm64
45-
# php-version: '8.2'
32+
- os: ubuntu-latest
33+
target: aarch64-unknown-linux-gnu
34+
platform: linux/arm64
35+
php-version: '8.1'
36+
- target: x86_64-unknown-linux-gnu
37+
platform: linux/amd64
38+
php-version: '8.2'
39+
- os: ubuntu-latest
40+
target: aarch64-unknown-linux-gnu
41+
platform: linux/arm64
42+
php-version: '8.2'
43+
- target: x86_64-unknown-linux-gnu
44+
platform: linux/amd64
45+
php-version: '8.3'
46+
- os: ubuntu-latest
47+
target: aarch64-unknown-linux-gnu
48+
platform: linux/arm64
49+
php-version: '8.3'
4650
steps:
4751
- name: Checkout
4852
uses: actions/checkout@v2
@@ -87,12 +91,11 @@ jobs:
8791
with:
8892
name: php${{ matrix.php-version }}-${{ matrix.target }}
8993
path: php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.so
94+
9095
- name: Release
9196
uses: softprops/action-gh-release@v1
92-
if: startsWith(github.ref, 'refs/tags/')
9397
with:
94-
files: |
95-
php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.so
98+
files: php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.so
9699
env:
97100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98101

@@ -101,24 +104,22 @@ jobs:
101104
# strategy:
102105
# matrix:
103106
# include:
104-
# -
105-
# target: aarch64-apple-darwin
107+
# - target: aarch64-apple-darwin
106108
# php-version: '8.0'
107-
# -
108-
# target: x86_64-apple-darwin
109+
# - target: x86_64-apple-darwin
109110
# php-version: '8.0'
110-
# -
111-
# target: aarch64-apple-darwin
111+
# - target: aarch64-apple-darwin
112112
# php-version: '8.1'
113-
# -
114-
# target: x86_64-apple-darwin
113+
# - target: x86_64-apple-darwin
115114
# php-version: '8.1'
116-
# -
117-
# target: aarch64-apple-darwin
115+
# - target: aarch64-apple-darwin
118116
# php-version: '8.2'
119-
# -
120-
# target: x86_64-apple-darwin
117+
# - target: x86_64-apple-darwin
121118
# php-version: '8.2'
119+
# - target: aarch64-apple-darwin
120+
# php-version: '8.3'
121+
# - target: x86_64-apple-darwin
122+
# php-version: '8.3'
122123
#
123124
# steps:
124125
# - name: Checkout
@@ -157,9 +158,9 @@ jobs:
157158
# with:
158159
# name: php${{ matrix.php-version }}-${{ matrix.target }}
159160
# path: target/php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.dylib
161+
#
160162
# - name: Release
161163
# uses: softprops/action-gh-release@v1
162-
# if: startsWith(github.ref, 'refs/tags/')
163164
# with:
164165
# files: |
165166
# target/php${{ matrix.php-version }}-${{ matrix.target }}-${{ env.EXTENSION_NAME }}.dylib

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@ crate-type = ["cdylib"]
99

1010
[dependencies]
1111
ext-php-rs = "*"
12-
rust-rocksdb = { version = "^0.26", features = ["multi-threaded-cf"] }
12+
rust-rocksdb = { version = "^0.26", features = ["multi-threaded-cf"] }
13+
14+
[profile.release]
15+
opt-level = "z" # Оптимизация для размера
16+
lto = true # Включение Link Time Optimization
17+
codegen-units = 1 # Уменьшение количества единиц компиляции для лучшей оптимизации
18+
panic = "abort" # Уменьшение объема кода для обработки паник
19+
strip = true # Удаление символов отладки

LICENSE.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2012-2024 Scott Chacon and others
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)