Skip to content

Commit dc11a90

Browse files
committed
update deps & automate builds
1 parent 94abe8c commit dc11a90

File tree

3 files changed

+60
-9
lines changed

3 files changed

+60
-9
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Upload Artifacts
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest]
14+
feature: [lua54, lua53, lua52, lua51, luajit, luajit52]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Rust
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: stable
24+
override: true
25+
26+
- name: Build
27+
run: cargo build --release --features ${{ matrix.feature }}
28+
29+
- name: Prepare artifact
30+
run: |
31+
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
32+
OS="linux"
33+
EXT="so"
34+
else
35+
OS="macOS"
36+
EXT="dylib"
37+
fi
38+
mkdir -p artifacts
39+
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
40+
41+
- name: Upload artifact
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: tiktoken_core-${{ matrix.os }}-${{ matrix.feature }}
45+
path: artifacts/tiktoken_core-*.${{ matrix.os == 'ubuntu-latest' && 'so' || 'dylib' }}

Cargo.lock

Lines changed: 14 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "tiktoken_core"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
mlua = { version = "0.9.1", features = ["serialize", "module"] }
12+
mlua = { version = "0.9.7", features = ["serialize", "module"] }
1313
# tiktoken dependencies
1414
fancy-regex = "0.11.0"
1515
regex = "1.8.3"

0 commit comments

Comments
 (0)