Skip to content

readme.md + Test GA

readme.md + Test GA #9

name: CMake Build
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
build_type: [ Release ]
c_compiler: [ gcc, cl ]
cpp_compiler: [ g++, cl ]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
exclude:
- os: windows-latest
c_compiler: gcc
- os: ubuntu-latest
c_compiler: cl
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
- name: Create Build Directory
run: mkdir build
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
- name: Build with CMake
run: cmake --build build --config ${{ matrix.build_type }}
- name: Deploy (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install fuse libfuse2
wget -q https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage build/SnakeQT
shell: bash
- name: Deploy (Windows)
if: runner.os == 'Windows'
run: |
cd build
windeployqt.exe SnakeQT.exe
shell: bash
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: build/*