@@ -2,8 +2,8 @@ name: Draft
2
2
3
3
on :
4
4
push :
5
- tags :
6
- - " v[0-9]+.[0-9]+.[0-9]+"
5
+ branches : [main]
6
+ tags : [ "v[0-9]+.[0-9]+.[0-9]+"]
7
7
schedule :
8
8
- cron : " 0 */6 * * *"
9
9
workflow_dispatch :
@@ -26,26 +26,19 @@ jobs:
26
26
- os : macos-latest
27
27
target : aarch64-apple-darwin
28
28
runs-on : ${{ matrix.os }}
29
+ env :
30
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : aarch64-linux-gnu-gcc
29
31
steps :
30
32
- uses : actions/checkout@v4
31
33
32
34
- name : Install gcc-aarch64-linux-gnu
33
35
if : matrix.target == 'aarch64-unknown-linux-gnu'
34
- run : |
35
- sudo apt-get update && sudo apt-get install -yq gcc-aarch64-linux-gnu
36
- echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
37
- echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc" >> $GITHUB_ENV
36
+ run : sudo apt-get update && sudo apt-get install -yq gcc-aarch64-linux-gnu
38
37
39
38
- name : Setup Rust toolchain
40
39
run : rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
41
40
42
- - name : Setup Rust cache
43
- uses : Swatinem/rust-cache@v2
44
- with :
45
- prefix-key : rust
46
- shared-key : ${{ matrix.target }}@release
47
-
48
- - name : Run sccache-cache
41
+ - name : Setup sccache
49
42
uses :
mozilla-actions/[email protected]
50
43
51
44
- name : Build
@@ -66,30 +59,23 @@ jobs:
66
59
- os : windows-latest
67
60
target : aarch64-pc-windows-msvc
68
61
runs-on : ${{ matrix.os }}
62
+ env :
63
+ YAZI_GEN_COMPLETIONS : true
64
+ CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER : lld-link.exe
65
+ CARGO_TARGET_AARCH64_PC_WINDOWS_MSVC_LINKER : lld-link.exe
69
66
steps :
70
67
- uses : actions/checkout@v4
71
68
72
69
- name : Setup Rust toolchain
73
70
run : rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
74
71
75
- - name : Setup Rust cache
76
- uses : Swatinem/rust-cache@v2
77
- with :
78
- prefix-key : rust
79
- shared-key : ${{ matrix.target }}@release
80
-
81
- - name : Run sccache-cache
72
+ - name : Setup sccache
82
73
uses :
mozilla-actions/[email protected]
83
74
84
75
- name : Build
85
- env :
86
- YAZI_GEN_COMPLETIONS : true
87
- run : |
88
- cargo build -p yazi-cli --release --locked --target ${{ matrix.target }}
89
- cargo build -p yazi-fm --release --locked --target ${{ matrix.target }}
76
+ run : cargo build --release --locked --target ${{ matrix.target }}
90
77
91
78
- name : Pack artifact
92
- if : matrix.os == 'windows-latest'
93
79
env :
94
80
TARGET_NAME : yazi-${{ matrix.target }}
95
81
run : |
@@ -123,13 +109,7 @@ jobs:
123
109
- name : Add musl target
124
110
run : rustup target add ${{ matrix.target }}
125
111
126
- - name : Setup Rust cache
127
- uses : Swatinem/rust-cache@v2
128
- with :
129
- prefix-key : rust
130
- shared-key : ${{ matrix.target }}@release
131
-
132
- - name : Run sccache-cache
112
+ - name : Setup sccache
133
113
uses :
mozilla-actions/[email protected]
134
114
135
115
- name : Build
@@ -142,6 +122,7 @@ jobs:
142
122
path : yazi-${{ matrix.target }}.zip
143
123
144
124
build-snap :
125
+ if : false # Can't make CI pass, disable for now
145
126
strategy :
146
127
matrix :
147
128
include :
@@ -151,13 +132,7 @@ jobs:
151
132
steps :
152
133
- uses : actions/checkout@v4
153
134
154
- - name : Setup Rust cache
155
- uses : Swatinem/rust-cache@v2
156
- with :
157
- prefix-key : rust
158
- shared-key : ${{ matrix.target }}@release
159
-
160
- - name : Run sccache-cache
135
+ - name : Setup sccache
161
136
uses :
mozilla-actions/[email protected]
162
137
163
138
- name : Build
@@ -173,18 +148,18 @@ jobs:
173
148
path : yazi-${{ matrix.target }}.snap
174
149
175
150
draft :
151
+ if : startsWith(github.ref, 'refs/tags/')
176
152
permissions :
177
153
contents : write
178
154
runs-on : ubuntu-latest
179
- needs : [build-unix, build-windows, build-musl, build-snap ]
155
+ needs : [build-unix, build-windows, build-musl]
180
156
steps :
181
157
- uses : actions/download-artifact@v4
182
158
with :
183
159
merge-multiple : true
184
160
185
161
- name : Draft
186
162
uses : softprops/action-gh-release@v1
187
- if : startsWith(github.ref, 'refs/tags/')
188
163
with :
189
164
draft : true
190
165
files : |
@@ -193,10 +168,11 @@ jobs:
193
168
generate_release_notes : true
194
169
195
170
nightly :
171
+ if : ${{ !startsWith(github.ref, 'refs/tags/') }}
196
172
permissions :
197
173
contents : write
198
174
runs-on : ubuntu-latest
199
- needs : [build-unix, build-windows, build-musl, build-snap ]
175
+ needs : [build-unix, build-windows, build-musl]
200
176
steps :
201
177
- uses : actions/download-artifact@v4
202
178
with :
@@ -210,7 +186,6 @@ jobs:
210
186
211
187
- name : Nightly
212
188
uses : softprops/action-gh-release@v1
213
- if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
214
189
with :
215
190
tag_name : nightly
216
191
prerelease : true
0 commit comments