panorama/.github/workflows/ci.yml
2021-03-25 04:35:31 -05:00

69 lines
1.3 KiB
YAML

on: [push]
name: workflow
jobs:
workflow:
runs-on: ubuntu-latest
steps:
# Setup
- name: checkout
uses: actions/checkout@v2
- name: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: mdbook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
# Run tests
- name: run tests
run: |
cargo test --all
# Generate documentation
- name: build mdbook
run: |
mdbook build docs -d $(pwd)/public
- name: build api docs
run: |
cargo doc --workspace --no-deps --document-private-items
cp -r target/doc public/api
- name: deploy
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages
folder: public
# Build debian package
- name: build-deb
run: |
cargo install cargo-deb
cargo deb
- uses: actions/upload-artifact@v2
with:
name: panorama.deb
path: target/debian/panorama*.deb
# Cache massively
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo
# vim: set sw=2 et :