-
Notifications
You must be signed in to change notification settings - Fork 185
189 lines (169 loc) · 5.58 KB
/
pikafish.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Pikafish
on:
push:
branches:
- master
jobs:
Pikafish-x86-64:
name: ${{ matrix.config.name }}${{ matrix.arch }}
runs-on: ${{ matrix.config.os }}
env:
ARCH: x86-64${{ matrix.arch }}
COMPCXX: clang++
COMP: clang
EXE: pikafish${{ matrix.arch }}${{ matrix.config.ext }}
SDE: ${{ matrix.config.sde }}
strategy:
matrix:
config:
- name: Linux
os: ubuntu-20.04
shell: bash
sde: /home/runner/work/Pikafish/Pikafish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-lin/sde -future --
- name: Windows
os: windows-latest
shell: msys2 {0}
ext: .exe
sde: /d/a/Pikafish/Pikafish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-win/sde.exe -future --
arch: ["-vnni512", "-avx512", "-avx512f", "-avxvnni", "-bmi2", "-avx2", "-sse41-popcnt"]
exclude:
- arch: -avxvnni
config: {os: ubuntu-20.04}
defaults:
run:
working-directory: src
shell: ${{ matrix.config.shell }}
steps:
- uses: actions/checkout@v4
- name: Install LLVM and Clang
if: runner.os == 'Linux'
run: |
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
echo | sudo ./llvm.sh 19
rm llvm.sh
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
sudo update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-19 100
sudo update-alternatives --set clang++ /usr/bin/clang++-19
sudo update-alternatives --set llvm-profdata /usr/bin/llvm-profdata-19
- name: Setup msys and install required packages
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
msystem: clang64
install: mingw-w64-clang-x86_64-clang make git expect
- name: Download SDE package
if: runner.os == 'Linux' || runner.os == 'Windows'
uses: petarpetrovt/setup-sde@91a1a03434384e064706634125a15f7446d2aafb # @v2.3
with:
environmentVariableName: SDE_DIR
sdeVersion: 9.27.0
- name: Compile ${{ matrix.arch }} build
run: |
make -j profile-build EXE=$EXE WINE_PATH="$SDE"
make strip EXE=$EXE
cp $EXE ../
- name: Download wiki
run: |
git clone https://github.com/official-pikafish/Pikafish.wiki.git ../Wiki
cd ../Wiki
rm -rf .git
# Artifacts automatically get zipped.
# To avoid double-zipping, we use the unzipped directory
- uses: actions/upload-artifact@v4
with:
name: Pikafish-${{ matrix.config.name }}${{ matrix.arch }}
path: |
${{ env.EXE }}
Wiki
AUTHORS
CONTRIBUTING.md
Copying.txt
README.md
Top CPU Contributors.txt
Pikafish-MacOS:
name: MacOS-apple-silicon
runs-on: macos-latest
env:
ARCH: apple-silicon
COMPCXX: clang++
COMP: clang
EXE: pikafish-apple-silicon
defaults:
run:
working-directory: src
shell: bash
steps:
- uses: actions/checkout@v4
- name: Compile apple-silicon build
run: |
make -j profile-build EXE=$EXE
make strip EXE=$EXE
cp $EXE ../
- name: Download wiki
run: |
git clone https://github.com/official-pikafish/Pikafish.wiki.git ../Wiki
cd ../Wiki
rm -rf .git
# Artifacts automatically get zipped.
# To avoid double-zipping, we use the unzipped directory
- uses: actions/upload-artifact@v4
with:
name: Pikafish-MacOS-apple-silicon
path: |
${{ env.EXE }}
Wiki
AUTHORS
CONTRIBUTING.md
Copying.txt
README.md
Top CPU Contributors.txt
Pikafish-Android:
name: Android-${{ matrix.arch }}
runs-on: ubuntu-latest
env:
ARCH: ${{ matrix.arch }}
COMPCXX: aarch64-linux-android21-clang++
COMP: ndk
EXE: pikafish-${{ matrix.arch }}
LDFLAGS: "-static -Wno-unused-command-line-argument"
strategy:
matrix:
arch: ["armv8-dotprod", "armv8"]
defaults:
run:
working-directory: src
steps:
- uses: actions/checkout@v4
- name: Download required linux packages
run: |
sudo apt update
sudo apt install qemu-user
- name: Install NDK
run: |
NDKV="21.4.7075529"
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;$NDKV"
ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/$NDKV
ANDROID_NDK_BIN=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin
echo "ANDROID_NDK_BIN=$ANDROID_NDK_BIN" >> $GITHUB_ENV
- name: Compile ${{ matrix.arch }} build
run: |
export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
make -j profile-build EXE=$EXE WINE_PATH=$EMU
make strip EXE=$EXE
cp $EXE ../
# Artifacts automatically get zipped.
# To avoid double-zipping, we use the unzipped directory
- uses: actions/upload-artifact@v4
with:
name: Pikafish-Android-${{ matrix.arch }}
path: |
${{ env.EXE }}
AUTHORS
CONTRIBUTING.md
Copying.txt
README.md
Top CPU Contributors.txt