forked from lightvector/KataGo
-
Notifications
You must be signed in to change notification settings - Fork 4
111 lines (94 loc) · 3.73 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Build
on:
push:
paths:
- 'cpp/**'
- '.github/workflows/build.yml'
jobs:
xcodebuild:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Xcode build
run: |
cd cpp/xcode
/Applications/Xcode_15.0.1.app/Contents/Developer/usr/bin/xcodebuild -derivedDataPath DerivedData -scheme katago -configuration Release build
- name: Setup configuration
run: |
ln -s ../../../../../configs/misc/coreml_example.cfg cpp/xcode/DerivedData/Build/Products/Release/gtp.cfg
- name: Setup network
run: |
mkdir -p models
cd models
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz
ln -s ../../../../../../models/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz ../cpp/xcode/DerivedData/Build/Products/Release/model.bin.gz
- name: Setup CoreML model
run: |
mkdir -p models
cd models
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp16v14s7709731328.mlpackage.zip
unzip KataGoModel19x19fp16v14s7709731328.mlpackage.zip
ln -s ../../../../../../models/KataGoModel19x19fp16v14s7709731328.mlpackage ../cpp/xcode/DerivedData/Build/Products/Release/KataGoModel19x19fp16.mlpackage
- name: Setup test data
run: |
ln -s ../../../../../tests cpp/xcode/DerivedData/Build/Products/Release/tests
- name: Run Xcode test
run: |
cd cpp/xcode
/Applications/Xcode_15.0.1.app/Contents/Developer/usr/bin/xcodebuild -derivedDataPath DerivedData -scheme katago -configuration Release test
- name: Run KataGo tests
run: |
cd cpp/xcode/DerivedData/Build/Products/Release
./katago runnnlayertests
./katago runoutputtests
./katago runnnontinyboardtest model.bin.gz false false 0 false
./katago runnnsymmetriestest model.bin.gz false false false
./katago runownershiptests gtp.cfg model.bin.gz
cmake-macos:
runs-on: macos-13
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup ninja
run: |
brew install ninja
- name: Setup Xcode
run: |
xcode-select -p
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
- name: Run cmake ninja
run: |
cd cpp
mv CMakeLists.txt-macos CMakeLists.txt
mkdir build
cd build
cmake -G Ninja ../
ninja
- name: Setup configuration
run: |
ln -s ../configs/misc/coreml_example.cfg cpp/build/gtp.cfg
- name: Setup network
run: |
mkdir -p models
cd models
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz
ln -s ../../models/kata1-b18c384nbt-s7709731328-d3715293823.bin.gz ../cpp/build/model.bin.gz
- name: Setup CoreML model
run: |
mkdir -p models
cd models
wget https://github.com/ChinChangYang/KataGo/releases/download/v1.13.2-coreml1/KataGoModel19x19fp16v14s7709731328.mlpackage.zip
unzip KataGoModel19x19fp16v14s7709731328.mlpackage.zip
ln -s ../../models/KataGoModel19x19fp16v14s7709731328.mlpackage ../cpp/build/KataGoModel19x19fp16.mlpackage
- name: Setup test data
run: |
ln -s ../tests cpp/build/tests
- name: Run KataGo tests
run: |
cd cpp/build
./katago runnnlayertests
./katago runoutputtests
./katago runnnontinyboardtest model.bin.gz false false 0 false
./katago runnnsymmetriestest model.bin.gz false false false
./katago runownershiptests gtp.cfg model.bin.gz