Skip to content

Commit

Permalink
CI: fix accidentally broken centos-fedora workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Mar 30, 2024
1 parent 2b64d3b commit 8f317fa
Showing 1 changed file with 77 additions and 12 deletions.
89 changes: 77 additions & 12 deletions .github/workflows/centos-and-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,15 @@ jobs:
if: env.BUILD_MODE != 'coverage' && env.SHARED_LIBS == 'on'
run: cmake --install build

- name: Checkout shell test framework
if: env.BUILD_MODE != 'coverage' && env.SHARED_LIBS == 'on'
- name: Checkout shell test framework v3
if: env.BUILD_MODE != 'coverage' && env.SHARED_LIBS == 'on' && matrix.image.container == 'centos-7-amd64'
uses: actions/checkout@v3
with:
repository: kward/shunit2
path: ci/tests/shunit2

- name: Checkout shell test framework v4
if: env.BUILD_MODE != 'coverage' && env.SHARED_LIBS == 'on' && matrix.image.container != 'centos-7-amd64'
uses: actions/checkout@v4
with:
repository: kward/shunit2
Expand Down Expand Up @@ -235,7 +242,7 @@ jobs:
- name: Install rpm tools
run: yum -y install rpm-build

- name: Checkout v3
- name: Checkout v3
if: matrix.image.container == 'centos-7-amd64'
uses: actions/checkout@v3
with:
Expand All @@ -253,17 +260,35 @@ jobs:
- name: Package SRPM
run: cpack -B build/SRPM -G RPM --config build/CPackSourceConfig.cmake

- name: Upload SRPM
- name: Upload SRPM v3
if: matrix.image.container == 'centos-7-amd64'
uses: actions/upload-artifact@v3
with:
name: 'SRPM ${{ matrix.image.name }}'
path: 'build/SRPM/*.src.rpm'
retention-days: 5

- name: Upload SRPM v4
if: matrix.image.container != 'centos-7-amd64'
uses: actions/upload-artifact@v4
with:
name: 'SRPM ${{ matrix.image.name }}'
path: 'build/SRPM/*.src.rpm'
retention-days: 5

- name: Stash packaging tests
- name: Stash packaging tests v3
if: matrix.image.container == 'centos-7-amd64'
uses: actions/upload-artifact@v3
with:
name: 'tests-${{ matrix.image.name }}'
path: 'ci/tests/**'
retention-days: 1

- name: Stash packaging tests v4
if: matrix.image.container != 'centos-7-amd64'
uses: actions/upload-artifact@v4
with:
name: 'tests-${{ matrix.image.container }}'
name: 'tests-${{ matrix.image.name }}'
path: 'ci/tests/**'
retention-days: 1

Expand All @@ -287,7 +312,15 @@ jobs:
- name: Install rpm tools
run: yum -y install rpm-build

- name: Download SRPM
- name: Download SRPM v3
if: matrix.image.container == 'centos-7-amd64'
uses: actions/download-artifact@v3
with:
name: 'SRPM ${{ matrix.image.name }}'
path: ~/rpmbuild/SRPMS

- name: Download SRPM v4
if: matrix.image.container != 'centos-7-amd64'
uses: actions/download-artifact@v4
with:
name: 'SRPM ${{ matrix.image.name }}'
Expand All @@ -307,7 +340,16 @@ jobs:
- name: Package rpm
run: cpack -G RPM -B ~/rpmbuild/SOURCES/RPMS --config ~/rpmbuild/SOURCES/BUILD/CPackConfig.cmake

- name: Upload Artifact
- name: Upload Artifact v3
if: matrix.image.container == 'centos-7-amd64'
uses: actions/upload-artifact@v3
with:
name: 'RPM ${{ matrix.image.name}}'
path: '~/rpmbuild/SOURCES/RPMS/*.rpm'
retention-days: 5

- name: Upload Artifact v4
if: matrix.image.container != 'centos-7-amd64'
uses: actions/upload-artifact@v4
with:
name: 'RPM ${{ matrix.image.name}}'
Expand Down Expand Up @@ -360,21 +402,44 @@ jobs:
if: matrix.image.container == 'fedora:35'
run: sudo yum -y install findutils

- name: Download rnp rpms
- name: Download rnp rpms v3
if: matrix.image.container == 'centos:7'
uses: actions/download-artifact@v3
with:
name: 'RPM ${{ matrix.image.name}}'

- name: Download rnp rpms v4
if: matrix.image.container != 'centos:7'
uses: actions/download-artifact@v4
with:
name: 'RPM ${{ matrix.image.name}}'

- name: Checkout shell test framework
- name: Checkout shell test framework v3
if: matrix.image.container == 'centos:7'
uses: actions/checkout@v3
with:
repository: kward/shunit2
path: ci/tests/shunit2

- name: Checkout shell test framework v4
if: matrix.image.container != 'centos:7'
uses: actions/checkout@v4
with:
repository: kward/shunit2
path: ci/tests/shunit2

- name: Unstash tests
- name: Unstash tests v3
if: matrix.image.container == 'centos:7'
uses: actions/download-artifact@v3
with:
name: tests-${{ matrix.image.name }}
path: ci/tests

- name: Unstash tests v4
if: matrix.image.container != 'centos:7'
uses: actions/download-artifact@v4
with:
name: tests
name: tests-${{ matrix.image.name }}
path: ci/tests

- name: Run rpm tests
Expand Down

0 comments on commit 8f317fa

Please sign in to comment.