Skip to content

Commit

Permalink
use matrix strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
fralken authored and gs-kamnas committed Mar 6, 2024
1 parent fd484c4 commit 0642ee2
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,42 +60,34 @@ jobs:
./configure
scan-build --force-analyze-debug-code make
package-rhel:
package:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: rhel
image: registry.access.redhat.com/ubi9/ubi:latest
- os: sles
image: registry.suse.com/suse/sle15:latest
container:
image: registry.access.redhat.com/ubi9/ubi:latest
image: ${{ matrix.image }}
steps:
- name: Install build dependencies
- name: Install build dependencies (RHEL)
run: dnf install -y make gcc systemd rpm-build git shadow-utils && dnf clean all
- name: Checkout repo
uses: actions/checkout@v4
- name: Set working directory as safe
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the source
run: |
./configure
make rpm
- name: Install the RPM
run: 'rpm -iv cntlm*.rpm'
- name: Invoke cNTLM to ensure it is installed properly
run: cntlm -h

package-sles:
runs-on: ubuntu-latest
container:
image: registry.suse.com/suse/sle15:latest
steps:
- name: Install build dependencies
if: ${{ matrix.os == 'rhel' }}
- name: Install build dependencies (SLES)
run: zypper install -y make gcc systemd rpm-build git shadow && zypper clean -a
if: ${{ matrix.os == 'sles' }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Set working directory as safe
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the source
run: |
./configure
make rpm
./configure
make rpm
- name: Install the RPM
run: 'rpm -iv cntlm*.rpm'
- name: Invoke cNTLM to ensure it is installed properly
run: cntlm -h
run: cntlm -h

0 comments on commit 0642ee2

Please sign in to comment.