From 9e4d84d9d1a30cf6bb679350edb65bafa6a17a89 Mon Sep 17 00:00:00 2001 From: Sergei Semichev Date: Sat, 9 Jul 2022 16:01:08 +0300 Subject: [PATCH] Add support for testing on Apple silicon --- .github/workflows/main.yml | 2 +- README.adoc | 15 +++++++-- test/helper-files/org.stockfish.arm.plist | 32 +++++++++++++++++++ ...tockfish.plist => org.stockfish.x86.plist} | 0 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 test/helper-files/org.stockfish.arm.plist rename test/helper-files/{org.stockfish.plist => org.stockfish.x86.plist} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8311646..2ce246a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -103,7 +103,7 @@ jobs: - name: Install Stockfish run: brew install stockfish - name: Start Stockfish TCP Server - run: launchctl load test/helper-files/org.stockfish.plist + run: launchctl load test/helper-files/org.stockfish.x86.plist - name: Cache Hex packages uses: actions/cache@v2 with: diff --git a/README.adoc b/README.adoc index 8e5e18e..74b5c76 100644 --- a/README.adoc +++ b/README.adoc @@ -225,7 +225,7 @@ binbo:print_board(Pid, [unicode, flip]). The examples below assume that Stockfish is used as the chess engine and its path is `/usr/local/bin/stockfish`, change it according to your environment. TCP service starts on local machine on port `9010`. -If you are on Linux, install `socat` and start TCP service. On macOS just use file `org.stockfish.plist` provided in the `test` folder (see below). +If you are on Linux, install `socat` and start TCP service. On macOS just use file `org.stockfish.x86.plist` (for Intel-based devices) or `org.stockfish.arm.plist` (for Apple silicon) provided in the `test` folder (see below). .On Ubuntu/Debian: [source,bash] @@ -247,12 +247,21 @@ $ cd binbo $ rebar3 shell ---- -.On macOS: +.On macOS (Intel x86 Architecture): [source,bash] ---- $ git clone https://github.com/DOBRO/binbo.git $ cd binbo -$ launchctl load test/helper-files/org.stockfish.plist +$ launchctl load test/helper-files/org.stockfish.x86.plist +$ rebar3 shell +---- + +.On macOS (Apple silicon): +[source,bash] +---- +$ git clone https://github.com/DOBRO/binbo.git +$ cd binbo +$ launchctl load test/helper-files/org.stockfish.arm.plist $ rebar3 shell ---- diff --git a/test/helper-files/org.stockfish.arm.plist b/test/helper-files/org.stockfish.arm.plist new file mode 100644 index 0000000..9187850 --- /dev/null +++ b/test/helper-files/org.stockfish.arm.plist @@ -0,0 +1,32 @@ + + + + + Label + org.stockfishchess.stockfishd + + ProgramArguments + + /opt/homebrew/bin/stockfish + + + inetdCompatibility + + Wait + + + + Sockets + + Listeners + + SockServiceName + 9010 + SockType + stream + SockFamily + IPv4 + + + + diff --git a/test/helper-files/org.stockfish.plist b/test/helper-files/org.stockfish.x86.plist similarity index 100% rename from test/helper-files/org.stockfish.plist rename to test/helper-files/org.stockfish.x86.plist