From 4fd8c8715766a7f9bf17e12fdd926978aebc349c Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 18:43:21 +0100 Subject: [PATCH] Remove condition around BuildRequires and use go-toolkit for RPM builds --- .github/workflows/Release.yml | 36 +++++++++++++++++++------------- scripts/cc-metric-collector.spec | 2 -- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 219ea0d..0029f37 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -41,10 +41,12 @@ jobs: submodules: recursive fetch-depth: 0 + # - name: Setup Golang + # uses: actions/setup-go@v5 + # with: + # go-version: 'stable' - name: Setup Golang - uses: actions/setup-go@v5 - with: - go-version: 'stable' + run: dnf --assumeyes --disableplugin=subscription-manager install go-toolkit - name: RPM build MetricCollector id: rpmbuild @@ -110,10 +112,12 @@ jobs: submodules: recursive fetch-depth: 0 + # - name: Setup Golang + # uses: actions/setup-go@v5 + # with: + # go-version: 'stable' - name: Setup Golang - uses: actions/setup-go@v5 - with: - go-version: 'stable' + run: dnf --assumeyes --disableplugin=subscription-manager install go-toolkit - name: RPM build MetricCollector id: rpmbuild @@ -176,10 +180,12 @@ jobs: submodules: recursive fetch-depth: 0 + # - name: Setup Golang + # uses: actions/setup-go@v5 + # with: + # go-version: 'stable' - name: Setup Golang - uses: actions/setup-go@v5 - with: - go-version: 'stable' + run: dnf --assumeyes --disableplugin=subscription-manager install go-toolkit - name: RPM build MetricCollector id: rpmbuild @@ -211,7 +217,7 @@ jobs: # Use dnf to install development packages - name: Install development packages - run: dnf --assumeyes --disableplugin=subscription-manager install rpm-build go-srpm-macros gcc make python39 git wget openssl-devel diffutils delve + run: dnf --assumeyes --disableplugin=subscription-manager install rpm-build go-srpm-macros gcc make python39 git wget openssl-devel diffutils delve go-toolkit # Checkout git repository and submodules # fetch-depth must be 0 to use git describe @@ -223,10 +229,12 @@ jobs: fetch-depth: 0 # See: https://github.com/marketplace/actions/setup-go-environment + # - name: Setup Golang + # uses: actions/setup-go@v5 + # with: + # go-version: 'stable' - name: Setup Golang - uses: actions/setup-go@v5 - with: - go-version: 'stable' + run: dnf --assumeyes --disableplugin=subscription-manager install go-toolkit - name: RPM build MetricCollector id: rpmbuild @@ -310,7 +318,7 @@ jobs: - name: Install development packages run: | apt update && apt --assume-yes upgrade - apt --assume-yes install build-essential sed git wget bash + apt --assume-yes install build-essential sed git wget bash go # Checkout git repository and submodules # fetch-depth must be 0 to use git describe # See: https://github.com/marketplace/actions/checkout diff --git a/scripts/cc-metric-collector.spec b/scripts/cc-metric-collector.spec index 008f190..6a5e219 100644 --- a/scripts/cc-metric-collector.spec +++ b/scripts/cc-metric-collector.spec @@ -6,9 +6,7 @@ Summary: Metric collection daemon from the ClusterCockpit suite License: MIT Source0: %{name}-%{version}.tar.gz -%if "%{getenv:CI}" != "1" BuildRequires: go-toolset -%endif BuildRequires: systemd-rpm-macros # for header downloads BuildRequires: wget