From 0e09539b619427f21e1c0327d232ff7f975a288b Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Thu, 20 Oct 2022 12:12:02 -0300 Subject: [PATCH] CI fixes - cd .. after the build, before running extra_cmds, because the scripts we invoke expect to be in the root, not in the build dir (and it's dirtier for the build function to not undo the `cd build` that it runs). - fix unclosed parenthesis in mac static lib checker --- .drone.jsonnet | 16 +++++++++------- contrib/ci/drone-check-static-libs.sh | 2 +- contrib/ci/drone-static-upload.sh | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 203746cca..8985bf981 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -83,8 +83,9 @@ local debian_pipeline(name, cmake_extra + ci_dep_mirror(local_mirror), 'VERBOSE=1 make -j' + jobs, + 'cd ..', ] - + (if tests then ['../contrib/ci/drone-gdb.sh ./test/testAll --use-colour yes'] else []) + + (if tests then ['./contrib/ci/drone-gdb.sh ./build/test/testAll --use-colour yes'] else []) + extra_cmds, }, ], @@ -295,6 +296,7 @@ local mac_builder(name, // disk image. Most likely the GUI is required because if you lose sight of how pretty the // surface of macOS is you might see how ugly the insides are. 'ninja -j' + jobs + ' assemble_gui', + 'cd ..', ] + extra_cmds, }, ], @@ -394,8 +396,8 @@ local docs_pipeline(name, image, extra_cmds=[], allow_fail=false) = { '-DCMAKE_C_FLAGS="-march=x86-64 -mtune=haswell" ' + '-DNATIVE_BUILD=OFF -DWITH_SYSTEMD=OFF -DWITH_BOOTSTRAP=OFF -DBUILD_LIBLOKINET=OFF', extra_cmds=[ - '../contrib/ci/drone-check-static-libs.sh', - '../contrib/ci/drone-static-upload.sh', + './contrib/ci/drone-check-static-libs.sh', + './contrib/ci/drone-static-upload.sh', ]), // Static armhf build (gets uploaded) debian_pipeline('Static (buster armhf)', @@ -406,8 +408,8 @@ local docs_pipeline(name, image, extra_cmds=[], allow_fail=false) = { '-DCMAKE_CXX_FLAGS="-march=armv7-a+fp -Wno-psabi" -DCMAKE_C_FLAGS="-march=armv7-a+fp" ' + '-DNATIVE_BUILD=OFF -DWITH_SYSTEMD=OFF -DWITH_BOOTSTRAP=OFF', extra_cmds=[ - '../contrib/ci/drone-check-static-libs.sh', - 'UPLOAD_OS=linux-armhf ../contrib/ci/drone-static-upload.sh', + './contrib/ci/drone-check-static-libs.sh', + 'UPLOAD_OS=linux-armhf ./contrib/ci/drone-static-upload.sh', ], jobs=4), @@ -425,8 +427,8 @@ local docs_pipeline(name, image, extra_cmds=[], allow_fail=false) = { // Macos builds: mac_builder('macOS (Release)', extra_cmds=[ - '../contrib/ci/drone-check-static-libs.sh', - '../contrib/ci/drone-static-upload.sh', + './contrib/ci/drone-check-static-libs.sh', + './contrib/ci/drone-static-upload.sh', ]), mac_builder('macOS (Debug)', build_type='Debug'), ] diff --git a/contrib/ci/drone-check-static-libs.sh b/contrib/ci/drone-check-static-libs.sh index 0d919c7ca..b4d8b0b2a 100755 --- a/contrib/ci/drone-check-static-libs.sh +++ b/contrib/ci/drone-check-static-libs.sh @@ -8,7 +8,7 @@ set -o errexit bad= if [ "$DRONE_STAGE_OS" == "darwin" ]; then if otool -L llarp/apple/org.lokinet.network-extension.systemextension/Contents/MacOS/org.lokinet.network-extension | \ - grep -Ev '^llarp/apple:|^\t(/usr/lib/lib(System\.|c\+\+|objc)|/System/Library/Frameworks/(CoreFoundation|NetworkExtension|Foundation|Network)\.framework'; then + grep -Ev '^llarp/apple:|^\t(/usr/lib/lib(System\.|c\+\+|objc))|/System/Library/Frameworks/(CoreFoundation|NetworkExtension|Foundation|Network)\.framework'; then bad=1 fi elif [ "$DRONE_STAGE_OS" == "linux" ]; then diff --git a/contrib/ci/drone-static-upload.sh b/contrib/ci/drone-static-upload.sh index 460d001c2..3f66c4545 100755 --- a/contrib/ci/drone-static-upload.sh +++ b/contrib/ci/drone-static-upload.sh @@ -55,8 +55,8 @@ elif [ -e build-mac ]; then mv build-mac/Lokinet*/ "$base" tar cJvf "$archive" "$base" else - cp -av daemon/lokinet daemon/lokinet-vpn "$base" - cp -av ../contrib/bootstrap/mainnet.signed "$base/bootstrap.signed" + cp -av build/daemon/lokinet{,-vpn} "$base" + cp -av contrib/bootstrap/mainnet.signed "$base/bootstrap.signed" # tar dat shiz up yo archive="$base.tar.xz" tar cJvf "$archive" "$base"