update #309
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: CMake | |
on: [push, pull_request, repository_dispatch, workflow_dispatch] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare (ubuntu) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev | |
if: matrix.os == 'ubuntu-latest' | |
- name: Configure | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
run: ctest -C ${{env.BUILD_TYPE}} --test-dir ${{github.workspace}}/build | |
- name: Install | |
run: | | |
mkdir install | |
cmake --install ${{github.workspace}}/build --strip | |
- name: Pack | |
run: | | |
cd ${{github.workspace}}/build | |
cpack -C ${{env.BUILD_TYPE}} | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{github.workspace}}/build/packages/ |