Skip to content

Commit b2e99f7

Browse files
committed
chore: add rust windows test to CI
1 parent b128b80 commit b2e99f7

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,14 +444,23 @@ jobs:
444444
# gradlew
445445
run: gradle jvmMainClasses jvmTest jsTest jsBrowserTest
446446

447-
build-rust:
448-
name: Build Rust
447+
build-rust-linux:
448+
name: Build Rust Linux
449449
runs-on: ubuntu-latest
450450
steps:
451451
- uses: actions/checkout@v3
452452
- name: test
453453
working-directory: tests
454454
run: bash RustTest.sh
455+
456+
build-rust-windows:
457+
name: Build Rust Windows
458+
runs-on: windows-2019
459+
steps:
460+
- uses: actions/checkout@v3
461+
- name: test
462+
working-directory: tests
463+
run: ./RustTest.bat
455464

456465
build-python:
457466
name: Build Python

tests/RustTest.bat

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@ rem limitations under the License.
1515

1616
rem Compile then run the Rust test.
1717

18-
cd rust_usage_test
18+
cd rust_serialize_test
19+
cargo run -- --quiet || exit /b 1
20+
21+
cd ../rust_no_std_compilation_test
22+
rustup install nightly
23+
rustup component add rust-src --toolchain nightly
24+
rustup target add thumbv7m-none-eabi
25+
cargo +nightly build || exit /b 1
26+
27+
cd ../rust_usage_test
1928
cargo test -- --quiet || exit /b 1
2029
cargo run --bin=flatbuffers_alloc_check || exit /b 1
2130
cargo run --bin=flexbuffers_alloc_check || exit /b 1
2231
cargo run --bin=monster_example || exit /b 1
2332
cd ..
2433

25-
cd rust_no_std_compilation_test
26-
rustup install nightly
27-
rustup component add rust-src --toolchain nightly
28-
rustup target add thumbv7m-none-eabi
29-
cargo build || exit /b 1
30-
cd ..

0 commit comments

Comments
 (0)