From 4c3d61b5f2450ff8bf81f02bbaa2a42baa7af372 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 15 Nov 2018 13:43:20 +1000 Subject: Appveyor: Improve diagnostics Stop installing MSYS2 packages. We're compiling for mingw, so we only need mingw packages. Run pacman in verbose mode. Explicitly install pkg-config and xz, to future-proof our builds. Diagnostics for 28399. --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 7d8927ee35..4069a53966 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -30,7 +30,7 @@ install: { Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args } - Execute-Command "C:\msys64\usr\bin\pacman" -Sy --needed --noconfirm openssl-devel openssl libevent-devel libevent ${env:mingw_prefix}-libevent ${env:mingw_prefix}-zstd ; + Execute-Command "C:\msys64\usr\bin\pacman" -Sy --verbose --needed --noconfirm ${env:mingw_prefix}-libevent ${env:mingw_prefix}-openssl ${env:mingw_prefix}-pkg-config ${env:mingw_prefix}-xz ${env:mingw_prefix}-zstd ; build_script: - ps: >- -- cgit v1.2.3-54-g00ecf From 540c833f20934ca0219579b96fae87c65bc1534e Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 15 Nov 2018 14:32:53 +1000 Subject: Appveyor: remove incorrect OpenSSL path Fixes 28399 on 0.3.4.1-alpha. --- .appveyor.yml | 4 +--- changes/bug28399 | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changes/bug28399 (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 4069a53966..fdf831686a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,12 +8,10 @@ environment: matrix: - target: i686-w64-mingw32 compiler_path: mingw32 - openssl_path: /c/OpenSSL-Win32 mingw_prefix: mingw-w64-i686 hardening: - target: x86_64-w64-mingw32 compiler_path: mingw64 - openssl_path: /c/OpenSSL-Win64 mingw_prefix: mingw-w64-x86_64 hardening: --disable-gcc-hardening @@ -45,7 +43,7 @@ build_script: Set-Location "${env:build}" Execute-Bash "which ${env:target}-gcc" Execute-Bash "${env:target}-gcc --version" - Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings --with-openssl-dir=${env:openssl_path} ${env:hardening}" + Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings ${env:hardening}" Execute-Bash "V=1 make -j2" Execute-Bash "V=1 make -j2 install" } diff --git a/changes/bug28399 b/changes/bug28399 new file mode 100644 index 0000000000..9096db70b0 --- /dev/null +++ b/changes/bug28399 @@ -0,0 +1,4 @@ + o Minor bugfixes (continuous integration, Windows): + - Stop using an external OpenSSL install, and stop installing MSYS2 + packages, when building using mingw on Appveyor Windows CI. + Fixes bug 28399; bugfix on 0.3.4.1-alpha. -- cgit v1.2.3-54-g00ecf From 83c1baca168fdd0595e9c9633e031f3bdb8df8ed Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 15 Nov 2018 18:32:52 +1000 Subject: Appveyor: manually add zstd flags to configure The mingw zstd from MSYS2 doesn't come with a pkg-config file. Fixes 28454 on Tor 0.3.4.1-alpha. --- .appveyor.yml | 2 +- changes/bug28454 | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changes/bug28454 (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index fdf831686a..c288ad8120 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -43,7 +43,7 @@ build_script: Set-Location "${env:build}" Execute-Bash "which ${env:target}-gcc" Execute-Bash "${env:target}-gcc --version" - Execute-Bash "../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings ${env:hardening}" + Execute-Bash "ZSTD_CFLAGS='-L/${env:compiler_path}/include' ZSTD_LIBS='-L/${env:compiler_path}/lib -lzstd' ../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings ${env:hardening}" Execute-Bash "V=1 make -j2" Execute-Bash "V=1 make -j2 install" } diff --git a/changes/bug28454 b/changes/bug28454 new file mode 100644 index 0000000000..ca46ae2777 --- /dev/null +++ b/changes/bug28454 @@ -0,0 +1,4 @@ + o Minor bugfixes (continuous integration, Windows): + - Manually configure the zstd compiler options, when building using + mingw on Appveyor Windows CI. The MSYS2 mingw zstd package does not + come with a pkg-config file. Fixes bug 28454; bugfix on 0.3.4.1-alpha. -- cgit v1.2.3-54-g00ecf From 27b91704753ae3235630b298449b4c8a107bd107 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 15 Nov 2018 18:57:39 +1000 Subject: Appveyor: add comments to the config file Documentation for 28399, 28454, and previous fixes. --- .appveyor.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index c288ad8120..f76a9f0a94 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,6 +13,7 @@ environment: - target: x86_64-w64-mingw32 compiler_path: mingw64 mingw_prefix: mingw-w64-x86_64 + # hardening doesn't work with mingw-w64-x86_64-gcc, because it's gcc 8 hardening: --disable-gcc-hardening install: @@ -28,11 +29,17 @@ install: { Execute-Command 'c:\msys64\usr\bin\bash' '-e' '-c' $args } + <# mingw packages start with ${env:mingw_prefix} + # unprefixed packages are from MSYS2, which is like Cygwin. Avoid them. + # + # Use pacman --debug to show package downloads and install locations + #> Execute-Command "C:\msys64\usr\bin\pacman" -Sy --verbose --needed --noconfirm ${env:mingw_prefix}-libevent ${env:mingw_prefix}-openssl ${env:mingw_prefix}-pkg-config ${env:mingw_prefix}-xz ${env:mingw_prefix}-zstd ; build_script: - ps: >- if ($env:compiler -eq "mingw") { + <# use the MSYS2 compiler and user binaries to build and install #> $oldpath = ${env:Path} -split ';' $buildpath = @("C:\msys64\${env:compiler_path}\bin", "C:\msys64\usr\bin") + $oldpath $env:Path = @($buildpath) -join ';' @@ -43,6 +50,10 @@ build_script: Set-Location "${env:build}" Execute-Bash "which ${env:target}-gcc" Execute-Bash "${env:target}-gcc --version" + <# compile for mingw + # mingw zstd doesn't come with a pkg-config file, so we manually + # configure its flags. liblzma just works. + #> Execute-Bash "ZSTD_CFLAGS='-L/${env:compiler_path}/include' ZSTD_LIBS='-L/${env:compiler_path}/lib -lzstd' ../configure --prefix=/${env:compiler_path} --build=${env:target} --host=${env:target} --disable-asciidoc --enable-fatal-warnings ${env:hardening}" Execute-Bash "V=1 make -j2" Execute-Bash "V=1 make -j2 install" @@ -51,6 +62,7 @@ build_script: test_script: - ps: >- if ($env:compiler -eq "mingw") { + <# use the MSYS2 compiler binaries to make check #> $oldpath = ${env:Path} -split ';' $buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath $env:Path = $buildpath -join ';' @@ -61,14 +73,17 @@ test_script: on_failure: - ps: >- if ($env:compiler -eq "mingw") { + <# use the MSYS2 user binaries to archive failures #> $oldpath = ${env:Path} -split ';' $buildpath = @("C:\msys64\usr\bin") + $oldpath $env:Path = @($buildpath) -join ';' Set-Location "${env:build}" + <# store logs as appveyor artifacts: see the artifacts tab #> Execute-Bash "7z a logs.zip config.log || true" Execute-Bash "7z a logs.zip test-suite.log || true" Execute-Bash "appveyor PushArtifact logs.zip || true" Execute-Bash "tail -1000 config.log || true" Execute-Bash "cat test-suite.log || true" } +# notify the IRC channel of any failures - cmd: C:\Python27\python.exe %APPVEYOR_BUILD_FOLDER%\scripts\test\appveyor-irc-notify.py irc.oftc.net:6697 tor-ci failure -- cgit v1.2.3-54-g00ecf