forked from nativeshell/nativeshell
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (52 loc) · 1.81 KB
/
build_test.yml
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
on:
pull_request:
push:
branches:
- main
name: Build
jobs:
Main:
strategy:
fail-fast: false
matrix:
platform:
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, }
# PKG config cross-compiling needs additional work
# - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, }
- { target: x86_64-pc-windows-msvc, os: windows-latest, }
- { target: x86_64-apple-darwin, os: macos-latest, }
project:
- project1
- project2
configuration:
- debug
- release
include:
- configuration: debug
cargo_args: ""
- configuration: release
cargo_args: --release
runs-on: ${{ matrix.platform.os }}
steps:
- name: Install GTK
if: (matrix.platform.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'main'
- run: rustup target add ${{ matrix.platform.target }}
- run: flutter config --enable-windows-desktop
- run: flutter config --enable-linux-desktop
- run: flutter config --enable-macos-desktop
- name: enable native assets
run: flutter config --enable-native-assets
- run: flutter pub get
working-directory: ./build_test/${{ matrix.project }}
- run: cargo build --target=${{ matrix.platform.target }} ${{ matrix.cargo_args }}
working-directory: ./build_test/${{ matrix.project }}
- if: (matrix.configuration == 'release')
run: cargo build --target=${{ matrix.platform.target }} ${{ matrix.cargo_args }}
working-directory: ./build_test/${{ matrix.project }}
env:
FLUTTER_PROFILE: 1