2025 Refactor (continued) #196
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: Dashboard | |
on: [pull_request, push] | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
format: | |
name: Check Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Install Node Modules | |
run: npm i --include=dev | |
working-directory: dashboard | |
- name: Check dashboard formatting | |
run: npm run format:check | |
working-directory: dashboard | |
build: | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 13.3 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- artifact: Windows-x86_64 | |
platform: windows-2022 | |
build-flags: --target=x86_64-pc-windows-msvc | |
- artifact: Windows-arm64 | |
platform: windows-2022 | |
build-flags: --target=aarch64-pc-windows-msvc | |
- artifact: macOS-x86_64 | |
platform: macOS-14 | |
build-flags: --target=x86_64-apple-darwin | |
- artifact: macOS-arm64 | |
platform: macOS-14 | |
build-flags: --target=aarch64-apple-darwin | |
- artifact: Linux-x86_64 | |
platform: ubuntu-22.04 | |
build-flags: --target=x86_64-unknown-linux-gnu | |
name: "Build ${{ matrix.artifact }}" | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install System Dependencies (Ubuntu Only) | |
if: startsWith(matrix.platform, 'ubuntu') | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -y \ | |
libwebkit2gtk-4.1-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
file \ | |
libxdo-dev \ | |
libssl-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
- name: Install Node Modules | |
run: npm i --include=dev | |
working-directory: dashboard | |
- name: Install Windows aarch64 Rust compiler (Windows-arm64 Only) | |
if: matrix.artifact == 'Windows-arm64' | |
run: rustup target install aarch64-pc-windows-msvc | |
- name: Install macOS x86_64 Rust compiler (macOS-x86_64 Only) | |
if: matrix.artifact == 'macOS-x86_64' | |
run: rustup target add x86_64-apple-darwin | |
- name: Setup Xcode (macOS Only) | |
if: startsWith(matrix.platform, 'macOS') | |
run: sudo xcode-select -switch /Applications/Xcode_15.3.app | |
- name: Run Tauri Build | |
uses: tauri-apps/tauri-action@v0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
projectPath: dashboard | |
args: ${{ matrix.build-flags }} | |
- name: Upload bundle (Windows-x86_54) | |
if: matrix.artifact == 'Windows-x86_64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GRRDashboard-${{ matrix.artifact }} | |
path: dashboard/src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe | |
- name: Upload bundle (Windows-arm64) | |
if: matrix.artifact == 'Windows-arm64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GRRDashboard-${{ matrix.artifact }} | |
path: dashboard/src-tauri/target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe | |
- name: Upload bundle (macOS-x86_64) | |
if: matrix.artifact == 'macOS-x86_64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GRRDashboard-${{ matrix.artifact }} | |
path: dashboard/src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg | |
- name: Upload bundle (macOS-arm64) | |
if: matrix.artifact == 'macOS-arm64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GRRDashboard-${{ matrix.artifact }} | |
path: dashboard/src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg | |
- name: Upload bundle (Linux-x86_64) | |
if: matrix.artifact == 'Linux-x86_64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GRRDashboard-${{ matrix.artifact }} | |
path: | | |
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage | |
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb | |
dashboard/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm |