Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions release/build-and-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ if [ "$1" = "nightly" ]; then
cd ..
rsync -avP --delay-updates --delete-delay codebrowser ddnet:/var/www/
rm -rf codebrowser

cd ddnet-source
rm -rf docs/html
rm -rf docs/warn.log
Expand All @@ -44,6 +45,8 @@ if [ "$1" = "nightly" ]; then
rm -rf docs/html
rm -rf docs/warn.log
cd ..

rsync -avP --delay-updates --delete-delay ddnet-source/build-emscripten/pack_DDNet-$VERSION-Emscripten_tar_xz/DDNet-$VERSION-Emscripten/ ddnet:/var/www-client/nightly
elif [ "$1" = "playground" ]; then
export UPDATE_FLAGS="-DAUTOUPDATE=OFF -DINFORM_UPDATE=OFF"
export UPDATE_FLAGS_MACOS="-DINFORM_UPDATE=OFF"
Expand All @@ -60,6 +63,8 @@ elif [ "$1" = "rc" ]; then
elif [ "$1" = "release" ]; then
VERSION=$2
./build.sh $VERSION &> builds/DDNet-$VERSION.log || { echo "build.sh failed, see builds/DDNet-$VERSION.log"; exit 1 }

rsync -avP --delay-updates --delete-delay ddnet-source/build-emscripten/pack_DDNet-$VERSION-Emscripten_tar_xz/DDNet-$VERSION-Emscripten/ ddnet:/var/www-client/$VERSION
else
echo "Unknown parameter: $1"
echo ""
Expand Down
17 changes: 17 additions & 0 deletions release/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,21 @@ build_android ()
rm -rf ddnet-source-android
}

build_emscripten ()
{
cd ddnet-source
mkdir build-emscripten
cd build-emscripten
rustup override set 1.89.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 1.89 specifically? The others are on newer versions

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building Emscripten code with Rust versions 1.90.0 - 1.93.0 does not work. If 1.94.0 is generally available you can also try that.

source "$HOME/emsdk/emsdk_env.sh"
emcmake cmake -H.. -G "Unix Makefiles" -B . -DVERSION=$VERSION -DCMAKE_BUILD_TYPE=Release -DAUTOUPDATE=OFF -DINFORM_UPDATE=OFF -DVIDEORECORDER=OFF -DVULKAN=OFF -DSERVER=OFF -DTOOLS=OFF -DPREFER_BUNDLED_LIBS=ON
cmake --build . --target game-client -j2
cmake --build . --target package_default -j2
mv DDNet-$VERSION-Emscripten.tar.xz $BUILDS/DDNet-$VERSION-emscripten.tar.xz
cd ..
cd ..
}

MAIN_REPO_COMMIT="$(wget -nv --header 'Accept: application/vnd.github.sha' https://api.github.com/repos/$MAIN_REPO_USER/ddnet/commits/$MAIN_REPO_BRANCH -O-)"
LIBS_REPO_COMMIT="$(wget -nv --header 'Accept: application/vnd.github.sha' https://api.github.com/repos/$LIBS_REPO_USER/ddnet-libs/commits/$LIBS_REPO_BRANCH -O-)"

Expand Down Expand Up @@ -325,6 +340,8 @@ TARGET_FAMILY=windows TARGET_PLATFORM=win32 TARGET_ARCH=ia32 \

build_android &> builds/android.log &

build_emscripten &> builds/emscripten.log &

wait

rm -rf steam
Expand Down