This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add package building to CI
- Loading branch information
Showing
2 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |