113 lines
3.1 KiB
YAML
113 lines
3.1 KiB
YAML
name: CMake
|
|
|
|
on:
|
|
|
|
push:
|
|
paths:
|
|
- src/**
|
|
- "**/CMakeLists.txt"
|
|
- .github/workflows/**
|
|
- vcpkg.json
|
|
|
|
pull_request:
|
|
paths:
|
|
- src/**
|
|
- "**/CMakeLists.txt"
|
|
- .github/workflows/**
|
|
- vcpkg.json
|
|
|
|
env:
|
|
BUILD_TYPE: RelWithDebInfo
|
|
|
|
jobs:
|
|
mingw:
|
|
name: ${{ matrix.target-arch.msystem }} build (DEV_BUILD=${{ matrix.dev-build }}, NEW_DYNAREC=${{ matrix.new-dynarec }})
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
|
|
strategy:
|
|
matrix:
|
|
dev-build: ['ON', 'OFF']
|
|
new-dynarec: ['ON', 'OFF']
|
|
target-arch:
|
|
- msystem: MINGW32
|
|
prefix: mingw-w64-i686
|
|
- msystem: MINGW64
|
|
prefix: mingw-w64-x86_64
|
|
|
|
steps:
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
path-type: inherit
|
|
update: true
|
|
msystem: ${{ matrix.target-arch.msystem }}
|
|
install: >-
|
|
${{ matrix.target-arch.prefix }}-toolchain
|
|
${{ matrix.target-arch.prefix }}-openal
|
|
${{ matrix.target-arch.prefix }}-freetype
|
|
${{ matrix.target-arch.prefix }}-SDL2
|
|
${{ matrix.target-arch.prefix }}-zlib
|
|
${{ matrix.target-arch.prefix }}-libpng
|
|
${{ matrix.target-arch.prefix }}-libvncserver
|
|
- uses: actions/checkout@v2
|
|
- name: Configure CMake
|
|
run: >-
|
|
cmake -S . -B build
|
|
-G "MSYS Makefiles"
|
|
-D CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
|
|
-D DEV_BRANCH=${{ matrix.dev-build }}
|
|
-D NEW_DYNAREC=${{ matrix.new-dynarec }}
|
|
-D VNC=OFF
|
|
- name: Build
|
|
run: cmake --build build
|
|
|
|
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', 'v142']
|
|
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=${{ github.workspace }}/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-VS2019-${{ matrix.build.name }}-${{ matrix.target-arch }}-${{ matrix.toolset }}-${{ github.sha }}'
|
|
path: build/artifacts/bin/**
|