From 673d8d34452bc7ba525ae644fa7bddd9db453ff7 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:39:59 +0100 Subject: [PATCH 01/11] first commit --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..92689619 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +image: $CI_REGISTRY/buildroot.org/buildroot/base:20220105.2314 + +stages: + - fetch-assets + - generate-gitlab-ci + - build + +fetch-assets: + stage: fetch-assets + script: + - git submodule update --init --recursive + - git submodule update --remote --merge + - ./scripts/br-patches.sh + +generate-gitlab-ci-yml: + stage: generate-gitlab-ci + script: ./support/scripts/generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml + artifacts: + when: always + paths: + - generated-gitlab-ci.yml + - br-test-pkg/*/.config + - br-test-pkg/*/missing.config + +buildroot-pipeline: + stage: build + trigger: + include: + - artifact: generated-gitlab-ci.yml + job: generate-gitlab-ci-yml + strategy: depend + variables: + PARENT_PIPELINE_ID: $CI_PIPELINE_ID From 747bb41ddbb59be23b42588b76e925e1db60fbc8 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:49:22 +0100 Subject: [PATCH 02/11] validated fetch and patch --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 92689619..4222c7f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ fetch-assets: generate-gitlab-ci-yml: stage: generate-gitlab-ci - script: ./support/scripts/generate-gitlab-ci-yml support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml + script: ./buildroot/support/scripts/generate-gitlab-ci-yml ./buildroot/support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml artifacts: when: always paths: From 5e5d9aa21317c659e733e78b0eb47481818b5e22 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:54:38 +0100 Subject: [PATCH 03/11] add artifacts to keep buildroot --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4222c7f4..c3fcd0b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,12 @@ stages: fetch-assets: stage: fetch-assets + artifacts: + untraked: true + expire_in: 1 day + when: on_success + paths: + - buildroot script: - git submodule update --init --recursive - git submodule update --remote --merge From 6002cf9efb9e22d62fcd99f87642600b85b669fd Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:55:54 +0100 Subject: [PATCH 04/11] add dependence on artifact --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3fcd0b1..0a3e7b85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: fetch-assets: stage: fetch-assets artifacts: - untraked: true + untracked: true expire_in: 1 day when: on_success paths: @@ -20,6 +20,7 @@ fetch-assets: generate-gitlab-ci-yml: stage: generate-gitlab-ci + dependences: fetch-assets script: ./buildroot/support/scripts/generate-gitlab-ci-yml ./buildroot/support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml artifacts: when: always From c5b494437a6c17ef0908f6675997125b83e8bcaf Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:56:31 +0100 Subject: [PATCH 05/11] add dependence on artifact --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a3e7b85..6fb8d802 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ fetch-assets: generate-gitlab-ci-yml: stage: generate-gitlab-ci - dependences: fetch-assets + dependencies: fetch-assets script: ./buildroot/support/scripts/generate-gitlab-ci-yml ./buildroot/support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml artifacts: when: always From e6e484b2b1e3b2ebee9be59546e2635b4a1b0845 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:57:22 +0100 Subject: [PATCH 06/11] add dependence on artifact --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fb8d802..473ce155 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,8 @@ fetch-assets: generate-gitlab-ci-yml: stage: generate-gitlab-ci - dependencies: fetch-assets + dependencies: + - fetch-assets script: ./buildroot/support/scripts/generate-gitlab-ci-yml ./buildroot/support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml artifacts: when: always @@ -31,6 +32,8 @@ generate-gitlab-ci-yml: buildroot-pipeline: stage: build + dependencies: + - fetch-assets trigger: include: - artifact: generated-gitlab-ci.yml From 223aa8d17ec907d852402b038076d4b90427e896 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 22:58:45 +0100 Subject: [PATCH 07/11] add dependence on artifact --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 473ce155..542ad26f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,8 +32,6 @@ generate-gitlab-ci-yml: buildroot-pipeline: stage: build - dependencies: - - fetch-assets trigger: include: - artifact: generated-gitlab-ci.yml From 88acb88a0c10f8347dc467c7ba67e222f9f07e52 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 23:32:11 +0100 Subject: [PATCH 08/11] added patch --- .../0024-Generate-gitlabci.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 buildroot-patches/0024-Generate-gitlabci.patch diff --git a/buildroot-patches/0024-Generate-gitlabci.patch b/buildroot-patches/0024-Generate-gitlabci.patch new file mode 100644 index 00000000..081da743 --- /dev/null +++ b/buildroot-patches/0024-Generate-gitlabci.patch @@ -0,0 +1,52 @@ +diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in +index 47e72c3213..a18476e0d0 100644 +--- a/support/misc/gitlab-ci.yml.in ++++ b/support/misc/gitlab-ci.yml.in +@@ -1,13 +1,13 @@ + .check-check-package_base: + script: +- - python3 -m pytest -v utils/checkpackagelib/ ++ - python3 -m pytest -v ./buildroot/utils/checkpackagelib/ + + .check-DEVELOPERS_base: + # get-developers should print just "No action specified"; if it prints + # anything else, it's a parse error. + # The initial ! is removed by YAML so we need to quote it. + script: +- - "! utils/get-developers | grep -v 'No action specified'" ++ - "! ./buildroot/utils/get-developers | grep -v 'No action specified'" + + .check-flake8_base: + script: +@@ -23,7 +23,7 @@ + script: + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} +- - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME} ++ - ./buildroot/support/scripts/check-dotconfig.py .config ./buildroot/configs/${DEFCONFIG_NAME} + artifacts: + when: on_failure + expire_in: 2 weeks +@@ -45,11 +45,11 @@ + script: + - echo "Configure Buildroot for ${DEFCONFIG_NAME}" + - make ${DEFCONFIG_NAME} +- - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} ++ - ./buildroot/support/scripts/check-dotconfig.py .config ./buildroot/configs/${DEFCONFIG_NAME} + - echo 'Build buildroot' + - *run_make + - | +- ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || { ++ ./buildroot/support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || { + echo 'Failed runtime test last output' + tail -200 runtime-test.log + exit 1 +@@ -75,7 +75,7 @@ + # elastic runners. + script: + - echo "Starting runtime test ${TEST_CASE_NAME}" +- - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} ++ - ./buildroot/support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} + artifacts: + when: always + expire_in: 2 weeks From 6d5d3a4c78bb651bf8b9ef5f93fed21f2f82b1cb Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 23:38:30 +0100 Subject: [PATCH 09/11] remove patch --- .gitlab-ci.yml | 30 ++++------- .../0024-Generate-gitlabci.patch | 52 ------------------- 2 files changed, 9 insertions(+), 73 deletions(-) delete mode 100644 buildroot-patches/0024-Generate-gitlabci.patch diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 542ad26f..fb68bf59 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,3 @@ -image: $CI_REGISTRY/buildroot.org/buildroot/base:20220105.2314 - stages: - fetch-assets - generate-gitlab-ci @@ -18,24 +16,14 @@ fetch-assets: - git submodule update --remote --merge - ./scripts/br-patches.sh -generate-gitlab-ci-yml: - stage: generate-gitlab-ci - dependencies: - - fetch-assets - script: ./buildroot/support/scripts/generate-gitlab-ci-yml ./buildroot/support/misc/gitlab-ci.yml.in > generated-gitlab-ci.yml - artifacts: - when: always - paths: - - generated-gitlab-ci.yml - - br-test-pkg/*/.config - - br-test-pkg/*/missing.config - buildroot-pipeline: stage: build - trigger: - include: - - artifact: generated-gitlab-ci.yml - job: generate-gitlab-ci-yml - strategy: depend - variables: - PARENT_PIPELINE_ID: $CI_PIPELINE_ID + dependencies: + - fetch-assets + artifacts: + when: on_success + paths: + - release + script: + - make clean + - make rpi3_64-nogui diff --git a/buildroot-patches/0024-Generate-gitlabci.patch b/buildroot-patches/0024-Generate-gitlabci.patch deleted file mode 100644 index 081da743..00000000 --- a/buildroot-patches/0024-Generate-gitlabci.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in -index 47e72c3213..a18476e0d0 100644 ---- a/support/misc/gitlab-ci.yml.in -+++ b/support/misc/gitlab-ci.yml.in -@@ -1,13 +1,13 @@ - .check-check-package_base: - script: -- - python3 -m pytest -v utils/checkpackagelib/ -+ - python3 -m pytest -v ./buildroot/utils/checkpackagelib/ - - .check-DEVELOPERS_base: - # get-developers should print just "No action specified"; if it prints - # anything else, it's a parse error. - # The initial ! is removed by YAML so we need to quote it. - script: -- - "! utils/get-developers | grep -v 'No action specified'" -+ - "! ./buildroot/utils/get-developers | grep -v 'No action specified'" - - .check-flake8_base: - script: -@@ -23,7 +23,7 @@ - script: - - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - - make ${DEFCONFIG_NAME} -- - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME} -+ - ./buildroot/support/scripts/check-dotconfig.py .config ./buildroot/configs/${DEFCONFIG_NAME} - artifacts: - when: on_failure - expire_in: 2 weeks -@@ -45,11 +45,11 @@ - script: - - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - - make ${DEFCONFIG_NAME} -- - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} -+ - ./buildroot/support/scripts/check-dotconfig.py .config ./buildroot/configs/${DEFCONFIG_NAME} - - echo 'Build buildroot' - - *run_make - - | -- ./support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || { -+ ./buildroot/support/scripts/boot-qemu-image.py "${DEFCONFIG_NAME}" > >(tee runtime-test.log) 2>&1 || { - echo 'Failed runtime test last output' - tail -200 runtime-test.log - exit 1 -@@ -75,7 +75,7 @@ - # elastic runners. - script: - - echo "Starting runtime test ${TEST_CASE_NAME}" -- - ./support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} -+ - ./buildroot/support/testing/run-tests -o test-output/ -d test-dl/ -k --timeout-multiplier 10 ${TEST_CASE_NAME} - artifacts: - when: always - expire_in: 2 weeks From d24ab107adb11e753e899c98f3da27fd685f7e5d Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 23:53:13 +0100 Subject: [PATCH 10/11] separate make --- .gitlab-ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb68bf59..4d4774a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,8 +16,22 @@ fetch-assets: - git submodule update --remote --merge - ./scripts/br-patches.sh -buildroot-pipeline: +build rpi3-gui: stage: build + when: manual + dependencies: + - fetch-assets + artifacts: + when: success + paths: + - release + script: + - make clean + - make rpi3_64-gui + +build rpi4-gui: + stage: build + when: manual dependencies: - fetch-assets artifacts: @@ -26,4 +40,4 @@ buildroot-pipeline: - release script: - make clean - - make rpi3_64-nogui + - make rpi4_64-gui From 67ed18fa841c4d5874392aa02d5f734d4d5e5c23 Mon Sep 17 00:00:00 2001 From: denix Date: Thu, 2 Feb 2023 23:56:21 +0100 Subject: [PATCH 11/11] fix typo --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d4774a8..00935a04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ build rpi3-gui: dependencies: - fetch-assets artifacts: - when: success + when: on_success paths: - release script: