diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6033b66..b38aa76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -include: '/Docker/Linux_Conan/.gitlab-ci.yml' +include: '/Docker/Windows_Conan/.gitlab-ci.yml' image: conanio/gcc10 @@ -31,8 +31,6 @@ conan_windows: stage: build image: luki42/dynuiprefresher_build:conanbuild before_script: - - conan profile new default --detect --force # Generates default profile detecting GCC and sets old ABI - - conan profile update settings.compiler.libcxx=libstdc++11 default # Sets libcxx to C++11 ABI - mkdir -p build # create build folder - CONAN_SYSREQUIRES_MODE=enabled CONAN_SYSREQUIRES_SUDO=0 conan install . --build=missing -g cmake -if build --profile ../mingw64.profile script: diff --git a/Docker/Windows_Conan/.gitlab-ci.yml b/Docker/Windows_Conan/.gitlab-ci.yml new file mode 100644 index 0000000..6946215 --- /dev/null +++ b/Docker/Windows_Conan/.gitlab-ci.yml @@ -0,0 +1,23 @@ + +# trigger docker rebuild if changes where made +docker_linux: + stage: docker + image: docker:latest + tags: + - dind + services: + - name: docker:dind + entrypoint: ["env", "-u", "DOCKER_HOST"] + command: ["dockerd-entrypoint.sh"] + variables: + DOCKER_HOST: tcp://docker:2375/ + DOCKER_DRIVER: overlay2 + # See https://github.com/docker-library/docker/pull/166 + DOCKER_TLS_CERTDIR: "" + script: + - docker build -t luki42/dynuiprefresher_build:conanbuild Docker/Linux_Conan + - docker login -p $DockerPWD -u luki42 + - docker push luki42/dynuiprefresher_build:conanbuild + only: + changes: + - Docker/Linux_Conan/* \ No newline at end of file diff --git a/Docker/Windows_Conan/Dockerfile b/Docker/Windows_Conan/Dockerfile new file mode 100644 index 0000000..bb2680c --- /dev/null +++ b/Docker/Windows_Conan/Dockerfile @@ -0,0 +1,10 @@ +FROM fedora:33 +MAINTAINER luki42 + +COPY ./build.sh /tmp/ + +RUN bash /tmp/build.sh + +# Expose /home as workin dir +WORKDIR /home +VOLUME ["/home"] \ No newline at end of file diff --git a/Docker/Windows_Conan/build.sh b/Docker/Windows_Conan/build.sh new file mode 100644 index 0000000..94e1b29 --- /dev/null +++ b/Docker/Windows_Conan/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Install texlive +echo "instaling cmake" && \ +dnf install -y mingw64-gcc-c++ wget cmake make tar xz mingw32-nsis gtest gtest-devel python3 python3-pip +#cleanup +dnf clean dbcache && dnf clean packages + +# install conan +pip3 install conan + +git clone https://gitlab.heili.eu/lukas/dynuiprefresher.git +cd dynuiprefresher || exit +git checkout conansupport + +conan profile new default --detect --force # Generates default profile detecting GCC and sets old ABI +conan profile update settings.compiler.libcxx=libstdc++11 default # Sets libcxx to C++11 ABI +mkdir -p build # create build folder +CONAN_SYSREQUIRES_MODE=enabled CONAN_SYSREQUIRES_SUDO=0 conan install . --build=missing + + +# cleanup +conan remove "*" -s -b -f + +cd .. +rm -Rf ./dynuiprefresher +rm /tmp/build.sh \ No newline at end of file