8989 os : macos-latest
9090 rust : stable
9191 target : x86_64-apple-darwin
92+ - buid : macos
93+ os : macos-latest
94+ rust : stable
95+ target : aarch64-apple-darwin
9296 - build : windows
9397 os : windows-latest
9498 rust : stable
@@ -97,6 +101,14 @@ jobs:
97101 - name : Checkout
98102 uses : actions/checkout@v2
99103
104+ - name : Cache build artifacts
105+ uses : actions/cache@v3
106+ with :
107+ key : no_gui-${{ matrix.os }}-${{ matrix.target }}-artifacts
108+ path : |
109+ ./target
110+ ~/.cargo
111+
100112 - name : Install rust
101113 uses : actions-rs/toolchain@v1
102114 with :
@@ -174,6 +186,14 @@ jobs:
174186 - name : Checkout
175187 uses : actions/checkout@v2
176188
189+ - name : Cache build artifacts
190+ uses : actions/cache@v3
191+ with :
192+ key : gui-${{ matrix.os }}-artifacts
193+ path : |
194+ ./target
195+ ~/.cargo
196+
177197 - name : Install rust
178198 uses : actions-rs/toolchain@v1
179199 with :
@@ -200,6 +220,10 @@ jobs:
200220 name : Install gui library packages
201221 run : sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential libayatana-appindicator3-dev librsvg2-dev libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev
202222
223+ - if : startsWith(matrix.os, 'macos') == true
224+ name : Install rust apple arm target
225+ run : rustup target add aarch64-apple-darwin
226+
203227 - name : Install node packages
204228 working-directory : ./web_frontend
205229 run : npm i
@@ -211,7 +235,7 @@ jobs:
211235
212236 - name : Build desktop app
213237 id : desktop_app
214- uses : tauri-apps/tauri-action@v0
238+ uses : tauri-apps/tauri-action@5a6072a9edbbf71718caee364b5b96731d7580fc # v0 does not handle universal builds
215239 env :
216240 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
217241 with :
@@ -220,3 +244,4 @@ jobs:
220244 releaseBody : ' See the assets to download this version and install.'
221245 releaseDraft : true
222246 prerelease : false
247+ args : ${{ startsWith(matrix.os, 'macos') == true && '--target universal-apple-darwin' || '' }}
0 commit comments