Issue #142: Generic needs a proxy #144
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
# much of this inspired from: https://cristianadam.eu/20191222/using-github-actions-with-c-plus-plus-and-cmake/ | |
# and also the excellent series from: | |
# https://www.edwardthomson.com/blog/github_actions_advent_calendar.html | |
name: CI action for wxUI tests | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
formatting-check: | |
name: Formatting Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run clang-format style check for C/C++/Protobuf programs. | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '13' | |
check-path: 'src' | |
fallback-style: 'Mozilla' # optional | |
copyright-check: | |
needs: formatting-check | |
name: Copyright Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: check | |
run: ${{github.workspace}}/checklists/check_copyright | |
- name: check | |
run: ${{github.workspace}}/checklists/check_md | |
build: | |
needs: copyright-check | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "macOS Latest Clang", | |
os: macos-latest, | |
} | |
# disable these configurations until we've worked out the details. issue #11 | |
#- { | |
# name: "Ubuntu Latest GCC", | |
# os: ubuntu-latest, | |
# } | |
# disable these configurations until we've worked out the details. issue #10 | |
#- { | |
# name: "Windows Latest MSVC", | |
# os: windows-latest, | |
# } | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Checkout unshallow | |
run: git fetch --unshallow | |
- name: Installing Dependencies (MacOS) | |
if: matrix.config.os == 'macos-latest' | |
run: brew install wxWidgets | |
- name: Installing Dependencies (Linux) | |
if: matrix.config.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install build-essential libgtk-3-dev freeglut3-dev; gcc -v | |
- name: Installing Dependencies (Windows) | |
if: matrix.config.os == 'windows-latest' | |
run: choco install wxwidgets | |
- name: Updating to gcc 11 (Linux) | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt install gcc-11 g++-11 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 | |
sudo update-alternatives --set gcc /usr/bin/gcc-11 | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWXUI_WITH_TESTS=1 -DWXUI_WITH_EXAMPLE=1 | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Run tests | |
run: ctest --test-dir ${{github.workspace}}/build -C ${{env.BUILD_TYPE}} | |
release: | |
if: contains(github.ref, 'tags/v') | |
name: Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
# using https://github.com/ncipollo/release-action | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
bodyFile: ./LATEST_RELEASE_NOTES.md | |
draft: true | |
token: ${{ secrets.GITHUB_TOKEN }} |