Skip to content

0.2.2 rockspec

0.2.2 rockspec #6

Workflow file for this run

name: Build and Upload Artifacts
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
feature: [lua54, lua53, lua52, lua51, luajit]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --release --features ${{ matrix.feature }}
- name: Prepare artifact
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
OS="linux"
EXT="so"
else
OS="macOS"
EXT="dylib"
fi
mkdir -p artifacts
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tiktoken_core-${{ matrix.os }}-${{ matrix.feature }}
path: artifacts/tiktoken_core-*.${{ matrix.os == 'ubuntu-latest' && 'so' || 'dylib' }}