Skip to content

Commit

Permalink
Use v3 actions for all Centos 7 runs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Mar 29, 2024
1 parent e71ab89 commit ff2adaa
Showing 1 changed file with 65 additions and 8 deletions.
73 changes: 65 additions & 8 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 @@ -253,14 +260,32 @@ 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.container }}'
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 }}'
Expand Down Expand Up @@ -307,7 +332,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,18 +394,41 @@ 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
path: ci/tests

- name: Unstash tests v4
if: matrix.image.container != 'centos:7'
uses: actions/download-artifact@v4
with:
name: tests
Expand Down

0 comments on commit ff2adaa

Please sign in to comment.