Skip to content

Commit

Permalink
Remove layout tests (#196)
Browse files Browse the repository at this point in the history
* Remove the layout tests, as we never do anything
with them...

* Update bindings [skip ci]

* Added a feature-gate to layout tests,
and adjusted CI to test with layouts,
and then to save without layout tests

* Update bindings [skip ci]

---------

Co-authored-by: CGMossa <[email protected]>
  • Loading branch information
CGMossa and CGMossa authored Nov 13, 2023
1 parent d83b470 commit 6fc2b5f
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24,655 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,25 @@ jobs:
env:
RUST_TARGET: ${{ matrix.config.target }}

# Build and emit bindings to './generated_bindings'
- name: Build & Emit bindings
id: build

# Build & run bindings with layout tests
- name: Run tests
id: test
if: matrix.config.skip-tests != 'true'
run: |
. ./ci-cargo.ps1
ci-cargo build -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) -ActionName "Building for target: $env:RUST_TARGET"
ci-cargo test -vv --features use-bindgen,layout_tests $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture -ActionName "Running bindgen tests for target: $env:RUST_TARGET"
env:
LIBRSYS_BINDINGS_OUTPUT_PATH: generated_bindings
RUST_TARGET: ${{ matrix.config.target }}

# Test the result of previous step
- name: Run tests
id: test
if: matrix.config.skip-tests != 'true'
# Build and emit bindings to './generated_bindings'
- name: Build & Emit bindings
id: build
run: |
. ./ci-cargo.ps1
ci-cargo test -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture --test-threads=1 -ActionName "Running bindgen tests for target: $env:RUST_TARGET"
ci-cargo build -vv --features use-bindgen $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) -ActionName "Building for target: $env:RUST_TARGET"
env:
LIBRSYS_BINDINGS_OUTPUT_PATH: generated_bindings
RUST_TARGET: ${{ matrix.config.target }}

- name: Upload generated bindings
Expand All @@ -230,7 +231,7 @@ jobs:
if: matrix.config.skip-tests != 'true'
run: |
. ./ci-cargo.ps1
ci-cargo test -vv $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture --test-threads=1 -ActionName "Running tests for target: $env:RUST_TARGET"
ci-cargo test -vv $(if ($env:RUST_TARGET -ne '') {"--target=$env:RUST_TARGET"} ) '--' --nocapture -ActionName "Running tests for target: $env:RUST_TARGET"
env:
RUST_TARGET: ${{ matrix.config.target }}

Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ clang = { version = "2", optional = true, features = ["runtime", "clang_3_7"] }
# By default, we use pre-computed bindings that ship with the library. This may fail!
# Turn on the 'use-bindgen' feature to generate bindings on the fly for your platform.
use-bindgen = ["bindgen", "clang"]
# Enables generation of layout-tests in bindgen
layout_tests = []

[lib]
# Some code comments on R's source code might be accidentally treated as Rust's
Expand Down
Loading

0 comments on commit 6fc2b5f

Please sign in to comment.