ref: e310c02c6fbd3b6dfe2a3bfc66ebdebd0186bf42
dir: /.build.yml/
# moonfish is licensed under the AGPL (v3 or later)
# copyright 2023, 2024 zamfofex
image: alpine/latest
secrets:
- 72a028fc-f8df-43d3-a315-305d80720e45
packages:
- build-base
- bearssl-dev
- bearssl-static
- xz
- mingw-w64-gcc
- curl
- cjson-dev
- wasi-sdk
- clang
- lld
- llvm
tasks:
- build: |
cd moonfish
make LDFLAGS=-static
make LDFLAGS=-static CC=x86_64-w64-mingw32-gcc moonfish.exe
make LDFLAGS='-static -Wl,--max-memory=1073741824' CC='clang --target=wasm32-wasi-threads --sysroot=/usr/share/wasi-sysroot' moonfish.wasm
./minify.sh
- strip: |
cd moonfish
strip --strip-all moonfish play lichess analyse
llvm-strip --strip-all moonfish.wasm
- deploy: |
set +x
if test "$GIT_REF" = refs/heads/main && test -f neocities-token.txt
then
cd moonfish
curl -fsSL --oauth2-bearer "$(cat ~/neocities-token.txt)" \
-F moonfish=@moonfish \
-F play=@play \
-F lichess=@lichess \
-F analyse=@analyse \
-F moonfish.sh=@moonfish.sh \
-F moonfish.exe=@moonfish.exe \
-F moonfish.wasm=@moonfish.wasm \
https://neocities.org/api/upload
fi
artifacts:
- moonfish/moonfish
- moonfish/moonfish.sh
- moonfish/moonfish.exe
- moonfish/moonfish.wasm
- moonfish/play
- moonfish/lichess
- moonfish/analyse