Skip to content

chore: Run rust fmt #45

chore: Run rust fmt

chore: Run rust fmt #45

Workflow file for this run

name: Intiface Central Build
# Only build on tag pushes
on:
push:
# branches:
# - main
# - dev
# - ci
tags:
- 'v*'
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- run: flutter config --enable-windows-desktop
name: flutter config
- run: flutter build windows --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
name: flutter build
- uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.NPLABS_WINDOWS_202205_CERT }}'
password: '${{ secrets.NPLABS_WINDOWS_202205_KEY }}'
folder: '.\build\windows\runner\Release'
recursive: false
files: |
intiface_central.exe
description: 'Sign Intiface Central Executable'
- name: Build Innosetup Installer
shell: pwsh
env:
BUILD_VERSION: ${{ github.ref_name }}
run: |
iscc .\intiface-central-installer.iss
- uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.NPLABS_WINDOWS_202205_CERT }}'
password: '${{ secrets.NPLABS_WINDOWS_202205_KEY }}'
folder: '.\installer\'
recursive: false
files: |
intiface-central-installer.exe
description: 'Sign Intiface Central Installer'
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: windows-installer
path: |
installer/intiface-central-installer.exe
linux:
strategy:
matrix:
os: ["ubuntu-latest", "ubuntu-20.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libudev-dev libgtk-3-dev
- run: flutter config --enable-linux-desktop
name: flutter config
- run: flutter build linux --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
name: flutter build
- name: Zip Release
run: zip -r intiface-central-linux-${{ matrix.os }}-x64.zip build/linux/x64/release/bundle
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: linux-${{ matrix.os }}-zip
path: ./intiface-central-linux-${{ matrix.os }}-x64.zip
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# - uses: subosito/flutter-action@v2
# with:
# channel: 'stable'
# cache: true
# cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
# - run: flutter config --enable-macos-desktop
# name: flutter config
# - run: flutter build macos --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# name: flutter build
# - name: Zip Release
# run: zip -r intiface-central-macos-universal.zip build/macos/Build/Products/Release/intiface_central.app
# - name: Archive production artifacts
# uses: actions/upload-artifact@v3
# with:
# name: macos-zip
# path: ./intiface-central-macos-universal.zip
# android:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v2
# with:
# distribution: 'zulu'
# java-version: '17'
# - name: Setup NDK
# uses: nttld/setup-ndk@v1
# id: setup-ndk
# with:
# ndk-version: r25b
# local-cache: true
# - name: Restore keystore
# uses: timheuer/base64-to-file@v1.2
# with:
# fileName: 'key.properties'
# fileDir: './android'
# encodedString: ${{ secrets.NPLABS_ANDROID_PROPERTIES }}
# - name: Restore keystore
# uses: timheuer/base64-to-file@v1.2
# with:
# fileName: 'upload-keystore.jks'
# fileDir: './android/app'
# encodedString: ${{ secrets.NPLABS_ANDROID_STORE }}
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# target: aarch64-linux-android
# toolchain: stable
# override: true
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# target: armv7-linux-androideabi
# toolchain: stable
# override: true
# - name: Install cargo-make
# run: cargo install cargo-make
# - name: Build rust android library
# env:
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
# RANLIB: ${{ format('{0}{1}', steps.setup-ndk.outputs.ndk-path, '/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib') }}
# run: cargo make build-android
# working-directory: intiface-engine-flutter-bridge
# - uses: subosito/flutter-action@v2
# with:
# channel: 'stable'
# cache: true
# cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
# - run: flutter config
# name: flutter config
# - run: flutter build apk --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# name: flutter build apk
# - run: flutter build appbundle
# name: flutter build appbundle --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# - name: Archive production artifacts (APK)
# uses: actions/upload-artifact@v3
# with:
# name: Android APK
# path: |
# build/app/outputs/flutter-apk/*.apk
# - name: Archive production artifacts (appbundle)
# uses: actions/upload-artifact@v3
# with:
# name: Android App Bundle
# path: |
# build/app/outputs/bundle/release/*.aab