Skip to content

Commit

Permalink
chore(ci): simplify the ccpp pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
tgragnato committed May 26, 2024
1 parent 2476ff5 commit d9ecd8a
Showing 1 changed file with 45 additions and 18 deletions.
63 changes: 45 additions & 18 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,57 @@ name: C/C++ CI

on:
push:
paths:
- src/**
- unittests/**
- '!**/*.txt'
- '!src/skins/*'
- '!src/webserver/default/**'
branches: [ "main" ]
pull_request:
paths:
- src/**
- unittests/**
- '!**/*.txt'
- '!src/skins/*'
- '!src/webserver/default/**'
branches: [ "main" ]

jobs:
build:
runs-on: ${{ matrix.os }}

runs-on: sid
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
c_compiler: [gcc, clang]
include:
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: cmake .
run: cmake .
- name: Install some dependencies
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y libcrypto++-dev
sudo apt-get install -y libwxgtk3.2-dev
fi
if [ ${{ matrix.os }} == "macos-latest" ]; then
brew install crypto++
brew install wxmac
fi
- name: make
run: make
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}

0 comments on commit d9ecd8a

Please sign in to comment.