Skip to content

Commit

Permalink
chore: add rust windows test to CI, fix RustTest.bat (#7963)
Browse files Browse the repository at this point in the history
Co-authored-by: Derek Bailey <derekbailey@google.com>
  • Loading branch information
sssooonnnggg and dbaileychess authored May 16, 2023
1 parent 0675531 commit ea7cfcd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,23 @@ jobs:
# gradlew
run: gradle jvmMainClasses jvmTest jsTest jsBrowserTest

build-rust:
name: Build Rust
build-rust-linux:
name: Build Rust Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: test
working-directory: tests
run: bash RustTest.sh

build-rust-windows:
name: Build Rust Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: test
working-directory: tests
run: ./RustTest.bat

build-python:
name: Build Python
Expand Down
17 changes: 10 additions & 7 deletions tests/RustTest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ rem limitations under the License.

rem Compile then run the Rust test.

cd rust_usage_test
cd rust_serialize_test
cargo run -- --quiet || exit /b 1

cd ../rust_no_std_compilation_test
rustup install nightly
rustup component add rust-src --toolchain nightly
rustup target add thumbv7m-none-eabi
cargo +nightly build || exit /b 1

cd ../rust_usage_test
cargo test -- --quiet || exit /b 1
cargo run --bin=flatbuffers_alloc_check || exit /b 1
cargo run --bin=flexbuffers_alloc_check || exit /b 1
cargo run --bin=monster_example || exit /b 1
cd ..

cd rust_no_std_compilation_test
rustup install nightly
rustup component add rust-src --toolchain nightly
rustup target add thumbv7m-none-eabi
cargo build || exit /b 1
cd ..

0 comments on commit ea7cfcd

Please sign in to comment.