From 013e0e3016b3d92c27c23ccafbb6dd18a7c24bc2 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 22 Jun 2017 15:36:01 +0000 Subject: Enable automated testing for this branch --- .gitlab-ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .gitlab-ci.yml (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..12ebce6a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,44 @@ +image: samthursfield/buildstream:0.1-20170627.1 + +before_script: + # Update to latest BuildStream commit + - cd ~/buildstream + - git remote update origin + - git reset --hard origin/master + - pip3 install . + - cd - + + # Work around https://github.com/fedora-cloud/docker-brew-fedora/issues/14 + - export LANG="C.UTF-8" + - export LC_ALL="C.UTF-8" + + # Store cache in the shared Docker volume + - export XDG_CACHE_HOME=/cache + +stages: + - build + +x86_64-native: + stage: build + script: + - bst --colors build gnu-toolchain.bst + +armv8b64-cross: + stage: build + script: + - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst + +armv8l64-cross: + stage: build + script: + - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst + +ppc64b-cross: + stage: build + script: + - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst + +ppc64l-cross: + stage: build + script: + - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst -- cgit v1.2.1 From 9b47b15048d52ab177b885276cc1d64b99a7e69f Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 13:38:16 +0000 Subject: .gitlab-ci.yml: Share cached source between builds --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12ebce6a..94a4e54f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,9 @@ image: samthursfield/buildstream:0.1-20170627.1 +cache: + paths: + - cache/buildstream/sources/ + before_script: # Update to latest BuildStream commit - cd ~/buildstream @@ -12,8 +16,9 @@ before_script: - export LANG="C.UTF-8" - export LC_ALL="C.UTF-8" - # Store cache in the shared Docker volume - - export XDG_CACHE_HOME=/cache + # Store cache in the project directory + - mkdir -p "$(pwd)/cache" + - export XDG_CACHE_HOME="$(pwd)/cache" stages: - build -- cgit v1.2.1 From 387d00648ca64eaec5343cb748f0cbc163d8df12 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 13:51:05 +0000 Subject: .gitlab-ci.yml: Split the pipeline into 2 stages With an empty cache, every worker must spend 10 minutes pulling all of the sources that are required. There's no point having 5 workers pulling the same things in parallel, so the first stage now contains only 1 job. --- .gitlab-ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94a4e54f..14ecee82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,30 +20,35 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" +# All of the builds use the same set of sources. The first stage should contain +# only one job so that, in the case where the source cache is empty, we only +# have a single job pulling all the sources rather than 5 pulling the same things +# in parallel. stages: - - build + - simple + - cross x86_64-native: - stage: build + stage: simple script: - bst --colors build gnu-toolchain.bst armv8b64-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst armv8l64-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst ppc64b-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst ppc64l-cross: - stage: build + stage: cross script: - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst -- cgit v1.2.1 From af78a2b1041831600eb0598e52613645c24ffcd4 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 15:15:17 +0000 Subject: .gitlab-ci.yml: Separate fetch into a separate stage This is primarly to avoid hitting the 1 hour timeout that seems to be hardcoded into the CI system. It's also a bit clearer this way. --- .gitlab-ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14ecee82..f8d416a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,16 +20,18 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" -# All of the builds use the same set of sources. The first stage should contain -# only one job so that, in the case where the source cache is empty, we only -# have a single job pulling all the sources rather than 5 pulling the same things -# in parallel. stages: - - simple + - fetch + - native - cross +fetch: + stage: fetch + script: + - bst --colors fetch gnu-toolchain.bst + x86_64-native: - stage: simple + stage: native script: - bst --colors build gnu-toolchain.bst -- cgit v1.2.1 From 3b12c3318aff86369e9258f580506ee008f626e4 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 16:33:00 +0000 Subject: Simplify CI for now We cannot do long GCC builds using the default GitLab CI runners, we'll need to provide our own. --- .gitlab-ci.yml | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8d416a2..d7ff4225 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,37 +20,12 @@ before_script: - mkdir -p "$(pwd)/cache" - export XDG_CACHE_HOME="$(pwd)/cache" -stages: - - fetch - - native - - cross - -fetch: - stage: fetch - script: - - bst --colors fetch gnu-toolchain.bst -x86_64-native: - stage: native - script: - - bst --colors build gnu-toolchain.bst - -armv8b64-cross: - stage: cross - script: - - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst - -armv8l64-cross: - stage: cross - script: - - bst --colors build --target-arch=armv8l64 gnu-toolchain/stage2.bst - -ppc64b-cross: - stage: cross - script: - - bst --colors build --target-arch=ppc64b gnu-toolchain/stage2.bst +# We are limited to simple CI unless we provide our own GitLab CI runners. +stages: + - validate -ppc64l-cross: - stage: cross +validate: + stage: validate script: - - bst --colors build --target-arch=ppc64l gnu-toolchain/stage2.bst + - bst --colors show gnu-toolchain.bst -- cgit v1.2.1 From a515e4f5fba4eb9d9a417025e62b90b185029d2a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 7 Jul 2017 16:57:22 +0000 Subject: .gitlab-ci.yml: Remove caching as it seems to just add a 20 minute delay --- .gitlab-ci.yml | 9 --------- 1 file changed, 9 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7ff4225..96f5d99a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,5 @@ image: samthursfield/buildstream:0.1-20170627.1 -cache: - paths: - - cache/buildstream/sources/ - before_script: # Update to latest BuildStream commit - cd ~/buildstream @@ -16,11 +12,6 @@ before_script: - export LANG="C.UTF-8" - export LC_ALL="C.UTF-8" - # Store cache in the project directory - - mkdir -p "$(pwd)/cache" - - export XDG_CACHE_HOME="$(pwd)/cache" - - # We are limited to simple CI unless we provide our own GitLab CI runners. stages: - validate -- cgit v1.2.1