CI: install Rust toolchain and build native lib before the Scheme build
ober
c73837973dcbfc5cec42d97a92a79a490a5e4df2
--- a/.build.yml +++ b/.build.yml @@ -18,6 +18,14 @@ sources: - https://git.sr.ht/~lisp/jerboa - https://git.sr.ht/~lisp/jerboa-code tasks: + - setup-rust: | + # jerboa's native FFI lib (libjerboa_native) is built with cargo and is + # required at *compile* time by jcode: importing (std crypto native-rust), + # (std regex), (std net request) etc. binds the lib's symbols the moment + # the library is visited. debian/stable ships no Rust toolchain, so + # install one via rustup and persist it onto PATH for every later task. + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable + echo 'source "$HOME/.cargo/env"' >> ~/.buildenv - bootstrap-chez: | cd jerboa # Build the vendored Chez Scheme locally into ~/jerboa/.chez. @@ -25,6 +33,10 @@ tasks: make chez - build-jerboa: | cd jerboa + # Build the Rust native lib FIRST. The stdlib libraries jcode imports + # bind its FFI symbols at visit time, so libjerboa_native must already be + # in lib/ before anything importing them is compiled. + make native make build - vendor-code: | cd jerboa-code