mirror of
https://github.com/86Box/86Box.git
synced 2025-01-23 17:52:01 -05:00
130 lines
3.6 KiB
YAML
130 lines
3.6 KiB
YAML
name: CMake
|
|
|
|
on:
|
|
|
|
push:
|
|
paths:
|
|
- src/**
|
|
- "**/CMakeLists.txt"
|
|
- "CMakePresets.json"
|
|
- .github/workflows/cmake.yml
|
|
- vcpkg.json
|
|
- "!**/Makefile*"
|
|
|
|
pull_request:
|
|
paths:
|
|
- src/**
|
|
- "**/CMakeLists.txt"
|
|
- "CMakePresets.json"
|
|
- .github/workflows/**
|
|
- .github/workflows/cmake.yml
|
|
- vcpkg.json
|
|
- "!**/Makefile*"
|
|
|
|
jobs:
|
|
mingw:
|
|
name: MSYS2 ${{ matrix.build.name }} build (${{ matrix.environment.msystem }})
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build:
|
|
- name: Regular
|
|
preset: regular
|
|
target: install/strip
|
|
- name: Debug
|
|
preset: debug
|
|
target: install
|
|
- name: Dev
|
|
preset: experimental
|
|
target: install
|
|
environment:
|
|
- msystem: MINGW32
|
|
prefix: mingw-w64-i686
|
|
- msystem: MINGW64
|
|
prefix: mingw-w64-x86_64
|
|
- msystem: UCRT64
|
|
prefix: mingw-w64-ucrt-x86_64
|
|
- msystem: CLANG64
|
|
prefix: mingw-w64-clang-x86_64
|
|
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
path-type: inherit
|
|
update: true
|
|
msystem: ${{ matrix.environment.msystem }}
|
|
install: >-
|
|
${{ matrix.environment.prefix }}-ninja
|
|
${{ matrix.environment.prefix }}-toolchain
|
|
${{ matrix.environment.prefix }}-openal
|
|
${{ matrix.environment.prefix }}-freetype
|
|
${{ matrix.environment.prefix }}-SDL2
|
|
${{ matrix.environment.prefix }}-zlib
|
|
${{ matrix.environment.prefix }}-libpng
|
|
${{ matrix.environment.prefix }}-libvncserver
|
|
- uses: actions/checkout@v2
|
|
- name: Configure CMake
|
|
run: >-
|
|
cmake -S . -B build
|
|
--preset ${{ matrix.build.preset }}
|
|
-D CMAKE_INSTALL_PREFIX=./build/artifacts
|
|
-D VNC=OFF
|
|
- name: Build
|
|
run: cmake --build build --target ${{ matrix.build.target }}
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: '86Box-${{ matrix.build.name }}-MSYS2-${{ matrix.environment.msystem }}-${{ github.sha }}'
|
|
path: build/artifacts/bin/**
|
|
|
|
vs2019:
|
|
name: VS2019 ${{ matrix.build.name }} ${{ matrix.target-arch }} build (${{ matrix.toolset }})
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build:
|
|
- name: Debug
|
|
dev-build: off
|
|
new-dynarec: off
|
|
type: Debug
|
|
- name: Dev
|
|
dev-build: on
|
|
new-dynarec: on
|
|
type: Debug
|
|
target-arch: ['Win32', 'x64', 'ARM64']
|
|
toolset: ['clangcl']
|
|
exclude:
|
|
- target-arch: 'ARM64'
|
|
build:
|
|
new-dynarec: off
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: build/vcpkg_installed
|
|
key: vcpkg-${{ hashFiles('vcpkg.json') }}-${{ matrix.target-arch }}
|
|
- name: Configure CMake
|
|
run: >-
|
|
cmake -S . -B build
|
|
-G "Visual Studio 16 2019" -A ${{ matrix.target-arch }} -T ${{ matrix.toolset }}
|
|
-D CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
|
|
-D CMAKE_INSTALL_PREFIX=./build/artifacts
|
|
-D DEV_BRANCH=${{ matrix.build.dev-build }}
|
|
-D NEW_DYNAREC=${{ matrix.build.new-dynarec }}
|
|
-D VNC=OFF
|
|
- name: Build
|
|
run: cmake --build build --config ${{ matrix.build.type }} --target install
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: '86Box-${{ matrix.build.name }}-VS2019-${{ matrix.target-arch }}-${{ matrix.toolset }}-${{ github.sha }}'
|
|
path: build/artifacts/bin/**
|