File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout raysense
14+ uses : actions/checkout@v4
15+
16+ - name : Checkout rayforce
17+ uses : actions/checkout@v4
18+ with :
19+ repository : RayforceDB/rayforce
20+ path : deps/rayforce
21+
22+ - name : Build rayforce library
23+ run : make -C deps/rayforce lib
24+
25+ - name : Check formatting
26+ run : cargo fmt --check
27+
28+ - name : Run tests
29+ run : cargo test
30+ env :
31+ RAYFORCE_DIR : deps/rayforce
Original file line number Diff line number Diff line change 22Cargo.lock
33/local /
44.codex
5+ /deps /rayforce /
Original file line number Diff line number Diff line change @@ -3,17 +3,24 @@ use std::path::PathBuf;
33
44fn main ( ) {
55 let manifest_dir = PathBuf :: from ( env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ) ;
6- let rayforce_dir = env:: var_os ( "RAYFORCE_DIR" )
7- . map ( PathBuf :: from)
8- . unwrap_or_else ( || manifest_dir. join ( "../../.." ) . join ( "rayforce" ) ) ;
6+ let repo_root = manifest_dir. join ( "../.." ) ;
7+ let checkout_dir = repo_root. join ( "deps/rayforce" ) ;
8+ let sibling_dir = repo_root. join ( "../rayforce" ) ;
9+ let rayforce_dir = env:: var_os ( "RAYFORCE_DIR" ) . map ( PathBuf :: from) . unwrap_or ( {
10+ if checkout_dir. exists ( ) {
11+ checkout_dir
12+ } else {
13+ sibling_dir
14+ }
15+ } ) ;
916
1017 let include_dir = rayforce_dir. join ( "include" ) ;
1118 let lib_dir = rayforce_dir. clone ( ) ;
1219 let lib_path = lib_dir. join ( "librayforce.a" ) ;
1320
1421 if !lib_path. exists ( ) {
1522 panic ! (
16- "missing {}; build it with `make -C {} lib` or set RAYFORCE_DIR" ,
23+ "missing {}; build Rayforce with `make -C {} lib` or set RAYFORCE_DIR" ,
1724 lib_path. display( ) ,
1825 rayforce_dir. display( )
1926 ) ;
You can’t perform that action at this time.
0 commit comments