-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 2.04 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "build"
on:
workflow_dispatch:
jobs:
build:
name: "Build Calculator (${{ matrix.target.os }}, ${{ matrix.go-version }})"
runs-on: ${{ matrix.target.host || 'ubuntu-latest' }}
env:
GO111MODULE: on
strategy:
fail-fast: false
matrix:
# use max/min supported Go versions
# go-version: ["1.21.x"]
target:
- os: linux
- os: windows
ext: .exe
# - os: freebsd
- os: android
args: |
-app-id calc.sha${{ github.sha }} \
-arch arm64
# - os: web
## Currently not easily supported from GitHub actions.
## https://github.com/fyne-io/fyne-cross/pull/104#issuecomment-1099494308
# - os: ios
# args: -app-id calc.sha${{ github.sha }}
# host: macos-latest
steps:
- name: Setup Go environment
id: setup-go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Checkout code
uses: actions/checkout@v2
with:
repository: fyne-io/fyne-cross
path: fyne-cross
- name: Checkout fyne-io/calculator
uses: actions/checkout@v2
with:
repository: fyne-io/calculator
path: calculator
- name: Cache build artifacts
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/.cache/fyne-cross
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/go.sum') }}
- name: Install Fyne-cross
working-directory: fyne-cross
run: go install
- name: Build
working-directory: calculator
run: |
fyne-cross \
${{ matrix.target.os }} \
${{ matrix.target.args }} \
-debug -no-cache \
-name calculator${{ matrix.target.ext }}
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: fyne-cross
path: calculator/fyne-cross/dist/*