combine workflows

This commit is contained in:
Michael Zhang 2021-03-25 04:35:31 -05:00
parent 19f42756c2
commit 192ea349b5
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 28 additions and 71 deletions

View file

@ -1,34 +0,0 @@
on: [push]
name: build-deb
jobs:
build_deb:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: build-deb
run: |
cargo install cargo-deb
cargo deb
- uses: actions/upload-artifact@v2
with:
name: panorama.deb
path: target/debian/panorama*.deb
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo
# vim: set ts=2 tw=2 sw=2 et :

View file

@ -1,15 +1,14 @@
on:
push:
branches:
- master
on: [push]
name: publish-documentation
name: workflow
jobs:
doc:
name: panorama
workflow:
runs-on: ubuntu-latest
steps:
# Setup
- name: checkout
uses: actions/checkout@v2
@ -23,6 +22,14 @@ jobs:
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
@ -38,6 +45,19 @@ jobs:
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: |
@ -46,4 +66,4 @@ jobs:
target
key: ${{ runner.os }}-cargo
# vim: set ts=2 tw=2 sw=2 et :
# vim: set sw=2 et :

View file

@ -1,29 +0,0 @@
on: [push]
name: run-tests
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: run tests
run: |
cargo test --all
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo
# vim: set ts=2 tw=2 sw=2 et :