added github yaml compile check with g++-11 and clang-12 also #13
This file contains hidden or 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: Check Compile Flexis | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| check-flexis: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| compiler: | |
| - gcc-11 | |
| - clang-12 | |
| - gcc-latest | |
| - clang-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt update && sudo apt install -y cmake ninja-build g++-11 clang-12 g++ clang | |
| - name: Select Compiler | |
| run: | | |
| case "${{ matrix.compiler }}" in | |
| gcc-11) | |
| echo "CC=gcc-11" >> $GITHUB_ENV | |
| echo "CXX=g++-11" >> $GITHUB_ENV | |
| ;; | |
| clang-12) | |
| echo "CC=clang-12" >> $GITHUB_ENV | |
| echo "CXX=clang++-12" >> $GITHUB_ENV | |
| ;; | |
| gcc-latest) | |
| echo "CC=gcc" >> $GITHUB_ENV | |
| echo "CXX=g++" >> $GITHUB_ENV | |
| ;; | |
| clang-latest) | |
| echo "CC=clang" >> $GITHUB_ENV | |
| echo "CXX=clang++" >> $GITHUB_ENV | |
| ;; | |
| esac | |
| - name: Set up VCPKG | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git | |
| ./vcpkg/bootstrap-vcpkg.sh | |
| env: | |
| VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
| - name: Configure with CMake (Debug Preset) | |
| run: cmake --preset debug | |
| env: | |
| VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
| - name: Build Flexis (Debug Preset) | |
| run: cmake --build --preset debug | |
| - name: Run Flexis --help to verify binary | |
| run: ./build/debug/bin/flexis --help | |