10
10
- cron : ' 30 1 * * 0'
11
11
12
12
jobs :
13
+ release :
14
+ name : Release
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout Repository
18
+ uses : actions/checkout@v3
19
+ - name : Install Rust
20
+ uses : dtolnay/rust-toolchain@master
21
+ with :
22
+ toolchain : stable
23
+ components : clippy, rustfmt
24
+ - name : Build
25
+ run : |
26
+ cargo --locked build --profile release
27
+ - name : Install Test Dependencies
28
+ run : |
29
+ sudo apt-get update
30
+ sudo apt-get install quilt gnupg2 libio-pty-perl
31
+ - name : Test
32
+ env :
33
+ STG_PROVE_OPTS : " --jobs=2"
34
+ STG_TEST_OPTS : " --verbose-log"
35
+ STG_PROFILE : " release"
36
+ run : |
37
+ timeout 900s make -C t prove
38
+ - name : Show Failures
39
+ if : ${{ failure() }}
40
+ run : |
41
+ make -C t show-failure-results
42
+ - name : Install Doc Dependencies
43
+ run : |
44
+ sudo apt-get install asciidoc asciidoctor docbook-xsl-ns xmlto
45
+ - name : Build Docs Asciidoc
46
+ run : |
47
+ make -j2 doc
48
+ - name : Build Docs Asciidoctor
49
+ run : |
50
+ make -j2 USE_ASCIIDOCTOR=1 doc
51
+ - name : Install HTML Docs
52
+ run : |
53
+ make -j2 USE_ASCIIDOCTOR=1 htmldir="$GITHUB_WORKSPACE"/stgit-html install-html
54
+ - name : Upload HTML Docs
55
+ uses : actions/upload-artifact@v3
56
+ with :
57
+ name : html-doc
58
+ path : ${{ github.workspace }}/stgit-html
59
+ - name : Install cargo-deb
60
+ uses : baptiste0928/cargo-install@v2
61
+ with :
62
+ crate : cargo-deb
63
+ - name : Install cargo-generate-rpm
64
+ uses : baptiste0928/cargo-install@v2
65
+ with :
66
+ crate : cargo-generate-rpm
67
+ - name : Build Packages
68
+ run : |
69
+ make USE_ASCIIDOCTOR=1 deb rpm
70
+ - name : Upload deb
71
+ uses : actions/upload-artifact@v3
72
+ with :
73
+ name : stgit-deb
74
+ path : target/debian/stgit_*.deb
75
+ - name : Upload rpm
76
+ uses : actions/upload-artifact@v3
77
+ with :
78
+ name : stgit-rpm
79
+ path : target/generate-rpm/stgit-*.rpm
80
+
13
81
build-and-test :
14
82
name : Build and Test
15
83
strategy :
16
84
fail-fast : false
17
85
matrix :
18
86
include :
19
- - os : ubuntu-latest
20
- profile : release
21
- toolchain : stable
22
87
- os : ubuntu-latest
23
88
profile : dev
24
89
toolchain : stable
38
103
toolchain : ${{ matrix.toolchain }}
39
104
- name : Build
40
105
run : |
41
- cargo --locked build --all-features -- profile ${{ matrix.profile }}
106
+ cargo --locked build --profile ${{ matrix.profile }}
42
107
- name : Install Test Dependencies (Ubuntu)
43
108
if : matrix.os == 'ubuntu-latest'
44
109
run : |
@@ -123,65 +188,6 @@ jobs:
123
188
run : |
124
189
cargo rustdoc -- --deny warnings
125
190
126
- docs :
127
- name : User Documentation
128
- runs-on : ubuntu-latest
129
- steps :
130
- - name : Checkout Repository
131
- uses : actions/checkout@v3
132
- - name : Install Rust
133
- uses : dtolnay/rust-toolchain@master
134
- with :
135
- toolchain : stable
136
- - name : Install dependencies
137
- run : |
138
- sudo apt-get update
139
- sudo apt-get install asciidoc asciidoctor docbook-xsl-ns xmlto
140
- - name : Build Docs Asciidoc
141
- run : |
142
- make -j2 doc
143
- - name : Build Docs Asciidoctor
144
- run : |
145
- make -j2 USE_ASCIIDOCTOR=1 doc
146
- - name : Install HTML Docs
147
- run : |
148
- make -j2 USE_ASCIIDOCTOR=1 htmldir="$GITHUB_WORKSPACE"/stgit-html install-html
149
- - name : Upload HTML Docs
150
- uses : actions/upload-artifact@v3
151
- with :
152
- name : html-doc
153
- path : ${{ github.workspace }}/stgit-html
154
-
155
- packages :
156
- name : Prebuilt Packages
157
- runs-on : ubuntu-latest
158
- steps :
159
- - name : Checkout Repository
160
- uses : actions/checkout@v3
161
- - name : Install Rust
162
- uses : dtolnay/rust-toolchain@master
163
- with :
164
- toolchain : stable
165
- - name : Install cargo-deb
166
- run : |
167
- cargo install cargo-deb
168
- - name : Install cargo-generate-rpm
169
- run : |
170
- cargo install cargo-generate-rpm
171
- - name : Build Packages
172
- run : |
173
- make deb rpm
174
- - name : Upload deb
175
- uses : actions/upload-artifact@v3
176
- with :
177
- name : stgit-deb
178
- path : target/debian/stgit_*.deb
179
- - name : Upload rpm
180
- uses : actions/upload-artifact@v3
181
- with :
182
- name : stgit-rpm
183
- path : target/generate-rpm/stgit-*.rpm
184
-
185
191
windows-build :
186
192
name : Windows Build
187
193
runs-on : windows-latest
@@ -194,7 +200,7 @@ jobs:
194
200
toolchain : stable
195
201
- name : Build
196
202
run : |
197
- cargo --locked build --all-features -- profile release
203
+ cargo --locked build --profile release
198
204
- name : Setup MSYS2
199
205
uses : msys2/setup-msys2@v2
200
206
with :
0 commit comments