Merge pull request #11 from hexedtech/add-version #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
types: [review_requested, synchronize] | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
runner: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
features: | |
- java | |
- js | |
- py | |
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 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 | |
action: build | |
extra: | |
- runner: macos-latest | |
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 }} | |
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 |