-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
102 lines (95 loc) · 2.63 KB
/
.gitlab-ci.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
stages:
- run_amd64
- run_arm64
.run:
timeout: 3h
variables:
RUNNER_BEFORE_SCRIPT_TIMEOUT: 3h
RUNNER_SCRIPT_TIMEOUT: 3h
script: |
set -ex
"$MAKE" clean
"$MAKE" FEATURE_SUPPORT_PGO=disabled _all
python3 scripts/perft_test.py
"$MAKE" clean
"$MAKE" _all
.run_linux:
extends: .run
parallel:
matrix:
- IMAGE: "debian:unstable-slim"
COMPILER: ["gcc", "clang"]
- IMAGE: "ghcr.io/void-linux/void-musl-busybox"
COMPILER: ["gcc", "clang"]
before_script: |
set -ex
if test "${IMAGE}" = "debian:unstable-slim"; then
apt-get update -y
apt-get install -y wget make pkgconf clang gcc g++ build-essential valgrind libbsd-dev libjemalloc-dev python3 git libzstd-dev libncurses-dev libncursesw5-dev perl stockfish fairy-stockfish
rm -rf /var/lib/apt/lists/*
export MAKE=make
export PATH="$PATH:/usr/games"
elif test "${IMAGE}" = "ghcr.io/void-linux/void-musl-busybox"; then
xbps-install -Syu
xbps-install -Sy wget bash make pkg-config clang gcc base-devel llvm libbsd-devel jemalloc-devel python3 git libzstd-devel ncurses-devel perl stockfish fairy-stockfish
export MAKE=make
export PATH="$PATH:/usr/games"
else
echo "image ${IMAGE}"
exit 1
fi
if test "${COMPILER}" = gcc; then
export CC=gcc CXX=g++
elif test "${COMPILER}" = clang; then
export CC=clang CXX=clang++
fi
script: |
set -ex
"$MAKE" clean
"$MAKE" FEATURE_SUPPORT_PGO=disabled _all
python3 scripts/perft_test.py
"$MAKE" clean
"$MAKE" _all
run_linux_amd64:
stage: run_amd64
extends: .run_linux
image:
name: "$IMAGE"
docker:
platform: "amd64"
artifacts:
paths:
- "external/syzygy"
run_linux_arm64:
stage: run_arm64
extends: .run_linux
needs:
- job: run_linux_amd64
artifacts: true
image:
name: "$IMAGE"
docker:
platform: "arm64"
#run_linux_riscv64:
# extends: .run_linux
# image:
# name: "$IMAGE"
# docker:
# platform: "riscv64"
#run_macos:
# extends: .run
# image: macos-14-xcode-15
# before_script: |
# set -ex
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# brew install pkg-config libbsd jemalloc python3 git libzstd ncurses stockfish
# export CC=cc CXX=CXX
# export MAKE=make
# CURRENT_DIR="$PWD"
# git clone https://github.com/fairy-stockfish/Fairy-Stockfish ~/fairy-stockfish
# cd ~/fairy-stockfish
# "$MAKE" -C ./src
# mkdir -p ~/.local/bin
# export PATH="$HOME/.local/bin:$PATH"
# "$MAKE" -C ./src install PREFIX=~/.local/bin
# cd "$CURRENT_DIR"