From afcac3d7dabce727b60465ea827c49f508b7b21d Mon Sep 17 00:00:00 2001 From: Filippo Cremonese Date: Fri, 22 Jan 2021 17:21:06 +0100 Subject: [PATCH 1/5] Changes to support .xz binary archives --- .orchestra/ci/ci-run.sh | 7 ++++--- .orchestra/support/revng-distributable/revng-update | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.orchestra/ci/ci-run.sh b/.orchestra/ci/ci-run.sh index 35af92ab..0a3d80ee 100755 --- a/.orchestra/ci/ci-run.sh +++ b/.orchestra/ci/ci-run.sh @@ -240,9 +240,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 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() From d079d7f857011ede3a5b5c0fd036bec395e3d7e9 Mon Sep 17 00:00:00 2001 From: Filippo Cremonese Date: Thu, 22 Apr 2021 11:57:18 +0200 Subject: [PATCH 2/5] Split PUSH_CHANGES Split PUSH_CHANGES into to allow more granular behaviour: - PROMOTE_BRANCHES controls the promotion from next-* to * - PUSH_BINARY_ARCHIVES controls whether binary archives are pushed PUSH_CHANGES continues to exist for backwards compatibility. --- .orchestra/ci/ci-run.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.orchestra/ci/ci-run.sh b/.orchestra/ci/ci-run.sh index 0a3d80ee..2701121f 100755 --- a/.orchestra/ci/ci-run.sh +++ b/.orchestra/ci/ci-run.sh @@ -21,8 +21,10 @@ # %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 @@ -188,7 +190,7 @@ for TARGET_COMPONENT in $TARGET_COMPONENTS; do fi done -if test "$PUSH_CHANGES" = 1; then +if [[ "$PROMOTE_BRANCHES" = 1 ]] || [[ "$PUSH_CHANGES" = 1 ]]; then # # Promote `next-*` branches to `*` # @@ -223,8 +225,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 @@ -268,10 +274,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" From ea377479b6bb7b9e090caf83b07b659346f30d36 Mon Sep 17 00:00:00 2001 From: Filippo Cremonese Date: Thu, 6 May 2021 11:20:23 +0200 Subject: [PATCH 3/5] Add BUILD_ALL_FROM_SOURCE option If BUILD_ALL_FROM_SOURCE is set orchestra will rebuild everything from source and not use binary archives. --- .orchestra/ci/ci-run.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.orchestra/ci/ci-run.sh b/.orchestra/ci/ci-run.sh index 2701121f..2fba1759 100755 --- a/.orchestra/ci/ci-run.sh +++ b/.orchestra/ci/ci-run.sh @@ -29,6 +29,7 @@ # 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 @@ -45,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 @@ -168,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 @@ -184,7 +191,7 @@ 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 From d9987c05fd0350be5e98ab0b8d75c390ba7f6949 Mon Sep 17 00:00:00 2001 From: Alessandro Di Federico Date: Fri, 7 May 2021 10:27:54 +0200 Subject: [PATCH 4/5] Bump Boost to 1.72.0 The archive for 1.71 has mysteriously disappeared. --- .orchestra/config/components/boost.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: | From cb299e72295e7995bc6ab0eae42811d3ab5ba83b Mon Sep 17 00:00:00 2001 From: Alessandro Di Federico Date: Thu, 27 May 2021 14:32:47 +0200 Subject: [PATCH 5/5] tmp --- .orchestra/config/global_options.yml | 4 +++- .orchestra/config/lib/cmake.lib.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 @)"