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: on: [push]
push:
branches:
- master
name: publish-documentation name: workflow
jobs: jobs:
doc: workflow:
name: panorama
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Setup
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -23,6 +22,14 @@ jobs:
with: with:
mdbook-version: 'latest' mdbook-version: 'latest'
# Run tests
- name: run tests
run: |
cargo test --all
# Generate documentation
- name: build mdbook - name: build mdbook
run: | run: |
mdbook build docs -d $(pwd)/public mdbook build docs -d $(pwd)/public
@ -38,6 +45,19 @@ jobs:
branch: gh-pages branch: gh-pages
folder: public 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 - uses: actions/cache@v2
with: with:
path: | path: |
@ -46,4 +66,4 @@ jobs:
target target
key: ${{ runner.os }}-cargo 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 :