Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Commit

Permalink
Add package building to CI (#44)
Browse files Browse the repository at this point in the history
* Add package building to CI
  • Loading branch information
frenkel authored Sep 16, 2021
1 parent 16bf099 commit b9b5d27
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
name: Tests
on: [push]
name: Build packages
on:
release:
types:
- created
env:
CARGO_TERM_COLOR: always
jobs:
cargo-test:
runs-on: ubuntu-latest
build-deb:
runs-on: ubuntu-18.04
steps:
- run: sudo apt-get install -y libssl-dev libgtk-3-dev
- run: cargo install cargo-deb cargo-rpm

- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
key: target-dir-cache
key: target-dir-cache-release
path: target/

- run: cargo deb
- run: cargo rpm build
- run: find target/release/rpmbuild

- run: mv target/debian/timer-for-harvest_*_amd64.deb .
- run: mv target/release/rpmbuild/RPMS/x86_64/timer-for-harvest*.rpm .

- run: cargo build
- run: cargo test

- uses: actions/upload-artifact@v2
with:
name: packages
path: |
timer-for-harvest_*_amd64.deb
timer-for-harvest*.rpm
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests
on: [push]
env:
CARGO_TERM_COLOR: always
jobs:
cargo-test:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y libssl-dev libgtk-3-dev

- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
key: target-dir-cache
path: target/

- run: cargo build
- run: cargo test

0 comments on commit b9b5d27

Please sign in to comment.