ci: add nim-bindings-test

This commit is contained in:
osmaczko 2026-02-25 12:00:57 +01:00
parent 798fbf731a
commit f150619b17
No known key found for this signature in database
GPG Key ID: 6A385380FD275B44
2 changed files with 22 additions and 4 deletions

View File

@ -2,11 +2,11 @@ name: CI
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
env:
env:
CARGO_TERM_COLOR: always
jobs:
@ -36,3 +36,21 @@ jobs:
- run: rustup update stable && rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
nim-bindings-test:
name: Nim Bindings Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- name: Install Nim via choosenim
run: |
curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
- run: nimble install -dy
working-directory: nim-bindings
- run: nimble pingpong
working-directory: nim-bindings

View File

@ -23,4 +23,4 @@ before build:
task pingpong, "Run pingpong example":
buildRust()
exec "nim c -r --path:src --passL:../target/release/liblibchat.a examples/pingpong.nim"
exec "nim c -r --path:src --passL:../target/release/liblibchat.a --passL:-lm examples/pingpong.nim"