Skip to content

windows build

windows build #8

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, windows-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
shell: bash
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
OS="linux"
EXT="so"
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
OS="macOS"
EXT="dylib"
else
OS="windows"
EXT="dll"
fi
mkdir -p artifacts
if [ "${{ matrix.os }}" == "windows-latest" ]; then
cp target/release/tiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
else
cp target/release/libtiktoken_core.$EXT artifacts/tiktoken_core-$OS-${{ matrix.feature }}.$EXT
fi
- 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' || matrix.os == 'macos-latest' && 'dylib' || 'dll' }}