+30
-9
lines changedFilter options
+30
-9
lines changed Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
10
10
build:
11
11
strategy:
12
12
matrix:
13
-
os: [ubuntu-latest, macos-latest]
13
+
os: [ubuntu-latest, macos-latest, windows-latest]
14
14
feature: [lua54, lua53, lua52, lua51, luajit]
15
15
runs-on: ${{ matrix.os }}
16
16
@@ -24,19 +24,27 @@ jobs:
24
24
run: cargo build --release --features ${{ matrix.feature }}
25
25
26
26
- name: Prepare artifact
27
+
shell: bash
27
28
run: |
28
29
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
29
30
OS="linux"
30
31
EXT="so"
31
-
else
32
+
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
32
33
OS="macOS"
33
34
EXT="dylib"
35
+
else
36
+
OS="windows"
37
+
EXT="dll"
34
38
fi
35
39
mkdir -p artifacts
36
-
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
40
+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
41
+
cp target/release/tiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
42
+
else
43
+
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
44
+
fi
37
45
38
46
- name: Upload artifact
39
47
uses: actions/upload-artifact@v4
40
48
with:
41
49
name: tiktoken_core-${{ matrix.os }}-${{ matrix.feature }}
42
-
path: artifacts/tiktoken_core-*.${{ matrix.os == 'ubuntu-latest' && 'so' || 'dylib' }}
50
+
path: artifacts/tiktoken_core-*.${{ matrix.os == 'ubuntu-latest' && 'so' || matrix.os == 'macos-latest' && 'dylib' || 'dll' }}
Original file line number Diff line number Diff line change
@@ -9,9 +9,13 @@ jobs:
9
9
build_and_release:
10
10
strategy:
11
11
matrix:
12
-
os: [ubuntu-latest, macos-latest]
12
+
os: [ubuntu-latest, macos-latest, windows-latest]
13
13
feature: [lua54, lua53, lua52, lua51, luajit]
14
14
arch: [x86_64, aarch64]
15
+
exclude:
16
+
- os: windows-latest
17
+
arch: aarch64
18
+
15
19
runs-on: ${{ matrix.os }}
16
20
17
21
steps:
@@ -20,7 +24,7 @@ jobs:
20
24
- name: Install Rust
21
25
uses: dtolnay/rust-toolchain@stable
22
26
with:
23
-
targets: ${{ matrix.arch }}-${{ matrix.os == 'ubuntu-latest' && 'unknown-linux-gnu' || 'apple-darwin' }}
27
+
targets: ${{ matrix.arch }}-${{ matrix.os == 'ubuntu-latest' && 'unknown-linux-gnu' || matrix.os == 'macos-latest' && 'apple-darwin' || 'pc-windows-msvc' }}
24
28
25
29
- name: Install cross-compilation tools (Linux ARM64)
26
30
if: matrix.os == 'ubuntu-latest' && matrix.arch == 'aarch64'
@@ -29,6 +33,7 @@ jobs:
29
33
sudo apt-get install -y gcc-aarch64-linux-gnu
30
34
31
35
- name: Build
36
+
shell: bash
32
37
run: |
33
38
if [ "${{ matrix.arch }}" == "aarch64" ]; then
34
39
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
@@ -41,13 +46,17 @@ jobs:
41
46
fi
42
47
43
48
- name: Prepare artifact
49
+
shell: bash
44
50
run: |
45
51
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
46
52
OS="linux"
47
53
EXT="so"
48
-
else
54
+
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
49
55
OS="macOS"
50
56
EXT="dylib"
57
+
else
58
+
OS="windows"
59
+
EXT="dll"
51
60
fi
52
61
ARCH="${{ matrix.arch == 'x86_64' && 'x86_64' || 'arm64' }}"
53
62
mkdir -p artifacts
@@ -58,7 +67,11 @@ jobs:
58
67
cp target/aarch64-apple-darwin/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-$ARCH-${{ matrix.feature }}.$EXT
59
68
fi
60
69
else
61
-
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-$ARCH-${{ matrix.feature }}.$EXT
70
+
if [ "${{ matrix.os }}" == "windows-latest" ]; then
71
+
cp target/release/tiktoken_core.$EXT artifacts/tiktoken_core-$OS-$ARCH-${{ matrix.feature }}.$EXT
72
+
else
73
+
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-$ARCH-${{ matrix.feature }}.$EXT
74
+
fi
62
75
fi
63
76
64
77
- name: Upload artifacts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ version = "0.2.2-1"
3
3
4
4
source = {
5
5
url = "git+https://github.com/gptlang/lua-tiktoken",
6
-
tag = "0.2.2",
6
+
tag = "v0.2.2",
7
7
}
8
8
9
9
description = {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4