Set macOS deployment target to 13.2 #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Eigen | |
run: | | |
brew install eigen | |
- name: Setup Xcode | |
run: | | |
xcode-select -p | |
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer | |
- name: Build KataGo with Eigen backend | |
run: | | |
mkdir -p cpp/build | |
cd cpp/build | |
cmake -G Ninja -DUSE_BACKEND=EIGEN ../ | |
ninja | |
- 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: Run KataGo GPU error test with Eigen backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config ../configs/gtp_example.cfg -model model.bin.gz -boardsize 9 -basefile base.bin | |
- name: Build KataGo with CoreML backend | |
run: | | |
cd cpp | |
mv CMakeLists.txt-macos CMakeLists.txt | |
mkdir -p build | |
cd build | |
cmake -G Ninja ../ | |
ninja | |
- name: Setup configuration | |
run: | | |
ln -s ../configs/misc/coreml_example.cfg cpp/build/gtp.cfg | |
- 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: Run KataGo GPU error test with CoreML backend | |
run: | | |
cd cpp/build | |
./katago testgpuerror -config gtp.cfg -model model.bin.gz -boardsize 9 -basefile base.bin | |
- 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 |