tag:help.appveyor.com,2012-11-13:/discussions/questions/51961-building-on-mingw-64-and-cygwin64
AppVeyor: Discussion
2020-12-13T02:42:24Z
tag:help.appveyor.com,2012-11-13:Comment/48899498
2020-12-12T13:30:24Z
2020-12-12T13:30:28Z
Building on MinGW-64 and Cygwin/64
<div><p>Folks</p>
<p>I am the maintainer of Exiv2 and we perform our Visual Studio builds on Appveyor. This was configured by a team member who is currently not available. I'd like to build on MinGW and Cygwin and can't get past the most basic step: <em>what is the name of the image</em>?</p>
<p>Any help will be greatly appreciated.</p>
<pre>
<code>init:
- echo %PYTHON%
environment:
PYTHON: "C:/Python37-x64"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: MinGW-w64
INTEGRATION_TESTS: 1
ARCHITECTURE: x86_64
UNIT_TESTS: 1
WEBREADY: False
WARNINGS_AS_ERRORS: ON
shallow_clone: true
install:
- echo %APPVEYOR_BUILD_FOLDER%
- python3 -m pip install --upgrade pip
- pip3.exe install lxml
- for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
- cd %APPVEYOR_BUILD_FOLDER%
build_script:
- cmd: mkdir -p build
- cmd: cd build
- cmd: cmake .. -G "Unix Makefiles" -DEXIV2_TEAM_WARNINGS_AS_ERRORS=%WARNINGS_AS_ERRORS% -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_PNG=ON -DEXIV2_ENABLE_WEBREADY=%WEBREADY% -DEXIV2_BUILD_UNIT_TESTS=%UNIT_TESTS%
- cmd: cmake --build . --config Release
- cmd: cmake --build . --config Release --target tests</code>
</pre></div>
Robin Mills
tag:help.appveyor.com,2012-11-13:Comment/48899498
2020-12-12T17:06:11Z
2020-12-12T17:06:14Z
Building on MinGW-64 and Cygwin/64
<div><p>Solved.</p>
<pre>
<code>init:
- echo %PYTHON%
environment:
PYTHON: "C:/Python37-x64"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
INTEGRATION_TESTS: 1
ARCHITECTURE: x86_64
UNIT_TESTS: 1
WEBREADY: False
WARNINGS_AS_ERRORS: ON
shallow_clone: true
install:
- echo %APPVEYOR_BUILD_FOLDER%
- set "PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
- C:\msys64\usr\bin\bash -c "python -m pip install --upgrade pip;pip3.exe install lxml ; for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
- cd %APPVEYOR_BUILD_FOLDER%
build_script:
- cmd: C:\msys64\usr\bin\bash -c "pwd; mkdir -p build; cd build ; cmake .. -G 'Unix Makefiles' -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-Wno-deprecated ; make ; make python_tests;"</code>
</pre></div>
Robin Mills
tag:help.appveyor.com,2012-11-13:Comment/48899498
2020-12-12T18:15:13Z
2020-12-12T18:15:14Z
Building on MinGW-64 and Cygwin/64
<div><p>And now, I'll solve this puzzle in a similar way on Cygwin/64. There's no pacman on Cygwin/64 so will investigate this: <a href="https://stackoverflow.com/questions/9260014/how-do-i-install-cygwin-components-from-the-command-line">https://stackoverflow.com/questions/9260014/how-do-i-install-cygwin...</a>.</p></div>
Robin Mills
tag:help.appveyor.com,2012-11-13:Comment/48899498
2020-12-13T01:24:42Z
2020-12-13T01:24:44Z
Building on MinGW-64 and Cygwin/64
<div><p>I have this "sort of" working. It's running the build on MinGW/msys2 and then on build on Cygwin64.</p>
<p>I really want it to perform two different builds. How can I specify two build_script: objects?</p>
<pre>
<code>init:
- echo %PYTHON%
environment:
PYTHON: "C:/Python37-x64"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
INTEGRATION_TESTS: 1
ARCHITECTURE: x86_64
UNIT_TESTS: 1
WEBREADY: False
WARNINGS_AS_ERRORS: ON
shallow_clone: true
install:
- echo %APPVEYOR_BUILD_FOLDER%
- set "PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
- C:\msys64\usr\bin\bash -c "python -m pip install --upgrade pip;pip3.exe install lxml ; for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
- cd %APPVEYOR_BUILD_FOLDER%
- set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
- C:\cygwin64\bin\bash -c "wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg ; chmod +x apt-cyg; mv apt-cyg /usr/local/bin"
- C:\cygwin64\bin\bash -c "apt-cyg install cmake zlib-devel libexpat-devel libxml2-devel libxslt-devel python38 python38-pip python38-libxml2"
- C:\cygwin64\bin\bash -c "/usr/bin/python3.8.exe -m pip install --upgrade pip"
build_script:
- cmd: set CMD=mkdir -p build
- cmd: set CMD=%CMD%; cd build
- cmd: set CMD=%CMD%; cmake .. -G 'Unix Makefiles' -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
- cmd: set CMD=%CMD%; cmake --build . --config Release
- cmd: rem echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: C:\msys64\usr\bin\bash -c "%CMD%"
- cmd: set CMD=which python3 python
- cmd: set CMD=%CMD%; python --version
- cmd: set CMD=%CMD%; build/bin/exiv2 --verbose --version; pwd ; ls -l
- cmd: set CMD=%CMD%; cd build ; cmake --build . --config Release --target python_tests
- cmd: echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: C:\msys64\usr\bin\bash -c "%CMD%"
- cmd: set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
- cmd: set CMD=rm -rf build
- cmd: set CMD=%CMD%; mkdir -p build
- cmd: set CMD=%CMD%; cd build
- cmd: set CMD=%CMD%;cmake .. -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
- cmd: set CMD=%CMD%; make
- cmd: set CMD=%CMD%; make python_tests
- cmd: echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: C:\cygwin64\bin\bash -c "%CMD%"</code>
</pre></div>
Robin Mills
tag:help.appveyor.com,2012-11-13:Comment/48899498
2020-12-13T02:42:22Z
2020-12-13T02:42:23Z
Building on MinGW-64 and Cygwin/64
<div><p>I've solved that. It's rather ugly. It works.</p>
<pre>
<code>init:
- echo %PYTHON%
environment:
PYTHON: "C:/Python37-x64"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
BUILD: MINGW64
INTEGRATION_TESTS: 1
ARCHITECTURE: x86_64
UNIT_TESTS: 1
WEBREADY: False
WARNINGS_AS_ERRORS: ON
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
BUILD: CYGWIN64
INTEGRATION_TESTS: 1
ARCHITECTURE: x86_64
UNIT_TESTS: 1
WEBREADY: False
WARNINGS_AS_ERRORS: ON
shallow_clone: true
install:
- echo %APPVEYOR_BUILD_FOLDER%
- if "%BUILD%"=="MINGW64" set "PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
- if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "python -m pip install --upgrade pip;pip3.exe install lxml ; for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
- cd %APPVEYOR_BUILD_FOLDER%
- if "%BUILD%"=="CYGWIN64" set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg ; chmod +x apt-cyg; mv apt-cyg /usr/local/bin"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "apt-cyg install cmake zlib-devel libexpat-devel libxml2-devel libxslt-devel python38 python38-pip python38-libxml2"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "/usr/bin/python3.8.exe -m pip install --upgrade pip"
build_script:
- cmd: set CMD=mkdir -p build
- cmd: set CMD=%CMD%; cd build
- cmd: set CMD=%CMD%; cmake .. -G 'Unix Makefiles' -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
- cmd: set CMD=%CMD%; cmake --build . --config Release
- cmd: rem echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "%CMD%"
- cmd: set CMD=which python3 python
- cmd: set CMD=%CMD%; python --version
- cmd: set CMD=%CMD%; build/bin/exiv2 --verbose --version; pwd ; ls -l
- cmd: set CMD=%CMD%; cd build ; cmake --build . --config Release --target python_tests
- cmd: echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "%CMD%"
- cmd: set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
- cmd: set CMD=rm -rf build
- cmd: set CMD=%CMD%; mkdir -p build
- cmd: set CMD=%CMD%; cd build
- cmd: set CMD=%CMD%;cmake .. -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
- cmd: set CMD=%CMD%; make
- cmd: set CMD=%CMD%; make python_tests
- cmd: echo %CMD%
- cd %APPVEYOR_BUILD_FOLDER%
- cmd: if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "%CMD%"</code>
</pre>
<p>Case closed. If anybody would like to suggest a better approach, I'll be very happy to hear your suggestions.</p></div>
Robin Mills