From 192ea349b5d811e4ce1cca6ce9184a37d629af4d Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 25 Mar 2021 04:35:31 -0500 Subject: [PATCH] combine workflows --- .github/workflows/build-deb.yml | 34 ------------------------- .github/workflows/{doc.yml => ci.yml} | 36 +++++++++++++++++++++------ .github/workflows/run-tests.yml | 29 --------------------- 3 files changed, 28 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/build-deb.yml rename .github/workflows/{doc.yml => ci.yml} (65%) delete mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml deleted file mode 100644 index 4a2f9cf..0000000 --- a/.github/workflows/build-deb.yml +++ /dev/null @@ -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 : diff --git a/.github/workflows/doc.yml b/.github/workflows/ci.yml similarity index 65% rename from .github/workflows/doc.yml rename to .github/workflows/ci.yml index f7f94d2..0f0398f 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/ci.yml @@ -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 : diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index 5dc0666..0000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -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 :