mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 14:05:28 +00:00
feat(docker): production images, integrated ccache and many other improvements (#5551)
This commit is contained in:
@@ -24,3 +24,5 @@ AC_PATH_CONF="$AC_PATH_ROOT/conf"
|
||||
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
|
||||
|
||||
AC_PATH_DEPS="$AC_PATH_ROOT/deps"
|
||||
|
||||
AC_PATH_VAR="$AC_PATH_ROOT/var"
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
set -e
|
||||
|
||||
echo "compile core"
|
||||
export CCACHE_CPP2=true
|
||||
export CCACHE_MAXSIZE='500MB'
|
||||
export CCACHE_COMPRESS=1
|
||||
ccache -s
|
||||
export AC_CCACHE=true
|
||||
./acore.sh "compiler" "all"
|
||||
ccache -s
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ function run_option() {
|
||||
fi
|
||||
}
|
||||
|
||||
function comp_quit() {
|
||||
function comp_quit() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -26,15 +26,17 @@ comp_options=(
|
||||
"build: Configure and compile"
|
||||
"clean: Clean build files"
|
||||
"configure: Run CMake"
|
||||
"compile: Compile only"
|
||||
"compile: Compile only"
|
||||
"all: clean, configure and compile"
|
||||
"ccacheClean: Clean ccache files, normally not needed"
|
||||
"quit: Close this menu")
|
||||
comp_functions=(
|
||||
"comp_build"
|
||||
"comp_clean"
|
||||
"comp_configure"
|
||||
"comp_build"
|
||||
"comp_clean"
|
||||
"comp_configure"
|
||||
"comp_compile"
|
||||
"comp_all"
|
||||
"comp_ccacheClean"
|
||||
"comp_quit")
|
||||
|
||||
PS3='[ Please enter your choice ]: '
|
||||
@@ -50,7 +52,7 @@ function _switch() {
|
||||
echo "Available commands:"
|
||||
printf '%s\n' "${options[@]}"
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
run_option $_reply $_opt
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -8,6 +8,40 @@ function comp_clean() {
|
||||
[ -d "$DIRTOCLEAN" ] && rm -rf $PATTERN
|
||||
}
|
||||
|
||||
function comp_ccacheEnable() {
|
||||
[ "$AC_CCACHE" != true ] && return
|
||||
|
||||
export CCACHE_MAXSIZE=${CCACHE_MAXSIZE:-'1000MB'}
|
||||
#export CCACHE_DEPEND=true
|
||||
export CCACHE_SLOPPINESS=${CCACHE_SLOPPINESS:-pch_defines,time_macros,include_file_mtime}
|
||||
export CCACHE_CPP2=${CCACHE_CPP2:-true} # optimization for clang
|
||||
export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1}
|
||||
export CCACHE_COMPRESSLEVEL=${CCACHE_COMPRESSLEVEL:-9}
|
||||
#export CCACHE_NODIRECT=true
|
||||
|
||||
export CCUSTOMOPTIONS="$CCUSTOMOPTIONS -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
||||
}
|
||||
|
||||
function comp_ccacheClean() {
|
||||
[ "$AC_CCACHE" != true ] && echo "ccache is disabled" && return
|
||||
|
||||
echo "Cleaning ccache"
|
||||
ccache -C
|
||||
ccache -s
|
||||
}
|
||||
|
||||
function comp_ccacheResetStats() {
|
||||
[ "$AC_CCACHE" != true ] && return
|
||||
|
||||
ccache -zc
|
||||
}
|
||||
|
||||
function comp_ccacheShowStats() {
|
||||
[ "$AC_CCACHE" != true ] && return
|
||||
|
||||
ccache -s
|
||||
}
|
||||
|
||||
function comp_configure() {
|
||||
CWD=$(pwd)
|
||||
|
||||
@@ -16,6 +50,7 @@ function comp_configure() {
|
||||
echo "Build path: $BUILDPATH"
|
||||
echo "DEBUG info: $CDEBUG"
|
||||
echo "Compilation type: $CTYPE"
|
||||
echo "CCache: $AC_CCACHE"
|
||||
# -DCMAKE_BUILD_TYPE=$CCTYPE disable optimization "slow and huge amount of ram"
|
||||
# -DWITH_COREDEBUG=$CDEBUG compiled with debug information
|
||||
|
||||
@@ -28,6 +63,8 @@ function comp_configure() {
|
||||
DCONF="-DCONF_DIR=$CONFDIR"
|
||||
fi
|
||||
|
||||
comp_ccacheEnable
|
||||
|
||||
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
|
||||
-DSCRIPTS=$CSCRIPTS \
|
||||
-DBUILD_TESTING=$CBUILD_TESTING \
|
||||
@@ -49,11 +86,21 @@ function comp_compile() {
|
||||
|
||||
cd $BUILDPATH
|
||||
|
||||
comp_ccacheResetStats
|
||||
|
||||
time make -j $MTHREADS
|
||||
make -j $MTHREADS install
|
||||
|
||||
comp_ccacheShowStats
|
||||
|
||||
cd $CWD
|
||||
|
||||
if [ $DOCKER = 1 ]; then
|
||||
echo "Generating confs..."
|
||||
cp -n "env/dist/etc/worldserver.conf.dockerdist" "env/dist/etc/worldserver.conf"
|
||||
cp -n "env/dist/etc/authserver.conf.dockerdist" "env/dist/etc/authserver.conf"
|
||||
fi
|
||||
|
||||
runHooks "ON_AFTER_BUILD"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#syntax=docker/dockerfile:1.2
|
||||
|
||||
#================================================================
|
||||
#
|
||||
# DEV: Stage used for the development environment
|
||||
@@ -41,10 +43,11 @@ RUN addgroup --gid $GROUP_ID acore && \
|
||||
echo 'acore ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
# must be created to set the correct permissions on them
|
||||
RUN mkdir -p /azerothcore/env/dist/bin
|
||||
RUN mkdir -p /azerothcore/env/dist/data
|
||||
RUN mkdir -p /azerothcore/env/dist/logs
|
||||
RUN mkdir -p /azerothcore/env/dist/etc
|
||||
RUN mkdir -p /azerothcore/var/build
|
||||
RUN mkdir -p /azerothcore/var/build/obj
|
||||
|
||||
# Correct permissions for non-root operations
|
||||
RUN chown -R $DOCKER_USER:$DOCKER_USER /home/acore
|
||||
@@ -157,9 +160,28 @@ CMD ./acore.sh run-worldserver
|
||||
#=================================================================
|
||||
FROM base as build
|
||||
|
||||
ARG DOCKER_USER=acore
|
||||
|
||||
LABEL description="AC Image used by the build stage to generate production images"
|
||||
|
||||
RUN bash bin/acore-docker-build
|
||||
RUN mkdir -p /azerothcore/env/etc/
|
||||
|
||||
# check if we have ccache files available outside
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER var/docker/ccache /azerothcore/var/ccache
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/authserver.conf.dockerdist /azerothcore/env/dist/etc/authserver.conf.dockerdist
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER env/docker/etc/worldserver.conf.dockerdist /azerothcore/env/dist/etc/worldserver.conf.dockerdist
|
||||
|
||||
# install eluna
|
||||
RUN git clone --depth=1 --branch=master --recursive https://github.com/azerothcore/mod-eluna-lua-engine.git /azerothcore/modules/mod-eluna-lua-engine
|
||||
|
||||
ENV USER_CONF_PATH=/azerothcore/apps/docker/config-docker.sh
|
||||
ENV CTYPE=RelWithDebInfo
|
||||
ENV AC_CCACHE=true
|
||||
ENV CCACHE_CPP2=true
|
||||
ENV CSCRIPTPCH=OFF
|
||||
ENV CCOREPCH=OFF
|
||||
ENV CTOOLS=ON
|
||||
RUN bash apps/docker/docker-build-prod.sh
|
||||
|
||||
#================================================================
|
||||
#
|
||||
@@ -169,7 +191,7 @@ RUN bash bin/acore-docker-build
|
||||
#=================================================================
|
||||
FROM authserver-local as authserver
|
||||
|
||||
LABEL description="AC Production ready authserver"
|
||||
LABEL description="AC Production: authserver"
|
||||
|
||||
ARG DOCKER_USER=acore
|
||||
|
||||
@@ -184,14 +206,95 @@ COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/au
|
||||
#=================================================================
|
||||
FROM worldserver-local as worldserver
|
||||
|
||||
LABEL description="AC Production ready worldserver"
|
||||
LABEL description="AC Production: worldserver"
|
||||
|
||||
ARG DOCKER_USER=acore
|
||||
|
||||
RUN mkdir -p /azerothcore/env/dist/bin/lua_scripts
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/etc /azerothcore/env/dist/etc
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/lua_scripts /azerothcore/env/dist/bin/lua_scripts
|
||||
|
||||
#================================================================
|
||||
#
|
||||
# CLIENT DATA
|
||||
#
|
||||
#=================================================================
|
||||
|
||||
FROM ubuntu:20.04 as client-data
|
||||
ARG USER_ID=1000
|
||||
ARG GROUP_ID=1000
|
||||
ARG DOCKER_USER=acore
|
||||
|
||||
LABEL description="AC Production: client-data"
|
||||
|
||||
RUN apt-get update && apt-get install -y tzdata curl unzip && rm -rf /var/lib/apt/lists/* ;
|
||||
|
||||
# set timezone environment variable
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# set noninteractive mode so tzdata doesn't ask to set timezone on install
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN addgroup --gid $GROUP_ID acore && \
|
||||
adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID acore && \
|
||||
passwd -d acore && \
|
||||
echo 'acore ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
ENV DATAPATH=/azerothcore/env/dist/data
|
||||
ENV DATAPATH_ZIP=/tmp/data.zip
|
||||
|
||||
RUN /azerothcore/acore.sh client-data
|
||||
RUN --mount=type=bind,target=/azerothcore-temp,readwrite /azerothcore-temp/acore.sh client-data
|
||||
|
||||
RUN apt-get remove --purge -y tzdata curl unzip && apt-get autoremove -y
|
||||
|
||||
RUN chown -R $DOCKER_USER:$DOCKER_USER /azerothcore
|
||||
|
||||
USER $DOCKER_USER
|
||||
|
||||
#================================================================
|
||||
#
|
||||
# TOOLS
|
||||
#
|
||||
#=================================================================
|
||||
|
||||
FROM ubuntu:20.04 as tools
|
||||
ARG USER_ID=1000
|
||||
ARG GROUP_ID=1000
|
||||
ARG DOCKER_USER=acore
|
||||
|
||||
LABEL description="AC Production: tools"
|
||||
|
||||
# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
|
||||
# set timezone environment variable
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# set noninteractive mode so tzdata doesn't ask to set timezone on install
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y libmysqlclient-dev libace-dev libssl-dev libbz2-dev sudo && rm -rf /var/lib/apt/lists/* ;
|
||||
|
||||
# Create a non-root user
|
||||
RUN addgroup --gid $GROUP_ID acore && \
|
||||
adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID acore && \
|
||||
passwd -d acore && \
|
||||
echo 'acore ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||
|
||||
RUN mkdir -p /azerothcore/env/client/
|
||||
RUN chown -R $DOCKER_USER:$DOCKER_USER /azerothcore
|
||||
|
||||
USER $DOCKER_USER
|
||||
|
||||
WORKDIR /azerothcore/env/client/
|
||||
|
||||
RUN mkdir -p /azerothcore/env/client/dbc
|
||||
RUN mkdir -p /azerothcore/env/client/maps
|
||||
RUN mkdir -p /azerothcore/env/client/mmaps
|
||||
RUN mkdir -p /azerothcore/env/client/vmaps
|
||||
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/mapextractor /azerothcore/env/client/mapextractor
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/mmaps_generator /azerothcore/env/client/mmaps_generator
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4assembler /azerothcore/env/client/vmap4assembler
|
||||
COPY --chown=$DOCKER_USER:$DOCKER_USER --from=build /azerothcore/env/dist/bin/vmap4extractor /azerothcore/env/client/vmap4extractor
|
||||
|
||||
|
||||
18
apps/docker/docker-build-dev.sh
Normal file
18
apps/docker/docker-build-dev.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
IMPORT_DB=$1
|
||||
|
||||
source "$CUR_PATH/docker-build-prod.sh"
|
||||
|
||||
echo "Fixing EOL..."
|
||||
# using -n (new file mode) should also fix the issue
|
||||
# when the file is created with the default acore user but you
|
||||
# set a different user into the docker configurations
|
||||
for file in "env/dist/etc/"*
|
||||
do
|
||||
dos2unix -n $file $file
|
||||
done
|
||||
|
||||
[[ $IMPORT_DB != 0 ]] && bash acore.sh db-assembler import-all || true
|
||||
5
apps/docker/docker-build-prod.sh
Executable file
5
apps/docker/docker-build-prod.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd /azerothcore
|
||||
|
||||
bash acore.sh compiler build
|
||||
@@ -7,6 +7,12 @@ import {
|
||||
|
||||
const program = new Command();
|
||||
|
||||
const env = {
|
||||
COMPOSE_DOCKER_CLI_BUILD: "1",
|
||||
DOCKER_BUILDKIT: "1",
|
||||
BUILDKIT_INLINE_CACHE: "1",
|
||||
};
|
||||
|
||||
program
|
||||
.name("acore.sh docker")
|
||||
.description("Shell scripts for docker")
|
||||
@@ -16,85 +22,125 @@ shellCommandFactory(
|
||||
"start:app",
|
||||
"Startup the authserver and worldserver apps",
|
||||
["docker-compose --profile app up"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"start:app:d",
|
||||
"Startup the authserver and worldserver apps in detached mode",
|
||||
["docker-compose --profile app up -d"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory("build", "Build the authserver and worldserver", [
|
||||
"docker-compose --profile all build",
|
||||
"docker-compose --profile local build --parallel",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash bin/acore-docker-update",
|
||||
]);
|
||||
|
||||
shellCommandFactory(
|
||||
"build:clean",
|
||||
"Clean and run build",
|
||||
[
|
||||
"docker-compose --profile all build",
|
||||
"docker image prune -f",
|
||||
`docker-compose run --rm ac-build bash acore.sh compiler clean`,
|
||||
"docker-compose run --rm ac-build bash bin/acore-docker-update",
|
||||
],
|
||||
);
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
], env);
|
||||
|
||||
shellCommandFactory(
|
||||
"build:nocache",
|
||||
"Build the authserver and worldserver without docker cache",
|
||||
[
|
||||
"docker-compose --profile all build --no-cache",
|
||||
"docker-compose --profile local build --no-cache --parallel",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash bin/acore-docker-update",
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"build:compile",
|
||||
"Run the compilation process only, without rebuilding all docker images and importing db",
|
||||
[
|
||||
"docker-compose build ac-build",
|
||||
"docker-compose build --parallel ac-build",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash acore.sh compiler build",
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh 0",
|
||||
],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"clean:build",
|
||||
"Clean build files",
|
||||
[
|
||||
"docker image prune -f",
|
||||
`docker-compose run --rm ac-build bash acore.sh compiler clean`,
|
||||
],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"client-data",
|
||||
"Download client data inside the ac-data volume",
|
||||
["docker-compose run --rm ac-worldserver bash acore.sh client-data"],
|
||||
["docker-compose run --rm ac-build bash acore.sh client-data"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"db-import",
|
||||
"Create and upgrade the database with latest updates",
|
||||
["docker-compose run --rm ac-build bash acore.sh db-assembler import-all"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:up",
|
||||
"Start the dev server container",
|
||||
["docker-compose up ac-dev-server"],
|
||||
"Start the dev server container in background",
|
||||
["docker-compose up -d ac-dev-server"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:build",
|
||||
"Build using the dev server, it uses volumes to compile which can be faster on linux & WSL",
|
||||
["docker-compose run --rm ac-dev-server bash acore.sh compiler build"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:dash [args...]",
|
||||
"Execute acore dashboard within a running ac-dev-server",
|
||||
["docker-compose run --rm ac-dev-server bash acore.sh"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:shell [args...]",
|
||||
"Open an interactive shell within the dev server",
|
||||
["docker-compose run --rm ac-dev-server bash"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:build",
|
||||
"Build producion services",
|
||||
[
|
||||
"docker-compose --profile prod build --parallel",
|
||||
"docker image prune -f",
|
||||
],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:pull",
|
||||
"Pull production services from the remote registry",
|
||||
["docker-compose --profile prod pull"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:up",
|
||||
"Start production services (foreground)",
|
||||
["docker-compose --profile prod-app up"],
|
||||
env,
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:up:d",
|
||||
"Start production services (background)",
|
||||
["docker-compose --profile prod-app up -d"],
|
||||
env,
|
||||
);
|
||||
|
||||
program
|
||||
@@ -125,7 +171,7 @@ program
|
||||
|
||||
if (!services) {
|
||||
console.error("No services available!");
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
services.pop();
|
||||
@@ -144,8 +190,8 @@ program
|
||||
}
|
||||
|
||||
if (!selService) {
|
||||
console.log(`Service ${service} is not available`)
|
||||
return;
|
||||
console.log(`Service ${service} is not available`);
|
||||
return;
|
||||
}
|
||||
|
||||
command = `docker attach ${selService.split(" ")[0]}`;
|
||||
@@ -185,7 +231,7 @@ while (true) {
|
||||
const command = await Input.prompt({
|
||||
message: "Enter the command:",
|
||||
});
|
||||
console.log(command)
|
||||
console.log(command);
|
||||
await program.parseAsync(command.split(" "));
|
||||
} else {
|
||||
await program.parseAsync(Deno.args);
|
||||
@@ -204,6 +250,7 @@ function shellCommandFactory(
|
||||
name: string,
|
||||
description: string,
|
||||
commands: string[],
|
||||
env?: { [key: string]: string },
|
||||
): Command {
|
||||
return program
|
||||
.command(name)
|
||||
@@ -231,6 +278,7 @@ function shellCommandFactory(
|
||||
const shellCmd = run({
|
||||
cmd,
|
||||
cwd: process.cwd(),
|
||||
env: { ...process.env, ...env },
|
||||
});
|
||||
|
||||
const status = await shellCmd.status();
|
||||
|
||||
34
apps/git_tools/subrepo-update.sh
Executable file
34
apps/git_tools/subrepo-update.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#######################
|
||||
#
|
||||
# README
|
||||
#
|
||||
# This script is used to automatically update
|
||||
# submodules and subrepos included in this project
|
||||
# Subrepo are updated in bidirectional way (pull + push)
|
||||
# because they are intended to be developed by this organization
|
||||
#
|
||||
# NOTE: only maintainers and CI should run this script and
|
||||
# keep it updated
|
||||
#
|
||||
#######################
|
||||
|
||||
set -e
|
||||
ROOT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../../"
|
||||
# update all submodules
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach git pull origin master
|
||||
# include libraries for git subrepo
|
||||
source "$ROOT_PATH/deps/git-subrepo/.rc"
|
||||
source "$ROOT_PATH/deps/acore/bash-lib/src/git-utils/subrepo.sh"
|
||||
|
||||
echo "> Pulling and update all subrepos"
|
||||
|
||||
subrepoUpdate https://github.com/azerothcore/bash-lib master deps/acore/bash-lib
|
||||
|
||||
subrepoUpdate https://github.com/azerothcore/cmake-utils master deps/acore/cmake-utils
|
||||
|
||||
subrepoUpdate https://github.com/azerothcore/mysql-tools master deps/acore/mysql-tools
|
||||
|
||||
subrepoUpdate https://github.com/azerothcore/joiner master deps/acore/joiner
|
||||
@@ -227,6 +227,7 @@ function inst_download_client_data {
|
||||
|
||||
# first check if it's defined in env, otherwise use the default
|
||||
local path="${DATAPATH:-$AC_BINPATH_FULL}"
|
||||
local zipPath="${DATAPATH_ZIP:-"$DATAPATH/data.zip"}"
|
||||
|
||||
dataVersionFile="$path/data-version"
|
||||
|
||||
@@ -240,9 +241,9 @@ function inst_download_client_data {
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Downloading client data in: $path/data.zip ..."
|
||||
curl -L https://github.com/wowgaming/client-data/releases/download/$VERSION/data.zip > "$path/data.zip" \
|
||||
&& echo "unzip downloaded file..." && unzip -q -o "$path/data.zip" -d "$path/" \
|
||||
&& echo "Remove downloaded file" && rm "$path/data.zip" \
|
||||
echo "Downloading client data in: $zipPath ..."
|
||||
curl -L https://github.com/wowgaming/client-data/releases/download/$VERSION/data.zip > "$zipPath" \
|
||||
&& echo "unzip downloaded file in $path..." && unzip -q -o "$zipPath" -d "$path/" \
|
||||
&& echo "Remove downloaded file" && rm "$zipPath" \
|
||||
&& echo "INSTALLED_VERSION=$VERSION" > "$dataVersionFile"
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ DEBIAN_VERSION=$(lsb_release -sr)
|
||||
|
||||
sudo apt-get update -y
|
||||
|
||||
sudo apt-get install -y gdbserver gdb unzip curl libace-6.* libace-dev \
|
||||
libncurses-dev libreadline-dev clang g++ \
|
||||
gcc git cmake make ccache
|
||||
|
||||
if [[ $DEBIAN_VERSION -eq "10" ]]; then
|
||||
sudo apt-get install -y git cmake make gcc g++ clang default-libmysqlclient-dev \
|
||||
libssl-dev libbz2-dev libreadline-dev libncurses-dev mariadb-server \
|
||||
libace-6.* libace-dev curl unzip gdb gdbserver
|
||||
sudo apt-get install -y default-libmysqlclient-dev libssl-dev libreadline-dev libncurses-dev mariadb-server
|
||||
else # Debian 8 and 9 should work using this
|
||||
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
|
||||
libssl1.0-dev libbz2-dev libreadline-dev libncurses-dev \
|
||||
mysql-server libace-6.* libace-dev curl unzip gdb gdbserver
|
||||
sudo apt-get install -y libmysqlclient-dev libssl1.0-dev mysql-server
|
||||
fi
|
||||
|
||||
@@ -8,12 +8,12 @@ UBUNTU_VERSION=$(lsb_release -sr);
|
||||
sudo apt-get update -y
|
||||
|
||||
# shared deps
|
||||
sudo apt-get -y install make cmake clang curl unzip libmysqlclient-dev libace-dev
|
||||
sudo apt-get -y install make cmake clang curl unzip libmysqlclient-dev libace-dev ccache
|
||||
|
||||
if [[ $CONTINUOUS_INTEGRATION || $DOCKER ]]; then
|
||||
sudo apt-get -y install build-essential libtool cmake-data openssl libgoogle-perftools-dev \
|
||||
libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \
|
||||
libncurses5-dev ccache curl unzip
|
||||
libncurses5-dev
|
||||
else
|
||||
sudo apt-get install -y git gcc g++ gdb gdbserver \
|
||||
libssl-dev libbz2-dev libreadline-dev libncurses-dev \
|
||||
|
||||
@@ -11,7 +11,7 @@ echo "!!README!!: Please install openssl and mysql libraries manually following
|
||||
# microsoft-build-tools
|
||||
# mysql 5.6
|
||||
|
||||
choco install -y --skip-checksums cmake git git.install microsoft-build-tools
|
||||
choco install -y --skip-checksums cmake git git.install microsoft-build-tools ccache
|
||||
choco install -y --skip-checksums mysql --version 5.6.12
|
||||
|
||||
echo "!!README!!: Please remember to install openssl and mysql libraries manually following our wiki"
|
||||
|
||||
Reference in New Issue
Block a user