-
-
Notifications
You must be signed in to change notification settings - Fork 85
98 lines (97 loc) · 3.1 KB
/
compile.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Compile Nexus Tools
on:
workflow_dispatch:
jobs:
build_linux_x64:
runs-on: ubuntu-latest
steps:
# Checks-out repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
# Install dependencies
- name: Install Dart SDK
run: |
sudo apt-get update
sudo apt-get install apt-transport-https -y
sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get update
sudo apt install dart -y
- name: Compile Dart executable
run: |
cd $GITHUB_WORKSPACE
dart pub get
dart compile exe "./bin/main.dart" -o "./nexustools"
# Upload binary
- name: Upload Dart executable
uses: actions/upload-artifact@v4
with:
name: nexustools-linux-x64
path: nexustools
build_windows_x64:
runs-on: windows-latest
steps:
- name: Install Dart SDK
run: |
choco install dart-sdk
- uses: actions/checkout@v4
- name: Compile Dart executable
run: |
C:\tools\dart-sdk\bin\dart pub get
C:\tools\dart-sdk\bin\dart compile exe "bin\main.dart" -o "nexustools.exe"
- name: Upload Dart executable
uses: actions/upload-artifact@v4
with:
name: nexustools-windows-x64
path: nexustools.exe
build_macos_x64:
runs-on: macos-12
steps:
- name: Install Dart SDK
run: |
brew tap dart-lang/dart
brew install dart
- uses: actions/checkout@v4
- name: Compile Dart executable
run: |
dart pub get
dart compile exe "./bin/main.dart" -o "./nexustools"
- name: Upload Dart executable
uses: actions/upload-artifact@v4
with:
name: nexustools-macos-x64
path: nexustools
build_macos_arm:
runs-on: macos-latest
steps:
- name: Install Dart SDK
run: |
brew tap dart-lang/dart
brew install dart
- uses: actions/checkout@v4
- name: Compile Dart executable
run: |
dart pub get
dart compile exe "./bin/main.dart" -o "./nexustools"
- name: Upload Dart executable
uses: actions/upload-artifact@v4
with:
name: nexustools-macos-arm64
path: nexustools
build_macos_universal:
runs-on: macos-latest
needs: [build_macos_arm, build_macos_x64]
steps:
- name: Download x64 and ARM executables
uses: actions/download-artifact@v4
with:
path: nexustools-macos
pattern: nexustools-macos-*
merge-multiple: true
- name: Create universal binary
run: |
lipo -create nexustools-macos-x64/nexustools nexustools-macos-arm64/nexustools -output nexustools
- name: Upload universal binary
uses: actions/upload-artifact@v4
with:
name: nexustools-macos-universal
path: nexustools