aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-02-27 22:51:26 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-02-27 22:51:26 +0100
commit431dca3b8a128d24dc8c80d50e778e82c7e7fe9b (patch)
tree199422eaf2971b81e545408be551a656f61bc2cb /.github/workflows
parentac0bbe89d2040c7ee37dd741e12632aac307a06a (diff)
downloadjuicebox-asm-431dca3b8a128d24dc8c80d50e778e82c7e7fe9b.tar.gz
juicebox-asm-431dca3b8a128d24dc8c80d50e778e82c7e7fe9b.zip
Add gh action for tests and rustdoc
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/rustdoc.yml25
-rw-r--r--.github/workflows/tests.yml28
2 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml
new file mode 100644
index 0000000..26d279f
--- /dev/null
+++ b/.github/workflows/rustdoc.yml
@@ -0,0 +1,25 @@
+name: rustdoc
+
+on:
+ push:
+ branches: [ main ]
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Generate doc
+ run: |
+ cargo doc --no-deps
+ echo "<meta http-equiv=\"Refresh\" content=\"0; url='juicebox_asm/index.html'\"/>" > target/doc/index.html
+
+ - name: Upload doc to gh pages
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./target/doc
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..c98d2fb
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,28 @@
+name: tests
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build
+ run: cargo build --verbose
+
+ - name: Build examples
+ run: cargo build --verbose --examples
+
+ - name: Check fmt
+ run: cargo fmt --check
+
+ - name: Run tests
+ run: cargo test --verbose