This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (89 loc) · 2.76 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
on:
schedule:
- cron: '0 1 * * *'
name: Nightly build
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (Linux x86)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features email,jaeger,markdown
- shell: bash
run: strip target/release/tranquility
- shell: bash
run: mv target/release/tranquility target/release/tranquility-x86
- uses: actions/upload-artifact@v2
with:
name: tranquility-linux
path: target/release/tranquility-x86
retention-days: 1
build_armv7:
name: Build (Linux ARMv7)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: armv7-unknown-linux-gnueabihf
override: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target armv7-unknown-linux-gnueabihf --features jaeger,markdown
- shell: bash
run: mv target/armv7-unknown-linux-gnueabihf/release/tranquility target/armv7-unknown-linux-gnueabihf/release/tranquility-armv7
- uses: actions/upload-artifact@v2
with:
name: tranquility-linux-armv7
path: target/armv7-unknown-linux-gnueabihf/release/tranquility-armv7
retention-days: 1
publish:
needs: [build, build_armv7]
runs-on: ubuntu-latest
steps:
- uses: dev-drprasad/delete-tag-and-release@v0.1.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
delete_release: true
tag_name: nightly
- uses: actions/download-artifact@v2
- name: Upload binaries
uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly
prerelease: true
gzip: false
files: >
tranquility-linux-x86:./tranquility-linux/tranquility-x86
tranquility-linux-armv7:./tranquility-linux-armv7/tranquility-armv7