-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (104 loc) · 3.36 KB
/
Copy pathbuild.yml
File metadata and controls
118 lines (104 loc) · 3.36 KB
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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
# Only allow one concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_android:
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# Steps to build the Rust library
- uses: Swatinem/rust-cache@v2
- name: Install cargo-ndk
run: cargo install cargo-ndk
- name: Install necessary cargo toolchains
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- name: Find out where the NDK v26 is by looking at the sdk folder
id: setup-ndk
run: echo "ndk-path=$(dirname $(find $ANDROID_HOME/ndk -name 'ndk-gdb' -maxdepth 2 | grep 26))" >> $GITHUB_OUTPUT
# Steps to build the Flutter app
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Build ANDROID
run: make android
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
# Steps to upload the APK
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: session-app.apk
path: flutter/build/app/outputs/apk/release/app-release.apk
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
- name: Download appimagetool
run: curl -fL "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" > appimagetool
- name: Make appimagetool executable
run: chmod +x appimagetool && sudo mkdir -p /usr/local/bin && sudo mv appimagetool /usr/local/bin/appimagetool
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Build rust and Flutter binaries
run: make linux
env:
CARGO_TERM_COLOR: always
- name: Upload Bundle
uses: actions/upload-artifact@v4
with:
path: flutter/build/linux/session-x86_64.AppImage
build_windows:
runs-on: windows-latest
if: false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# Steps to build the Rust library
- name: Build rust binary
run: cargo build --release --target x86_64-pc-windows-msvc
env:
CARGO_TERM_COLOR: always
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Build Flutter release
run: flutter build windows --release
working-directory: flutter
# Steps to upload the EXE
- name: Upload EXE
uses: actions/upload-artifact@v4
with:
name: session-app.exe