mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-03-27 06:33:08 +00:00
chore: add nim bindings test ci check
This commit is contained in:
parent
5767997e0e
commit
8d172f0d92
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@ -36,3 +36,18 @@ jobs:
|
|||||||
- run: rustup update stable && rustup default stable
|
- run: rustup update stable && rustup default stable
|
||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- run: cargo fmt --all -- --check
|
- run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
nim-bindings-test:
|
||||||
|
name: Nim Bindings Test
|
||||||
|
runs-on: ubuntu-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
|
||||||
|
|||||||
@ -13,9 +13,13 @@ bin = @["libchat"]
|
|||||||
requires "nim >= 2.2.4"
|
requires "nim >= 2.2.4"
|
||||||
requires "results"
|
requires "results"
|
||||||
|
|
||||||
# Build Rust library before compiling Nim
|
task buildRust, "Build Rust library":
|
||||||
before build:
|
|
||||||
exec "cargo build --release --manifest-path ../Cargo.toml"
|
exec "cargo build --release --manifest-path ../Cargo.toml"
|
||||||
|
|
||||||
|
# Build Rust library before compiling Nim
|
||||||
|
before build:
|
||||||
|
buildRustTask()
|
||||||
|
|
||||||
task pingpong, "Run pingpong example":
|
task pingpong, "Run pingpong example":
|
||||||
|
buildRustTask()
|
||||||
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 examples/pingpong.nim"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user