-
Notifications
You must be signed in to change notification settings - Fork 2
128 lines (120 loc) · 3.89 KB
/
beta_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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Beta Cross platform
on: [workflow_dispatch]
jobs:
build:
name: Compile Program dart cross platform @azkadev
runs-on: ${{ matrix.os }}
env:
DEBIAN_FRONTEND: noninteractive
GITHUB_TOKEN: ${{ secrets.TOKEN }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- os: ubuntu-latest
output-name: linux
- os: macOS-latest
output-name: macos
- os: windows-latest
output-name: windows
steps:
- name: Export Release Timestamp
run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: "15"
distribution: "adopt"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.7.7"
channel: "stable"
- name: check dart version
run: dart --version
- name: Install Dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt update -y
sudo apt-get install -y make git zlib1g-dev libssl-dev gperf cmake clang libc++-dev libc++abi-dev php-cli cmake g++
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
fi
if [ "$RUNNER_OS" == "macOS" ]; then
brew update
brew install node
npm install -g appdmg
fi
shell: bash
- name: Install Dependencies App
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libmpv-dev mpv webkit2gtk-4.0-dev
fi
shell: bash
- name: Mkdir build
run: mkdir build
- name: Set Flutter enable devices
continue-on-error: true
run: |
flutter config --enable-web
flutter config --enable-linux-desktop
flutter config --enable-macos-desktop
flutter config --enable-windows-desktop
flutter config --enable-android
flutter config --enable-ios
- name: Compile Package llama_dart
continue-on-error: true
shell: bash
run: |
cd package/llama_dart
flutter pub get
flutter pub run packagex create .
flutter pub run packagex build all
if [ "$RUNNER_OS" == "Linux" ]; then
mv build/packagex/* ../../build
fi
if [ "$RUNNER_OS" == "Windows" ]; then
mv build/packagex/* ../../build
fi
if [ "$RUNNER_OS" == "macOS" ]; then
mv build/packagex/* ../../build
fi
flutter clean
- name: Compile Package llama_flutter
continue-on-error: true
shell: bash
run: |
cd package/llama_flutter
flutter pub get
flutter pub run packagex create .
flutter pub run packagex build all
if [ "$RUNNER_OS" == "Linux" ]; then
mv build/packagex/* ../../build
fi
if [ "$RUNNER_OS" == "Windows" ]; then
mv build/packagex/* ../../build
fi
if [ "$RUNNER_OS" == "macOS" ]; then
mv build/packagex/* ../../build
fi
flutter clean
- name: Publish artifact
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: Artifact
path: build/*
- name: Publish Release
uses: marvinpinto/action-automatic-releases@latest
continue-on-error: true
with:
repo_token: ${{ github.token }}
automatic_release_tag: "beta-${{ matrix.output-name }}"
prerelease: false
title: "Release ${{ matrix.output-name }}"
files: |
build/*