Commit 8eeb177 1 parent 727ef71 commit 8eeb177 Copy full SHA for 8eeb177
File tree 3 files changed +13
-7
lines changed
3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ cov_html/
23
23
cloud_function.zip
24
24
cloud_function /_version.py
25
25
_stockfish_lib_version
26
+ stockfish_ * .tar.gz
Original file line number Diff line number Diff line change @@ -70,21 +70,26 @@ ci-coverage:
70
70
71
71
coverage : build-dev ci-coverage
72
72
73
- build-serverless-function : build-dev
74
- docker compose run \
73
+ ci- build-serverless-function :
74
+ docker run \
75
75
--rm \
76
76
-v $$(pwd ) :/app \
77
77
-e POETRY_HOME \
78
78
--entrypoint=/bin/bash \
79
- chess_pipeline_dev \
79
+ chess-pipeline-dev \
80
80
-c " poetry show stockfish | grep version | awk -F' ' '{print \$ $3 }'" > _stockfish_lib_version
81
81
82
82
STOCKFISH_LIB_VERSION=$$(cat _stockfish_lib_version); \
83
83
docker run \
84
84
--rm \
85
- -v $$(pwd):/app \
85
+ -v $$(pwd):/home/ app/function \
86
86
--workdir /home/app/function \
87
87
rg.fr-par.scw.cloud/scwfunctionsruntimes-public/python-dep:3.12 \
88
- sh /app /build_stockfish.sh $$STOCKFISH_LIB_VERSION
88
+ sh . /build_stockfish.sh $$STOCKFISH_LIB_VERSION
89
89
echo "__version__ = '$$(git log -1 --format='format:%h')'" > cloud_function/_version.py
90
+ sudo chown $$USER:$$USER -R package/
90
91
zip -FSr cloud_function.zip cloud_function/ package/
92
+ rm _stockfish_lib_version
93
+ rm -rf package/
94
+
95
+ build-serverless-function : build-dev ci-build-serverless-function
Original file line number Diff line number Diff line change 1
1
apk add curl gcc make g++
2
- curl -L --output stockfish_13.tar.gz https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_13.tar.gz
2
+ curl -L --output /tmp/ stockfish_13.tar.gz https://github.com/official-stockfish/Stockfish/archive/refs/tags/sf_13.tar.gz
3
3
mkdir -p /stockfish_src
4
- tar -xzvf stockfish_13.tar.gz -C /stockfish_src
4
+ tar -xzvf /tmp/ stockfish_13.tar.gz -C /stockfish_src
5
5
CXXFLAGS=-U_FORTIFY_SOURCE make -C /stockfish_src/Stockfish-sf_13/src -j profile-build ARCH=x86-64
6
6
mkdir -p package
7
7
cp /stockfish_src/Stockfish-sf_13/src/stockfish ./package/stockfish_executable
You can’t perform that action at this time.
0 commit comments