diff options
-rw-r--r-- | .gitlab-ci.yml | 43 | ||||
-rw-r--r-- | Dockerfile | 1 | ||||
-rwxr-xr-x | build.sh | 57 |
3 files changed, 45 insertions, 56 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee913fd..ba1a581 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,12 +4,6 @@ stages: # - deploy # - release -before_script: - - apt-get update - - apt-get install -y -qq bash - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - mxe_gcc5: stage: build only: @@ -17,35 +11,36 @@ mxe_gcc5: - branches@jak89_1/docker-testing script: # TODO: plz move me in a seperate script - - mkdir build - - mkdir logs + - mkdir /build + - mkdir /logs - cd / # remove me - ls -al # change me - git clone https://gitlab.com/jak89_1/manaplus.git -b $CI_COMMIT_BRANCH || exit 1 - - cd manaplus - # change me in docker (laterâ„¢) - - sed -i 's|#define GL_GLEXT_VERSION 29|#ifndef GL_GLEXT_VERSION\n#define GL_GLEXT_VERSION 29\n#endif|' /mxe/usr/i686-w64-mingw32.shared/include/SDL/SDL_opengl.h + - cd /manaplus - ./tools/ci/jobs/mxe_gcc5.sh - - find manaplus/src -type f -name "*.exe" - - mv manaplus.exe /build - - mv dyecmd.exe /build - - /mxe/tools/copydlldeps.py -C/manaplus/src -L/mxe/usr/i686-w64-mingw32.shared/bin /build || true + - find /manaplus/src -type f -name "*.exe" + - cp /manaplus/src/manaplus.exe /build/ + - cp /manaplus/src/dyecmd.exe /build/ + - /mxe/tools/copydlldeps.py -C/manaplus/src/ -L/mxe/usr/i686-w64-mingw32.shared/bin/ /build/ || true # TODO: nsis - - cp -r /manaplus/data /build - - cp /AUTHORS /build - - cp /COPYING /build - - cp /README.txt /build - - cp packaging/windows/portable.xml /build - - ls -al /build - image: registry.gitlab.com/jak89_1/docker-testing:v1.0.1 + - cp -r /manaplus/data/ /build/ + - rm -rf /build/data/**/MakeFile.* + - rm -rf /build/data/**/CMakeLists.* + - cp /manaplus/AUTHORS /build/ + - cp /manaplus/COPYING /build/ + - cp /manaplus/README.txt /build/ + - cp /manaplus/packaging/windows/portable.xml /build/ + - ls -al /build/ + - cp -r /build/ /builds/jak89_1/docker-testing/build + image: registry.gitlab.com/jak89_1/docker-testing:v1.0.2 variables: CROSS: i686-w64-mingw32.shared artifacts: paths: - - /build - - /logs + - build + - logs when: always expire_in: 3 week tags: @@ -26,6 +26,7 @@ RUN apt-get install -y\ libxml-parser-perl\ lzip\ make\ + nsis\ openssl\ p7zip-full\ patch\ @@ -1,58 +1,51 @@ #!/usr/bin/env bash export CROSS=i686-w64-mingw32.shared cross_req="cc smpeg ffmpeg sdl sdl_image sdl_ttf sdl_net sdl_gfx libxml2 curl libpng zlib gettext sdl_mixer" +docker_req="gcc g++ python autoconf automake autopoint bash bison bzip2 flex gettext git gperf intltoolize libtool lzip make makensis openssl p7zip patch perl ruby sed unzip wget lzma" -inf() +req_check() { echo "*** sys-info *** >---------------------------------------------------" uname -a - echo "req. gcc: `which gcc`" - echo "req. g++: `which g++`" - echo "req. python: `which python`" - echo "req. autoconf: `which autoconf`" - echo "req. automake: `which automake`" - echo "req. autopoint: `which autopoint`" - echo "req. bash: `which bash`" - echo "req. bison: `which bison`" - echo "req. bzip2: `which bzip2`" - echo "req. flex: `which flex`" - echo "req. gettext: `which gettext`" - echo "req. git: `which git`" - echo "req. gperf: `which gperf`" - echo "req. intltool: `which intltoolize`" - echo "req. libtool-bin: `which libtool`" - echo "req. lzip: `which lzip`" - echo "req. make: `which make`" - echo "req. openssl: `which openssl`" - echo "req. p7zip-full: `which p7zip`" - echo "req. patch: `which patch`" - echo "req. perl: `which perl`" - echo "req. ruby: `which ruby`" - echo "req. sed: `which sed`" - echo "req. unzip: `which unzip`" - echo "req. wget: `which wget`" - echo "req. xz-utils: `which lzma`" + req_err="" + for req in $docker_req; do + if ! command -v $req > /dev/null 2>&1; then + req_err="$req_err $req"; + fi + done + if [ "$req_err" != "" ]; then + echo "! missing req: $req_err !"; + exit 1; + fi echo "*** sys-info *** <---------------------------------------------------" } mxe() { - echo "*** mxe-build >------------------------------------------------------" + echo "*** mxe-build *** >--------------------------------------------------" cd / git clone https://github.com/mxe/mxe.git cd mxe + # mxe params to settings.mk echo "MXE_TARGETS := ${CROSS}" > settings.mk echo "LOCAL_PKG_LIST := ${cross_req}" >> settings.mk echo ".DEFAULT_GOAL := local-pkg-list" >> settings.mk echo 'local-pkg-list: $(LOCAL_PKG_LIST)' >> settings.mk - + + # mxe patch git apply ../mxe.patch || exit 1 + # make mxe make || exit 1 - make clean-junk || exit 1 # disc space! - echo "*** mxe-build <------------------------------------------------------" + + # sdl patch + sed -i 's|#define GL_GLEXT_VERSION 29|#ifndef GL_GLEXT_VERSION\n#define GL_GLEXT_VERSION 29\n#endif|' /mxe/usr/${CROSS}/include/SDL/SDL_opengl.h + + # cleanup downloads & logs + make clean-junk || exit 1 + echo "*** mxe-build *** <--------------------------------------------------" } @@ -64,6 +57,6 @@ test_mxe() echo "${PATH}" } -inf +req_check mxe test_mxe |