Skip to content

Commit a2c824b

Browse files
committed
fix: build other platform
1 parent c06b270 commit a2c824b

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,15 @@ jobs:
6969
strategy:
7070
fail-fast: false
7171
matrix:
72-
platform: [macos-latest]
72+
include:
73+
- platform: "macos-latest" # for Arm based macs (M1 and above).
74+
args: "--target aarch64-apple-darwin"
75+
- platform: "macos-latest" # for Intel based macs.
76+
args: "--target x86_64-apple-darwin"
77+
- platform: "ubuntu-20.04" # for Tauri v1 you could replace this with ubuntu-20.04.
78+
args: ""
79+
- platform: "windows-latest"
80+
args: ""
7381
runs-on: ${{ matrix.platform }}
7482
steps:
7583
- name: Checkout repository
@@ -79,6 +87,17 @@ jobs:
7987

8088
- name: Rust setup
8189
uses: dtolnay/rust-toolchain@stable
90+
with:
91+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
92+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
93+
94+
- name: install dependencies (ubuntu only)
95+
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
96+
run: |
97+
sudo apt-get update
98+
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
99+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
100+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
82101

83102
- name: Rust cache
84103
uses: swatinem/rust-cache@v2
@@ -108,3 +127,4 @@ jobs:
108127
releaseBody: ${{ needs.get-next-release.outputs.next-release-notes }}
109128
releaseDraft: false
110129
prerelease: false
130+
args: ${{ matrix.args }}

0 commit comments

Comments
 (0)