From fafd8435b05ee5df69af1ee61d4fb40c8acb5f78 Mon Sep 17 00:00:00 2001 From: Chin-Chang Yang <2770271+ChinChangYang@users.noreply.github.com> Date: Fri, 10 Nov 2023 22:40:59 +0800 Subject: [PATCH] A fix for GitHub Actions build - Add network, CoreML model, test data, and update file paths for tests --- .github/workflows/build.yml | 20 ++++++++++++++++++++ cpp/xcode/KataGoMetalTest/testnn.mm | 8 ++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f94887887..3c265282c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,26 @@ jobs: cd cpp/xcode /Applications/Xcode_15.0.1.app/Contents/Developer/usr/bin/xcodebuild -scheme katago -configuration Release build + - 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 + mv kata1-b18c384nbt-s7709731328-d3715293823.bin.gz 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/KataGo/Build/Products/Release/KataGoModel19x19fp16.mlpackage + + - name: Setup test data + run: | + cd cpp/xcode/DerivedData/KataGo/Build/Products/Release/ + ln -s ../../../../../../tests . + - name: Run Xcode test run: | cd cpp/xcode diff --git a/cpp/xcode/KataGoMetalTest/testnn.mm b/cpp/xcode/KataGoMetalTest/testnn.mm index 0631f2716..0b38c4b11 100644 --- a/cpp/xcode/KataGoMetalTest/testnn.mm +++ b/cpp/xcode/KataGoMetalTest/testnn.mm @@ -27,7 +27,7 @@ - (void)testOutput { - (void)testNNOnTinyBoard { std::vector args; args.push_back("katago"); - args.push_back("model.bin.gz"); + args.push_back("../../../../../../../models/model.bin.gz"); args.push_back("false"); args.push_back("false"); args.push_back("0"); @@ -38,7 +38,7 @@ - (void)testNNOnTinyBoard { - (void)testNNSymmetries { std::vector args; args.push_back("katago"); - args.push_back("model.bin.gz"); + args.push_back("../../../../../../../models/model.bin.gz"); args.push_back("false"); args.push_back("false"); args.push_back("false"); @@ -48,8 +48,8 @@ - (void)testNNSymmetries { - (void)testOwnership { std::vector args; args.push_back("katago"); - args.push_back("coreml_example.cfg"); - args.push_back("model.bin.gz"); + args.push_back("../../../../../../configs/misc/coreml_example.cfg"); + args.push_back("../../../../../../../models/model.bin.gz"); MainCmds::runownershiptests(args); }