From 8c6c3c1869acd97402989615ce569838429752fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Thu, 9 Jan 2020 17:33:49 +0100 Subject: [PATCH 1/2] Run gitlab-ci pipeline stages in parallel for faster merges --- .gitlab-ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9148103df..075ab44a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,8 @@ stages: - build_and_deploy_website .build_binary: &build_binary - stage: build_and_package_binaries + # To run in sequence and save CPU usage, use stage: build_and_package_binaries + stage: test script: - $build_binary_script "$target_os_family" "$target_os" "$target_os_version" - $package_binary_script "$target_os_family" "$target_os" "$target_os_version" @@ -21,7 +22,8 @@ stages: - dist/package/**/* .website_build: &website_build - stage: build_and_deploy_website + # To run in sequence and save CPU usage, use stage: build_and_deploy_website + stage: test image: node:8 before_script: - scripts/install_native_dependencies.sh @@ -122,7 +124,8 @@ build-and-publish-latest-docker-image: # based on desired targets build-and-package-debian-9: <<: *docker - stage: build_and_package_binaries + # To run in sequence and save CPU usage, use stage: build_and_package_binaries + stage: test variables: target_os_family: "debian" target_os: "debian" @@ -131,7 +134,8 @@ build-and-package-debian-9: build-and-package-debian-10: <<: *docker - stage: build_and_package_binaries + # To run in sequence and save CPU usage, use stage: build_and_package_binaries + stage: test variables: target_os_family: "debian" target_os: "debian" @@ -140,7 +144,8 @@ build-and-package-debian-10: build-and-package-ubuntu-18-04: <<: *docker - stage: build_and_package_binaries + # To run in sequence and save CPU usage, use stage: build_and_package_binaries + stage: test variables: target_os_family: "debian" target_os: "ubuntu" @@ -149,7 +154,8 @@ build-and-package-ubuntu-18-04: build-and-package-ubuntu-19-04: <<: *docker - stage: build_and_package_binaries + # To run in sequence and save CPU usage, use stage: build_and_package_binaries + stage: test variables: target_os_family: "debian" target_os: "ubuntu" From 27f99ab1201e68ec7300b5ac04c3e31fde9b76b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Fri, 10 Jan 2020 01:43:09 +0100 Subject: [PATCH 2/2] build_and_deploy_website depends on build_and_package_binaries build_and_deploy_website depended implicitly on build_and_package_binaries. I guess it needs to come after, still (from Tom Jack) --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 075ab44a1..6a41afad7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,13 @@ stages: - dist/package/**/* .website_build: &website_build - # To run in sequence and save CPU usage, use stage: build_and_deploy_website - stage: test + stage: build_and_deploy_website image: node:8 + dependencies: + - build-and-package-debian-9 + - build-and-package-debian-10 + - build-and-package-ubuntu-18-04 + - build-and-package-ubuntu-19-04 before_script: - scripts/install_native_dependencies.sh - scripts/install_opam.sh # TODO: or scripts/install_build_environment.sh ?