diff --git a/.orchestra/ci/ci-run.sh b/.orchestra/ci/ci-run.sh index 35af92ab..2fba1759 100755 --- a/.orchestra/ci/ci-run.sh +++ b/.orchestra/ci/ci-run.sh @@ -21,12 +21,15 @@ # %GITLAB_ROOT% is replaced with the base URL of the Gitlab instance. # COMPONENT_TARGET_BRANCH: # branch name to try first when checking out component sources +# PUSH_BINARY_ARCHIVES: if == 1, push binary archives +# PROMOTE_BRANCHES: if == 1, promote next-* branches # PUSH_CHANGES: -# if != 1 do not push binary archives and do not promote next-* branches +# if == 1, push binary archives and promote next-* branches # PUSH_BINARY_ARCHIVE_EMAIL: used as author's email in binary archive commit # PUSH_BINARY_ARCHIVE_NAME: used as author's name in binary archive commit # SSH_PRIVATE_KEY: private key used to push binary archives # REVNG_ORCHESTRA_URL: orchestra git repo URL (must be git+ssh:// or git+https://) +# BUILD_ALL_FROM_SOURCE: if == 1 do not use binary archives and build everything set -e set -x @@ -43,6 +46,12 @@ function log() { PUSH_BINARY_ARCHIVE_EMAIL="${PUSH_BINARY_ARCHIVE_EMAIL:-sysadmin@rev.ng}" PUSH_BINARY_ARCHIVE_NAME="${PUSH_BINARY_ARCHIVE_NAME:-rev.ng CI}" +if [[ "$BUILD_ALL_FROM_SOURCE" == 1 ]]; then + BUILD_MODE="-B" +else + BUILD_MODE="-b" +fi + cd "$DIR" # Install dependencies @@ -166,9 +175,9 @@ orc update --no-config # Print debugging information # Full dependency graph -orc graph -b +orc graph "$BUILD_MODE" # Solved dependency graph for the target component -orc graph --solved -b "$TARGET_COMPONENT" +orc graph --solved "$BUILD_MODE" "$TARGET_COMPONENT" # Information about the components orc components --hashes --deps # Binary archives commit @@ -182,13 +191,13 @@ done # RESULT=0 for TARGET_COMPONENT in $TARGET_COMPONENTS; do - if ! orc --quiet install -b --test --create-binary-archives "$TARGET_COMPONENT"; then + if ! orc --quiet install "$BUILD_MODE" --test --create-binary-archives "$TARGET_COMPONENT"; then RESULT=1 break fi done -if test "$PUSH_CHANGES" = 1; then +if [[ "$PROMOTE_BRANCHES" = 1 ]] || [[ "$PUSH_CHANGES" = 1 ]]; then # # Promote `next-*` branches to `*` # @@ -223,8 +232,12 @@ if test "$PUSH_CHANGES" = 1; then orc fix-binary-archives-symlinks fi +else + echo "Skipping branch promotion (\$PROMOTE_BRANCHES = '$PROMOTE_BRANCHES', \$PUSH_CHANGES = '$PUSH_CHANGES')" +fi - # Ensure we have git lfs +if [[ "$PUSH_BINARY_ARCHIVES" = 1 ]] || [[ "$PUSH_CHANGES" = 1 ]]; then + # Ensure we have git lfs git lfs >& /dev/null # Remove old binary archives @@ -240,9 +253,10 @@ if test "$PUSH_CHANGES" = 1; then git config user.email "$PUSH_BINARY_ARCHIVE_EMAIL" git config user.name "$PUSH_BINARY_ARCHIVE_NAME" - if ! test -e .gitattributes; then - git lfs track "*.tar.gz" - git add .gitattributes + # Ensure we track the correct files + git lfs track "*.tar.*" + git add .gitattributes + if ! git diff --staged --exit-code -- .gitattributes > /dev/null; then git commit -m'Initialize .gitattributes' fi @@ -267,10 +281,8 @@ if test "$PUSH_CHANGES" = 1; then fi done - - exit "$RESULT" - else - echo "PUSH_CHANGES != 1, exiting without pushing changes" - exit $RESULT + echo "Skipping binary archives push (\$PUSH_BINARY_ARCHIVES = '$PUSH_BINARY_ARCHIVES', \$PUSH_CHANGES = '$PUSH_CHANGES')" fi + +exit "$RESULT" diff --git a/.orchestra/config/components/boost.yml b/.orchestra/config/components/boost.yml index e1154386..fc3cf68c 100644 --- a/.orchestra/config/components/boost.yml +++ b/.orchestra/config/components/boost.yml @@ -10,7 +10,7 @@ license: LICENSE_1_0.txt configure: | mkdir -p "$BUILD_DIR" - extract.sh --into "$BUILD_DIR" "https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2" + extract.sh --into "$BUILD_DIR" "https://downloads.sourceforge.net/project/boost/boost/1.72.0/boost_1_72_0.tar.bz2" patch-if-exists "${ORCHESTRA_DOTDIR}/patches/boost-1.63.0-icl-disable-LessThanComparableConcept.patch" "$BUILD_DIR" cd "$BUILD_DIR" && ./bootstrap.sh --prefix="$ORCHESTRA_ROOT" --with-libraries=test install: | diff --git a/.orchestra/config/global_options.yml b/.orchestra/config/global_options.yml index df8a263c..9ef4959b 100644 --- a/.orchestra/config/global_options.yml +++ b/.orchestra/config/global_options.yml @@ -13,18 +13,20 @@ #@ clang_release_version = "10.0.0" #@ gcc_host_version = "10.1.0" +#@ regular_cxx_stdlib = "-stdlib=libc++" #@data/values #@yaml/text-templated-strings --- clang_release_version: #@ clang_release_version gcc_host_version: #@ gcc_host_version +regular_cxx_stdlib: #@ regular_cxx_stdlib regular_c_compiler: clang regular_cxx_compiler: clang++ sanitizers_libs_path: lib64/clang/(@= clang_release_version @)/lib/linux hard_flags_compile: --sysroot $INSTALL_LINK_ONLY_PATH -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -hard_flags_cxx_clang: -stdlib=libc++ +hard_flags_cxx_clang: (@= regular_cxx_stdlib @) hard_flags_clang: -gcc-toolchain $ORCHESTRA_ROOT/lib64/gcc/x86_64-pc-linux-gnu/(@= gcc_host_version @) hard_flags_link: -L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=/ -Wl,-z,origin -Wl,--enable-new-dtags -fuse-ld=gold hard_flags_link_late: -Wl,-rpath,$RPATH_PLACEHOLDER/lib diff --git a/.orchestra/config/lib/cmake.lib.yml b/.orchestra/config/lib/cmake.lib.yml index b6066279..9c748825 100644 --- a/.orchestra/config/lib/cmake.lib.yml +++ b/.orchestra/config/lib/cmake.lib.yml @@ -26,7 +26,7 @@ - -DCMAKE_C_COMPILER="(@= data.values.regular_c_compiler @)" - -DCMAKE_CXX_COMPILER="(@= data.values.regular_cxx_compiler @)" - -DCMAKE_C_FLAGS="(@= extra_compiler_flags @) (@= extra_c_flags @)" -- -DCMAKE_CXX_FLAGS="(@= extra_compiler_flags @) (@= extra_cxx_flags @)" +- -DCMAKE_CXX_FLAGS="(@= data.values.regular_cxx_stdlib @) (@= extra_compiler_flags @) (@= extra_cxx_flags @)" - -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/(@= data.values.sanitizers_libs_path @):$RPATH_PLACEHOLDER/lib/revng/analyses" - -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/(@= data.values.sanitizers_libs_path @):$RPATH_PLACEHOLDER/lib/revng/analyses" - -DCMAKE_BUILD_TYPE="(@= cmake_build_type @)" diff --git a/.orchestra/support/revng-distributable/revng-update b/.orchestra/support/revng-distributable/revng-update index 365606fd..9da61373 100755 --- a/.orchestra/support/revng-distributable/revng-update +++ b/.orchestra/support/revng-distributable/revng-update @@ -84,7 +84,7 @@ def main(): if args.update_url: update_url = args.update_url else: - update_url = "https://rev.ng/downloads/revng-distributable/none_{}.tar.gz" + update_url = "https://rev.ng/downloads/revng-distributable/none_{}.tar.xz" update_url = update_url.format(branch) password_manager = HTTPPasswordMgrWithDefaultRealm()