Build RPMs #5058
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build RPMs | |
| # https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'release/*' | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - master | |
| - 'release/*' | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| RPM: | |
| strategy: | |
| matrix: | |
| distro: [fedora40, fedora41, rockylinux8, rockylinux9] | |
| runs-on: ubuntu-22.04 | |
| name: Build ${{ matrix.distro }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker Image | |
| run: docker build . -f docker/${{ matrix.distro }}/Dockerfile -t opae-${{ matrix.distro }} | |
| - name: Build RPMs | |
| run: | | |
| docker run --rm -v ${{ github.workspace }}:/opae-${{ matrix.distro }}/opae-sdk opae-${{ matrix.distro }} /opae-${{ matrix.distro }}/opae-sdk | |
| - name: Install and Test RPMs | |
| if: ${{ github.event_name != 'pull_request'}} | |
| run: | | |
| docker run --rm -v ${{ github.workspace }}:/opae-${{ matrix.distro }}/opae-sdk --workdir /opae-${{ matrix.distro }}/opae-sdk --entrypoint /bin/bash opae-${{ matrix.distro }} -c "/scripts/test-rpms.sh" | |
| - name: Upload Artifact | |
| if: ${{ github.event_name != 'pull_request'}} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: OPAE-${{ matrix.distro }} | |
| path: | |
| ${{ github.workspace }}/packaging/opae/rpm/*.rpm | |