Skip to content

Commit 4aca025

Browse files
authored
Fix Build on Older Workers (#114)
Elo | 10.78 +- 6.75 (95%) SPRT | 8.0+0.08s Threads=1 Hash=8MB LLR | 2.98 (-2.94, 2.94) [-5.00, 0.00] Games | N: 3418 W: 896 L: 790 D: 1732 Penta | [34, 371, 809, 445, 50] https://chess.aronpetkovski.com/test/2826/ bench 1849271
1 parent e7dbe69 commit 4aca025

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ ifdef EVALFILE
55
cp $(EVALFILE) ./Serendipity/src/main/resources/embedded.nnue
66
endif
77
mvn -f ./Serendipity/pom.xml package
8-
echo "#!/usr/bin/env -S java -jar -Xmx128m" > $(EXE)
9-
cat ./Serendipity/target/Serendipity-Test.jar >> $(EXE)
8+
cat header.sh ./Serendipity/target/Serendipity-Test.jar > $(EXE)
109
chmod +x $(EXE)

Serendipity/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
<properties>
1616
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17-
<maven.compiler.source>17</maven.compiler.source>
18-
<maven.compiler.target>17</maven.compiler.target>
17+
<maven.compiler.source>8</maven.compiler.source>
18+
<maven.compiler.target>8</maven.compiler.target>
1919
<revision>Test</revision>
2020
</properties>
2121

Serendipity/src/main/java/org/shawn/games/Serendipity/UCI/UCI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void set(String value)
7171

7272
public static void main(String args[])
7373
{
74-
transpositionTable = new TranspositionTable(32);
74+
transpositionTable = new TranspositionTable(4);
7575
options = new HashMap<>();
7676
networkName = new NNUEOption("embedded.nnue", "nnuefile");
7777
threads = new IntegerOption(1, 1, 1, "Threads");

header.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
# Taken from https://web.archive.org/web/20240813210415/https://coderwall.com/p/ssuaxa/how-to-make-a-jar-file-linux-executable
4+
5+
MYSELF=`which "$0" 2>/dev/null`
6+
7+
[ $? -gt 0 -a -f "$0" ] && MYSELF="./$0"
8+
9+
java=java
10+
11+
if test -n "$JAVA_HOME"; then
12+
java="$JAVA_HOME/bin/java"
13+
fi
14+
15+
exec "$java" -Xms48m -Xmx48m -XX:+UseParallelGC $java_args -jar $MYSELF "$@"
16+
17+
exit 1

0 commit comments

Comments
 (0)