Compile Nexus Tools #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |