2024-09-09 17:08:24 +02:00
|
|
|
name: test
|
2023-08-16 23:38:34 +02:00
|
|
|
|
|
|
|
on:
|
2023-08-16 23:39:50 +02:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
2024-09-25 06:07:58 +02:00
|
|
|
pull_request:
|
|
|
|
types: [review_requested, synchronize]
|
2023-08-16 23:38:34 +02:00
|
|
|
|
|
|
|
env:
|
2023-08-16 23:39:50 +02:00
|
|
|
CARGO_TERM_COLOR: always
|
2023-08-16 23:38:34 +02:00
|
|
|
|
2024-09-09 17:08:24 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-08-16 23:38:34 +02:00
|
|
|
jobs:
|
2024-09-17 12:53:53 +02:00
|
|
|
build:
|
2024-09-17 02:09:32 +02:00
|
|
|
runs-on: ${{ matrix.runner }}
|
2023-08-16 23:39:50 +02:00
|
|
|
strategy:
|
2024-08-17 18:48:42 +02:00
|
|
|
fail-fast: false
|
2023-08-16 23:39:50 +02:00
|
|
|
matrix:
|
2024-09-17 02:09:32 +02:00
|
|
|
runner:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
- macos-latest
|
2024-08-17 18:38:37 +02:00
|
|
|
features:
|
|
|
|
- java
|
|
|
|
- js
|
2024-09-13 22:21:53 +02:00
|
|
|
- py
|
2023-08-16 23:39:50 +02:00
|
|
|
toolchain:
|
|
|
|
- stable
|
2024-09-17 02:09:32 +02:00
|
|
|
- beta
|
|
|
|
- nightly
|
2023-08-16 23:39:50 +02:00
|
|
|
steps:
|
2024-09-09 17:30:23 +02:00
|
|
|
- uses: arduino/setup-protoc@v3
|
2024-09-10 14:51:58 +02:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-09-09 19:47:42 +02:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
2024-09-17 12:53:53 +02:00
|
|
|
- run: cargo build --release --verbose --features=${{ matrix.features }}
|
|
|
|
|
2024-09-17 20:28:59 +02:00
|
|
|
# TODO to build lua bindings on macos, we need to tweak the compile command to expose symbols
|
|
|
|
# since i can't add conditional steps to above task, i have to separate off lua from the rest...
|
|
|
|
build-lua:
|
|
|
|
runs-on: ${{ matrix.platform.runner }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform:
|
|
|
|
- runner: ubuntu-latest
|
|
|
|
action: build
|
|
|
|
extra:
|
|
|
|
- runner: windows-latest
|
2024-09-17 20:41:05 +02:00
|
|
|
action: build
|
2024-09-17 20:28:59 +02:00
|
|
|
extra:
|
|
|
|
- runner: macos-latest
|
2024-09-17 20:41:05 +02:00
|
|
|
action: rustc
|
2024-09-17 20:28:59 +02:00
|
|
|
extra: -- -C link-arg=-undefined -C link-arg=dynamic_lookup
|
|
|
|
features:
|
|
|
|
- luajit
|
|
|
|
- lua54
|
|
|
|
toolchain:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
- run: cargo ${{ matrix.platform.action }} --release --verbose --features=${{ matrix.features }} ${{ matrix.platform.extra }}
|
|
|
|
|
2024-09-17 12:53:53 +02:00
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
runner:
|
|
|
|
- ubuntu-latest
|
|
|
|
- windows-latest
|
|
|
|
- macos-latest
|
|
|
|
toolchain:
|
|
|
|
- stable
|
|
|
|
- beta
|
|
|
|
- nightly
|
|
|
|
steps:
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.toolchain }}
|
|
|
|
- run: cargo test --verbose
|