forked from SleipnirGroup/Choreo
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (67 loc) · 2.25 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- artifact-name: Windows-x86_64
os: windows-2022
bundle-pattern: "nsis/*.exe"
- artifact-name: macOS-x86_64
os: macOS-12
bundle-pattern: "dmg/*.dmg"
- artifact-name: macOS-arm64
os: macOS-12
arm64: true
bundle-pattern: "dmg/*.dmg"
- artifact-name: Linux-x86_64
os: ubuntu-latest
bundle-pattern: "deb/*.deb"
name: "${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set to Windows GNU Rust Toolchain
if: matrix.os == 'windows-2022'
run: "rustup install 1.69-gnu && rustup default 1.69-gnu"
- name: Set to macOS arm64 Rust Toolchain
if: matrix.os == 'macOS-12' && matrix.arm64 == true
working-directory: src-tauri
run: "rustup target install aarch64-apple-darwin;mkdir -p .cargo;touch .cargo/config.toml;echo \"[build]\ntarget = \\\"aarch64-apple-darwin\\\"\" > .cargo/config.toml"
- name: Set up Clang
if: matrix.os != 'macOS-12'
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- name: Linux deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: Set up npm dependencies and build trajoptlib
run: npm install
continue-on-error: true
- name: Show file tree src-tauri
working-directory: src-tauri
run: ls
- name: Build Package
run: npm run tauri build
- name: Upload Bundle
uses: actions/upload-artifact@v3.1.1
with:
name: ${{ matrix.artifact-name }}
path: src-tauri/target/**/release/bundle/${{ matrix.bundle-pattern }}