Skip to contentSkip to conversation

v3, travis-ci: add 2 mingw "build only" configurations

PATCH Steffan Karger 2 participants 2 messages May 3, 2017 – May 4, 2017 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

Quoted 10 lines · Ilya Shipitsin

Inspired by https://www.mail-archive.com/[email protected]/msg13032.html
build options are taken from regular windows installer builds

---
v2: moved download/build dependencies into functions, changed cross build detection from shell expansion ${CHOST+x} to more recognised -z "${CHOST}", which required changing 'set -eux' to 'set -ex'. Added comments to make code readable without looking into commit message.

Quoted 3 lines

v3: fixed "trailing whitespaces" found by Samuli Seppänen. Added back "set -u", thanks to Steffan Karger. Changed repo manipulation to "apt-add-repository", thanks to Nathan Stratton Treadway.

Thanks for not giving up - this looks a lot better now! Still a problem though:

Quoted 14 lines
(quoted diff) +7 -7
-  - ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} || (cat config.log && exit 1)
-  - make -j$JOBS
-  - src/openvpn/openvpn --version || true
-  - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi
-  - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; fi
-  - make check
-  - $EXTRA_SCRIPT
+  - if [ -z "${CHOST}" ]; then
+      ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} || (cat config.log && exit 1);
+      make -j$JOBS;
+      src/openvpn/openvpn --version || true;
+      if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn; fi;
+      if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L src/openvpn/openvpn; fi;
+      make check;

Review

Quoted 10 lines
(quoted diff) +10 -0
+      $EXTRA_SCRIPT;
+    else
+      export TAP_CFLAGS="-I${PWD}/tap-windows-${TAP_WINDOWS_VERSION}/include";
+      export LZO_CFLAGS="-I${PREFIX}/include";
+      export LZO_LIBS="-L${PREFIX}/lib -llzo2";
+      export PKCS11_HELPER_LIBS="-L${PREFIX}/lib -lpkcs11-helper";
+      export PKCS11_HELPER_CFLAGS="-I${PREFIX}/include";
+      ./configure --with-crypto-library="${SSLLIB}" --host=${CHOST} --build=x86_64-pc-linux-gnu --enable-pkcs11 --disable-plugins || (cat config.log && exit 1);
+      make -j$JOBS;
+    fi

Adding this as a command - with the steps separated by ; - will cause failures to be ignored. This patch should fail the build:

       make check;
+      false;
       $EXTRA_SCRIPT;

... but it doesn't:

https://github.com/syzzer/openvpn/commit/df910243428589691cfaa1c0dcc6d92ec7d12b8e

https://travis-ci.org/syzzer/openvpn/builds/228462383?utm_source=github_status&utm_medium=notification

To fix this, I propose to create a .travis/build-check.sh script, which contains the build steps (and set -eu), and call that script from .travis.yml

-Steffan

#2 lore raw

2017-05-04 0:13 GMT+05:00 Steffan Karger <[email protected]...>:

Quoted 65 lines

Hi,

Quoted 1 line · Ilya Shipitsin

Inspired by https://www.mail-archive.com/[email protected]...

sourceforge.net/msg13032.html

Quoted 6 lines

build options are taken from regular windows installer builds

---
v2: moved download/build dependencies into functions, changed cross build detection from shell expansion ${CHOST+x} to more recognised -z

"${CHOST}",

Quoted 4 lines

which required changing 'set -eux' to 'set -ex'. Added comments to make code readable without looking into commit message.

v3: fixed "trailing whitespaces" found by Samuli Seppänen. Added back

"set -u",

Quoted 1 line

thanks to Steffan Karger. Changed repo manipulation to

"apt-add-repository", thanks

Quoted 1 line

to Nathan Stratton Treadway.

Thanks for not giving up - this looks a lot better now! Still a problem though:

Quoted 1 line

- - ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} ||

(cat config.log && exit 1)

Review

Quoted 3 lines
(quoted diff) +0 -3
-  - make -j$JOBS
-  - src/openvpn/openvpn --version || true
-  - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd src/openvpn/openvpn;

fi

Quoted 1 line

- - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L

src/openvpn/openvpn; fi

Review

Quoted 4 lines
(quoted diff) +2 -2
-  - make check
-  - $EXTRA_SCRIPT
+  - if [ -z "${CHOST}" ]; then
+      ./configure --with-crypto-library="${SSLLIB}" ${EXTRA_CONFIG} ||

(cat config.log && exit 1);

Review

Quoted 3 lines
(quoted diff) +3 -0
+      make -j$JOBS;
+      src/openvpn/openvpn --version || true;
+      if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd

src/openvpn/openvpn; fi;

Quoted 1 line

+ if [ "${TRAVIS_OS_NAME}" = "osx" ]; then otool -L

src/openvpn/openvpn; fi;

Review

Quoted 4 lines
(quoted diff) +4 -0
+      make check;
+      $EXTRA_SCRIPT;
+    else
+      export TAP_CFLAGS="-I${PWD}/tap-windows-${TAP_WINDOWS_VERSION}

/include";

Review

Quoted 5 lines
(quoted diff) +5 -0
+      export LZO_CFLAGS="-I${PREFIX}/include";
+      export LZO_LIBS="-L${PREFIX}/lib -llzo2";
+      export PKCS11_HELPER_LIBS="-L${PREFIX}/lib -lpkcs11-helper";
+      export PKCS11_HELPER_CFLAGS="-I${PREFIX}/include";
+      ./configure --with-crypto-library="${SSLLIB}" --host=${CHOST}

--build=x86_64-pc-linux-gnu --enable-pkcs11 --disable-plugins || (cat config.log && exit 1);

Review

Quoted 2 lines
(quoted diff) +2 -0
+      make -j$JOBS;
+    fi

Adding this as a command - with the steps separated by ; - will cause failures to be ignored. This patch should fail the build:

       make check;
+      false;
       $EXTRA_SCRIPT;
Quoted 7 lines

... but it doesn't:

https://github.com/syzzer/openvpn/commit/df910243428589691cfaa1c0dcc6d9
2ec7d12b8e

https://travis-ci.org/syzzer/openvpn/builds/228462383?utm_
source=github_status&utm_medium=notification

I test both "cache enabled" and "cache purged" builds. I should add "false" as well ))

thanks for catching that! I will send "v4 soon"

Quoted 17 lines

To fix this, I propose to create a .travis/build-check.sh script, which contains the build steps (and set -eu), and call that script from .travis.yml

-Steffan

------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel