-
-
Notifications
You must be signed in to change notification settings - Fork 229
97 lines (86 loc) · 2.58 KB
/
build_test.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
name: build-test
on:
push:
branches:
- master
paths-ignore:
- ".vscode/**"
- "CHANGELOG.md"
- "LICENSE"
- "README.md"
- "resources/**"
- "**/CHANGELOG.md"
- "**/LICENSE"
- "**/README.md"
pull_request:
paths-ignore:
- ".vscode/**"
- "CHANGELOG.md"
- "LICENSE"
- "README.md"
- "resources/**"
- "**/CHANGELOG.md"
- "**/LICENSE"
- "**/README.md"
workflow_dispatch:
concurrency:
group: >
${{ github.workflow }}
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}-latest
timeout-minutes: 30
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu, windows, macos]
include:
- runner: ubuntu
target: linux
- runner: windows
target: windows
- runner: macos
target: macos
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Setup Ninja and GTK3 toolchain (Only Linux)
if: matrix.runner == 'ubuntu'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Fetch dependencies
working-directory: bitsdojo_window/example
run: flutter pub get
- name: Run flutter build ${{ matrix.target }}
working-directory: bitsdojo_window/example
run: flutter build ${{ matrix.target }} --release -v
- name: Archive artifacts (Linux)
if: matrix.runner == 'ubuntu'
uses: actions/upload-artifact@v3
with:
name: bitsdojo_window_example_${{ matrix.runner }}
path: bitsdojo_window/example/build/linux/x64/release/bundle/
- name: Archive artifacts (Windows)
if: matrix.runner == 'windows'
uses: actions/upload-artifact@v3
with:
name: bitsdojo_window_example_${{ matrix.runner }}
path: bitsdojo_window/example/build/windows/runner/Release/bitsdojo_window_example.exe
- name: Archive artifacts (macOS)
if: matrix.runner == 'macos'
uses: actions/upload-artifact@v3
with:
name: bitsdojo_window_example_${{ matrix.runner }}
path: bitsdojo_window/example/build/macos/Build/Products/Release/bitsdojo_window_example.app