Skip to content

Commit

Permalink
Enhance CI workflow to support multiple operating systems and improve…
Browse files Browse the repository at this point in the history
… dependency installation
  • Loading branch information
emcrisostomo committed Dec 30, 2024
1 parent 8ce4d53 commit a8a3d0c
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,34 @@ on:

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, fedora-latest, debian-latest]
configuration: [ Release, Debug ]
compiler: [ gcc, clang ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install dependencies
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake autopoint gettext git libtool make texinfo
if [ "${{ matrix.compiler }}" == "gcc" ]; then sudo apt-get install -y g++; fi
if [ "${{ matrix.compiler }}" == "clang" ]; then sudo apt-get install -y clang; fi
- name: Install dependencies on Fedora
if: matrix.os == 'fedora-latest'
run: |
sudo dnf update -y
sudo dnf install -y autoconf automake gettext git libtool make texinfo
if [ "${{ matrix.compiler }}" == "gcc" ]; then sudo dnf install -y gcc gcc-c++; fi
if [ "${{ matrix.compiler }}" == "clang" ]; then sudo dnf install -y clang; fi
- name: Install dependencies on Debian
if: matrix.os == 'debian-latest'
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake autopoint gettext git libtool make texinfo
Expand Down

0 comments on commit a8a3d0c

Please sign in to comment.