From 15499ca22e3a0799ce1cf3903db8a294e578dd8d Mon Sep 17 00:00:00 2001 From: Cyprien Pelisse-Verdoux Date: Thu, 26 Sep 2024 14:46:20 +0200 Subject: [PATCH] code(ci/rpm): Install package for each os --- .github/workflows/main.yaml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 08695b6..8818816 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -24,6 +24,16 @@ jobs: with: fetch-tags: 'true' + - name: Setup for alumet + run: | + mkdir -p alumet + + - name: Checkout alumet + uses: actions/checkout@v4 + with: + repository: alumet-dev/alumet + path: "alumet" + - name: Parse alumet version id: params run: | @@ -31,6 +41,7 @@ jobs: comparch=$(awk '/BuildArch/ { print $2 }' ./specs/alumet.spec) cd alumet/app-agent/ + cargo generate-lockfile compvers=$(cargo pkgid | cut -d "#" -f2) echo "compvers=$compvers" >> $GITHUB_OUTPUT @@ -44,8 +55,9 @@ jobs: needs: - parsing strategy: + fail-fast: false matrix: - os: [fedora:38, fedora:39, fedora:40, fedora:41, fedora:42, ubi:8, ubi:9, leap:15, tumbleweed] + os: ["fedora:40", "fedora:41", "fedora:42", "ubi8:8.10", "ubi9:9.4"] env: name: ${{ needs.parsing.outputs.compname }} compvers: ${{ needs.parsing.outputs.compvers }} @@ -55,13 +67,25 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Install RPM + + - name: Install RPM on Fedora + if: contains(matrix.os, 'fedora') run: | sudo dnf install rust cargo -y -v export PATH=$PATH:$HOME/.cargo/bin/ sudo dnf install rpm-build rpmdevtools -y -v sudo dnf install cargo-rpm-macros -y -v + + - name: Install RPM on RHEL + if: contains(matrix.os, 'ubi') + run: | + sudo yum install rust cargo -y -v + export PATH=$PATH:$HOME/.cargo/bin/ + sudo yum install rpm-build rpmdevtools -y -v + sudo yum install cargo-rpm-macros -y -v + + - name: Install cargo lock2rpm and protoc + run: | cargo install cargo-lock2rpmprovides PROTOC_ZIP=protoc-28.0-linux-x86_64.zip curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v28.0/$PROTOC_ZIP