Build RPMs #4648
This file contains 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: [fedora39, fedora40, rockylinux8] | |
runs-on: ubuntu-latest | |
name: Build ${{ matrix.distro }} | |
steps: | |
- uses: actions/checkout@v3 | |
- 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@v3 | |
with: | |
name: OPAE-${{ matrix.distro }} | |
path: | |
${{ github.workspace }}/packaging/opae/rpm/*.rpm | |