Add basic presubmit checks for ureg repo.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..900a405
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,21 @@
+name: Continuous Integration
+
+on:
+  push:
+    branches:
+      - main
+  pull_request:
+    branches:
+      - main
+
+jobs:
+  execute:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repo
+        uses: actions/checkout@v3
+
+      - name: Execute CI
+        run: |
+            ./ci.sh
diff --git a/ci-tools/file-header-fix.sh b/ci-tools/file-header-fix.sh
new file mode 100755
index 0000000..e68bcf7
--- /dev/null
+++ b/ci-tools/file-header-fix.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Licensed under the Apache-2.0 license
+
+cargo install --git https://github.com/chipsalliance/caliptra-sw --root /tmp/caliptra-file-header-fix caliptra-file-header-fix
+
+echo Running file-header-fix
+/tmp/caliptra-file-header-fix/bin/caliptra-file-header-fix "$@"
diff --git a/ci.sh b/ci.sh
new file mode 100755
index 0000000..624ec82
--- /dev/null
+++ b/ci.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Licensed under the Apache-2.0 license
+
+set -e
+
+for p in ./ lib/*; do
+  (
+    cd "$p"
+    cargo build
+    cargo test
+    cargo fmt --check
+    cargo clippy -- -D warnings
+  )
+done
+
+# Fix license headers
+ci-tools/file-header-fix.sh --check
diff --git a/lib/codegen/rust-toolchain.toml b/lib/codegen/rust-toolchain.toml
new file mode 100644
index 0000000..07660b9
--- /dev/null
+++ b/lib/codegen/rust-toolchain.toml
@@ -0,0 +1,6 @@
+# Licensed under the Apache-2.0 license
+
+[toolchain]
+channel = "1.70"
+profile = "minimal"
+components = ["rustfmt", "clippy"]
diff --git a/lib/schema/rust-toolchain.toml b/lib/schema/rust-toolchain.toml
new file mode 100644
index 0000000..07660b9
--- /dev/null
+++ b/lib/schema/rust-toolchain.toml
@@ -0,0 +1,6 @@
+# Licensed under the Apache-2.0 license
+
+[toolchain]
+channel = "1.70"
+profile = "minimal"
+components = ["rustfmt", "clippy"]
diff --git a/lib/systemrdl-parse/rust-toolchain.toml b/lib/systemrdl-parse/rust-toolchain.toml
new file mode 100644
index 0000000..07660b9
--- /dev/null
+++ b/lib/systemrdl-parse/rust-toolchain.toml
@@ -0,0 +1,6 @@
+# Licensed under the Apache-2.0 license
+
+[toolchain]
+channel = "1.70"
+profile = "minimal"
+components = ["rustfmt", "clippy"]
diff --git a/lib/systemrdl/rust-toolchain.toml b/lib/systemrdl/rust-toolchain.toml
new file mode 100644
index 0000000..07660b9
--- /dev/null
+++ b/lib/systemrdl/rust-toolchain.toml
@@ -0,0 +1,6 @@
+# Licensed under the Apache-2.0 license
+
+[toolchain]
+channel = "1.70"
+profile = "minimal"
+components = ["rustfmt", "clippy"]
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
new file mode 100644
index 0000000..0d9ca87
--- /dev/null
+++ b/rust-toolchain.toml
@@ -0,0 +1,7 @@
+# Licensed under the Apache-2.0 license
+
+[toolchain]
+channel = "1.70"
+targets = ["riscv32imc-unknown-none-elf"]
+profile = "minimal"
+components = ["rustfmt", "clippy"]