add rust code to CI
authorJacob Lifshay <programmerjake@gmail.com>
Sat, 25 Feb 2023 00:56:15 +0000 (16:56 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Sat, 25 Feb 2023 00:56:15 +0000 (16:56 -0800)
.gitlab-ci.yml

index 0e4f08c52240dfa3c12adc760811210ae5398bc0..4574c0fe41c9d7c6a41e501af1a4086432268ce3 100644 (file)
@@ -16,6 +16,7 @@ build:
             binutils-powerpc64le-linux-gnu
             build-essential
             ccache
+            curl
             git
             libffi-dev
             pkg-config
@@ -32,7 +33,14 @@ build:
         - ccache --zero-stats || true
         - ccache --show-stats || true
         - python3 -m pip install --user pytest-xdist
+        - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.67.1 --profile minimal --component rustfmt
+        - source "$HOME/.cargo/env"
     script:
+        - pushd register_allocator
+        - cargo fmt --all --check
+        - cargo test --locked --workspace
+        - popd
+
         - git clone --depth 1 https://gitlab.com/nmigen/nmigen.git nmigen
         - pushd nmigen
         - git rev-parse HEAD