-
Notifications
You must be signed in to change notification settings - Fork 26
99 lines (84 loc) · 2.92 KB
/
main.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Testing
on:
push:
branches: master
paths-ignore:
- 'LICENSE'
- 'README.md'
- 'haxelib.json'
- 'hxformat.json'
pull_request:
workflow_dispatch:
jobs:
Android:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
example: [admobtest]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Install Haxe Libraries
run: |
haxelib install lime --quiet --never --skip-dependencies
haxelib dev extension-admob .
- name: Setup hxcpp Library
run: haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git --quiet --never --skip-dependencies && haxelib run lime rebuild hxcpp
- name: List Installed Haxe Libraries
run: haxelib list
- name: Configure Environment
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME_11_arm64
haxelib run lime config ANDROID_SETUP true
- name: Build
run: cd examples/${{matrix.example}} && haxelib run lime build android -debug
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: androidBuild-${{matrix.example}}
path: examples/${{matrix.example}}/export/android/bin/app/build/outputs/apk/debug
if-no-files-found: warn
iOS:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
example: [admobtest]
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Install Haxe Libraries
run: |
haxelib install lime --quiet --never --skip-dependencies
haxelib dev extension-admob .
- name: Setup hxcpp Library
run: haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp.git --quiet --never --skip-dependencies && haxelib run lime rebuild hxcpp
- name: List Installed Haxe Libraries
run: haxelib list
- name: Setup Admob iOS frameworks
run: cd $(haxelib libpath extension-admob) && chmod +x setup_admob_ios.sh && ./setup_admob_ios.sh
- name: Build
run: cd examples/${{matrix.example}} && haxelib run lime build ios -nosign -debug
- name: Create IPA
run: |
cd examples/${{matrix.example}}/export/ios/build/Debug-iphoneos
mkdir Payload
mv *.app Payload
zip -r Sample.ipa Payload
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: iOSBuild-${{matrix.example}}
path: examples/${{matrix.example}}/export/ios/build/Debug-iphoneos/Sample.ipa
if-no-files-found: warn