From 108c2a02bfed31bdc008b536e369810e7a4ad32d Mon Sep 17 00:00:00 2001 From: Bjarne von Horn Date: Fri, 7 Jun 2024 11:59:23 +0200 Subject: [PATCH 1/2] add missing noinst_HEADERS --- master/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/master/Makefile.am b/master/Makefile.am index cbd7cf59..6ca3b043 100644 --- a/master/Makefile.am +++ b/master/Makefile.am @@ -40,6 +40,7 @@ noinst_HEADERS = \ doxygen.c \ ethernet.c ethernet.h \ fmmu_config.c fmmu_config.h \ + flag.c flag.h \ foe.h \ foe_request.c foe_request.h \ fsm_change.c fsm_change.h \ From d7a7d6907120f6cd0b288a3ed88098f56e4018a3 Mon Sep 17 00:00:00 2001 From: Bjarne von Horn Date: Fri, 2 Feb 2024 09:41:18 +0100 Subject: [PATCH 2/2] add release pipeline with dist tarballs Fixes #9 --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ad71ca8..ed81397f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,10 @@ stages: - test - doc - deploy + - release + +variables: + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/ethercat/${CI_COMMIT_TAG}" build: stage: build @@ -15,6 +19,11 @@ build: - ./configure --with-linux-dir=/usr/src/linux-obj/$(uname -i)/default --disable-8139too --enable-tty --with-devices=2 --enable-ccat - make -j8 all modules - make DISTCHECK_CONFIGURE_FLAGS="--with-linux-dir=/usr/src/linux-obj/$(uname -i)/default" distcheck + - make dist + artifacts: + paths: + - ethercat-*.tar.gz + - ethercat-*.tar.bz2 # Build ethercat tool subcommand help output for documentation commands: @@ -86,6 +95,39 @@ update docs server: - if: $CI_COMMIT_BRANCH == "stable-1.5" && $CI_PROJECT_NAMESPACE == "etherlab.org" trigger: etherlab.org/docs +upload: + stage: deploy + image: curlimages/curl:latest + rules: + - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true" + dependencies: + - "build" + script: + - echo "$CI_COMMIT_TAG" | grep -qE '^[0-9]+(\.[0-9]+){2}$' + - | + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ + --header "Content-Type: application/gzip" \ + --fail-with-body \ + --upload-file "ethercat-${CI_COMMIT_TAG}.tar.gz" \ + "${PACKAGE_REGISTRY_URL}/ethercat-${CI_COMMIT_TAG}.tar.gz" + curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ + --header "Content-Type: application/x-bzip2" \ + --fail-with-body \ + --upload-file "ethercat-${CI_COMMIT_TAG}.tar.bz2" \ + "${PACKAGE_REGISTRY_URL}/ethercat-${CI_COMMIT_TAG}.tar.bz2" + + +release: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true" + script: + - | + release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \ + --assets-link "{\"name\":\"ethercat.tar.bz2\",\"url\":\"${PACKAGE_REGISTRY_URL}/ethercat-${CI_COMMIT_TAG}.tar.bz2\",\"link_type\":\"package\",\"filepath\":\"/dist-tarballs/ethercat.tar.bz2\"}" \ + --assets-link "{\"name\":\"ethercat.tar.gz\",\"url\":\"${PACKAGE_REGISTRY_URL}/ethercat-${CI_COMMIT_TAG}.tar.gz\",\"link_type\":\"package\",\"filepath\":\"/dist-tarballs/ethercat.tar.gz\"}" + # from 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml', but on all branches workflow: rules: