codemp/.github/workflows/test.yml

99 lines
2.4 KiB
YAML
Raw Normal View History

name: test
on:
2023-08-16 23:39:50 +02:00
push:
branches:
- dev
env:
2023-08-16 23:39:50 +02:00
CARGO_TERM_COLOR: always
permissions:
contents: read
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:
- rust
- java
- js
- 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:
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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 }}
# 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
extra:
- runner: macos-latest
2024-09-17 20:41:05 +02:00
action: rustc
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