[gnome-build-meta/tristan/set-max-jobs: 12/12] .gitlab-ci.yml: Set `--max-jobs` on the command line.



commit 8e18ee00a5d57cc88f0517a4c323781d72696930
Author: Tristan Van Berkom <tristan vanberkom codethink co uk>
Date:   Wed Jul 17 22:19:29 2019 +0900

    .gitlab-ci.yml: Set `--max-jobs` on the command line.
    
    Use a larger number of cores when running on workers with many cores.
    
    Instead of setting the BST variable to include --max-jobs, we only
    set `--max-jobs` in the line where we actually run `bst build`. This
    is just a workaround for a technical difficulty with gitlab variables,
    trying to update the BST definition just results in $(( $(nproc) / 4 ))
    being given to `bst` literally without any shell expansion.
    
    This fixes #165

 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2de59951..b00ca869 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ variables:
   BST_STRICT: '--no-strict'
   BST_TRACK_TAGS: 'False'
   BST: "bst $BST_STRICT --config build.conf --log-file logs/build.log --colors"
-  BST_SHA: '1.2.7-0-g08d1694545d1d62295c7beba1fea65a21b93a723'
+  BST_SHA: '1.3.1-0-gb7a6624fbfbd82d2daa42f5a5570cbb4fbc729d2'
   BST_EXTERNAL_SHA: '0.14.0-0-g003f1f1e7ead60627ef4242a6d785704ede44358'
   FLATPAK_BRANCH: master
 
@@ -78,7 +78,7 @@ default:
   stage: build
   dependencies: [track]
   script:
-    - ${BST} -o arch "${ARCH}" build core.bst flatpak-runtimes.bst flatpak-platform-extensions.bst
+    - ${BST} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build core.bst flatpak-runtimes.bst 
flatpak-platform-extensions.bst
       platform-manifest.bst sdk-manifest.bst
   # Store all the downloaded git repos and tarballs in the cache.
   # This saves us fetching them on every build


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]