File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 matrix :
1010 os : [ubuntu-latest, macos-latest]
1111 build_type : [Debug, Release]
12- test :
13- - name : unit-tests
14- target : check
15- - name : benchmarks (skip-run)
16- target : check-benchmarks
17- skip_run : " 1"
1812
1913 runs-on : ${{ matrix.os }}
2014 name : ${{ matrix.test.name }} (${{ matrix.os }}, ${{ matrix.build_type }})
5347 run : ninja
5448 working-directory : build
5549
56- - name : Run tests
57- run : ninja ${{ matrix.test.target }}
50+ - name : Run unit tests
51+ run : ninja check
52+ working-directory : build
53+
54+ - name : Check rules
55+ run : ninja check-rules
56+ working-directory : build
57+
58+ - name : Check benchmarks (don't run)
59+ run : ninja check-benchmarks
5860 working-directory : build
5961 env :
60- SKIP_RUN : ${{ matrix.test.skip_run }}
62+ SKIP_RUN : 1
Original file line number Diff line number Diff line change @@ -138,17 +138,15 @@ add_custom_target("check"
138138 DEPENDS check-libcc2rs check-unit
139139 )
140140
141- add_custom_target ("gen -rules"
141+ add_custom_target ("check -rules"
142142 COMMAND find ${PROJECT_SOURCE_DIR } /rules -name "ir*.json" -delete
143143 COMMAND cargo build
144- COMMAND ${CMAKE_COMMAND } -E chdir ${PROJECT_SOURCE_DIR } /rule-preprocessor
145- ${CMAKE_COMMAND } -E env
146- CARGO_TARGET_DIR=${PROJECT_SOURCE_DIR}/rule-preprocessor/target
147- cargo clean
148144 COMMAND ${CMAKE_COMMAND } -E chdir ${PROJECT_SOURCE_DIR } /rule-preprocessor
149145 ${CMAKE_COMMAND } -E env
150146 CARGO_TARGET_DIR=${PROJECT_SOURCE_DIR}/rule-preprocessor/target
151147 cargo run
148+ COMMAND ${CMAKE_COMMAND } -E chdir ${PROJECT_SOURCE_DIR }
149+ git diff --exit-code -- rules/
152150 WORKING_DIRECTORY "${PROJECT_SOURCE_DIR } /rules"
153151 DEPENDS install -rust-toolchain
154152 USES_TERMINAL
Original file line number Diff line number Diff line change 5151ninja check
5252```
5353
54- If any change was made to the translation rules, regenerate the IR with:
55-
56- ``` bash
57- ninja gen-rules
58- ```
59-
6054
6155## Run
6256
@@ -139,6 +133,9 @@ ninja check-benchmarks
139133# Check benchmark output without executing binaries
140134SKIP_RUN=1 ninja check-benchmarks
141135
136+ # Regenerate and check if the IR for the rules changed
137+ ninja check-rules
138+
142139# Regenerate expected output for unit tests after intentional changes
143140REPLACE_EXPECTED=1 ninja check-unit
144141```
Original file line number Diff line number Diff line change 1- // Copyright (c) 2022-present INESC-ID.
2- // Distributed under the MIT license that can be found in the LICENSE file.
3-
41#[ path = r#"../algorithm/tgt_refcount.rs"# ]
52pub mod algorithm_tgt_refcount;
63#[ path = r#"../algorithm/tgt_unsafe.rs"# ]
You can’t perform that action at this time.
0 commit comments