-
Notifications
You must be signed in to change notification settings - Fork 2
96 lines (93 loc) · 2.26 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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
deployments: write
pages: write
jobs:
build_win32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: CMake Build
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release --parallel 4
cp Release/ImGuiExample.exe ../workdir/
# cp pocketpy/Release/pocketpy.dll ../workdir/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: win32
path: workdir
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: CMake Build
run: |
brew install sdl2
mkdir build
cd build
cmake ..
cmake --build . --config Release --parallel 4
cp ImGuiExample ../workdir/
# cp pocketpy/libpocketpy.dylib ../workdir/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: macos
path: workdir
build_android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: sudo apt-get install ninja-build
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Build APK
run: |
pip install cmake==3.26.3
cd android
chmod +x ./gradlew
./gradlew --no-daemon assembleDebug
- uses: actions/upload-artifact@v3
with:
name: android
path: android/app/build/outputs/apk/debug/app-debug.apk
build_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v12
with:
version: 3.1.37
actions-cache-folder: 'emsdk-cache'
- name: Compile
run: bash build_web.sh
- uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: build/web
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}