Skip to content

Commit 7acf1c5

Browse files
committed
#203 Build arm64 for win and linux
1 parent cd4668a commit 7acf1c5

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/build-tauri.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish railmapgen.local
1+
name: Publish App
22
on:
33
workflow_dispatch:
44
schedule:
@@ -7,20 +7,23 @@ on:
77

88
jobs:
99
publish-tauri:
10-
permissions:
11-
contents: write
10+
permissions: write-all
1211
strategy:
1312
fail-fast: false
1413
matrix:
1514
include:
1615
- platform: 'macos-latest'
17-
args: '--target aarch64-apple-darwin'
16+
target: 'aarch64-apple-darwin'
1817
- platform: 'macos-latest'
19-
args: '--target x86_64-apple-darwin'
20-
- platform: 'ubuntu-22.04'
21-
args: ''
18+
target: 'x86_64-apple-darwin'
19+
- platform: 'ubuntu-latest'
20+
target: 'x86_64-unknown-linux-gnu'
21+
- platform: 'ubuntu-latest'
22+
target: 'aarch64-unknown-linux-gnu'
2223
- platform: 'windows-latest'
23-
args: ''
24+
target: 'x86_64-pc-windows-msvc'
25+
- platform: 'windows-latest'
26+
target: 'aarch64-pc-windows-msvc'
2427

2528
runs-on: ${{ matrix.platform }}
2629
steps:
@@ -32,14 +35,13 @@ jobs:
3235
- name: Install Rust stable
3336
uses: dtolnay/rust-toolchain@stable
3437
with:
35-
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
36-
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
38+
target: ${{ matrix.target }}
3739
- name: Rust cache
3840
uses: swatinem/rust-cache@v2
3941
with:
4042
workspaces: './tauri -> target'
4143
- name: install dependencies (ubuntu only)
42-
if: matrix.platform == 'ubuntu-22.04'
44+
if: matrix.platform == 'ubuntu-latest'
4345
run: |
4446
sudo apt-get update
4547
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
@@ -80,8 +82,8 @@ jobs:
8082
f=open('ui/rmg-templates/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
8183
f=open('ui/rmp/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
8284
f=open('ui/rmp-gallery/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
83-
f=open('ui/rmp-designer/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();"
84-
f=open('ui/rma/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
85+
f=open('ui/rmp-designer/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();
86+
f=open('ui/rma/info.json', 'r+');info=json.load(f);info['instance']='Tauri';f.seek(0);json.dump(info,f,indent=2);f.truncate();f.close();"
8587
- name: Get versions of each project
8688
run: |
8789
python3 -c "import urllib.request;import json;import os;
@@ -127,4 +129,4 @@ jobs:
127129
Rail Map Toolkit is able to run offline with these packages, but we do RECOMMEND using the [Official Website](https://railmapgen.org/) as it provides the latest features of Rail Map Toolkit. The packages below are only suitable for extreme situations where users are behind the notorious firewall or simply offline. All resources are cached and bundled.
128130
releaseDraft: false
129131
prerelease: false
130-
args: ${{ matrix.args }}
132+
args: --target ${{ matrix.target }}

0 commit comments

Comments
 (0)