Bump actions/checkout from 3 to 4 #112
Workflow file for this run
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: CMake | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.PLATFORM.OS }} | |
env: | |
CC: ${{ matrix.PLATFORM.CC }} | |
CXX: ${{ matrix.PLATFORM.CXX }} | |
strategy: | |
matrix: | |
PLATFORM: | |
- { | |
OS: ubuntu-20.04, | |
CC: gcc-8, | |
CXX: g++-8, | |
INSTALL: true | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: gcc-9, | |
CXX: g++-9 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: gcc-10, | |
CXX: g++-10 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: gcc-11, | |
CXX: g++-11 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: gcc-12, | |
CXX: g++-12 | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-6.0, | |
CXX: clang++-6.0, | |
VERSION: '6.0' | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-7, | |
CXX: clang++-7, | |
VERSION: '7' | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-8, | |
CXX: clang++-8, | |
VERSION: '8' | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-9, | |
CXX: clang++-9, | |
VERSION: '9' | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-10, | |
CXX: clang++-10, | |
VERSION: '10' | |
} | |
- { | |
OS: ubuntu-20.04, | |
CC: clang-11, | |
CXX: clang++-11, | |
VERSION: '11' | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: clang-12, | |
CXX: clang++-12 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: clang-13, | |
CXX: clang++-13 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: clang-14, | |
CXX: clang++-14 | |
} | |
- { | |
OS: ubuntu-22.04, | |
CC: clang-15, | |
CXX: clang++-15, | |
VERSION: '15' | |
} | |
- { | |
OS: macos-11, | |
CC: clang, | |
CXX: clang++ | |
} | |
- { | |
OS: macos-12, | |
CC: clang, | |
CXX: clang++ | |
} | |
BUILD_CONFIG: [ Release, Debug ] | |
steps: | |
- uses: actions/checkout@v4 | |
# install dependencies | |
- name: Install GCC on ubuntu | |
if: | | |
startsWith(matrix.PLATFORM.OS, 'ubuntu-') && | |
startsWith(matrix.PLATFORM.CC, 'gcc-') && | |
matrix.PLATFORM.INSTALL | |
# run: | | |
# echo "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" | sudo tee /etc/apt/sources.list | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install ${{ matrix.PLATFORM.CC }} ${{ matrix.PLATFORM.CXX }} | |
- name: Install Clang on ubuntu | |
if: | | |
startsWith(matrix.PLATFORM.OS, 'ubuntu-') && | |
startsWith(matrix.PLATFORM.CC, 'clang-') && | |
matrix.PLATFORM.VERSION | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: ${{ matrix.PLATFORM.VERSION }} | |
# main test | |
- name: Configure Test | |
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }} | |
- name: Build Test | |
run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }} | |
# examples/advanced_event_handling | |
- name: Configure 'examples/advanced_event_handling' | |
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/advanced_event_handling | |
- name: Build 'examples/advanced_event_handling' | |
run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/advanced_event_handling | |
# examples/basic_audio_player | |
- name: Configure 'examples/basic_audio_player' | |
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/basic_audio_player | |
- name: Build 'examples/basic_audio_player' | |
run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/basic_audio_player | |
# examples/basic_traffic_light | |
- name: Configure 'examples/basic_traffic_light' | |
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/basic_traffic_light | |
- name: Build 'examples/basic_traffic_light' | |
run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/basic_traffic_light | |
# examples/calculator - disabled, uses <conio.h> and _getch() | |
# - name: Configure 'examples/calculator' | |
# run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
# working-directory: ${{ github.workspace }}/examples/calculator | |
# | |
# - name: Build 'examples/calculator' | |
# run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
# working-directory: ${{ github.workspace }}/examples/calculator | |
# examples/debug_logger_interface | |
- name: Configure 'examples/debug_logger_interface' | |
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/debug_logger_interface | |
- name: Build 'examples/debug_logger_interface' | |
run: cmake --build ./build --config ${{ matrix.BUILD_CONFIG }} | |
working-directory: ${{ github.workspace }}/examples/debug_logger_interface |