83 lines
2.5 KiB
YAML
83 lines
2.5 KiB
YAML
name: Windows
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 1
|
|
matrix:
|
|
compiler: [mingw-w64, msvc16]
|
|
bits: [32, 64]
|
|
include:
|
|
- compiler: mingw-w64
|
|
bits: 32
|
|
ARCH: "x86"
|
|
- compiler: mingw-w64
|
|
bits: 64
|
|
ARCH: "x64"
|
|
- compiler: msvc16
|
|
bits: 32
|
|
ARCH: "x86"
|
|
- compiler: msvc16
|
|
bits: 64
|
|
ARCH: "x64"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@master
|
|
|
|
- name: Setup Environment
|
|
run: |
|
|
dir
|
|
mkdir build
|
|
cd build
|
|
mkdir raylib_3.1_win${{ matrix.bits }}
|
|
cd raylib_3.1_win${{ matrix.bits }}
|
|
mkdir include
|
|
mkdir lib-${{ matrix.compiler }}
|
|
dir
|
|
cd ../../../raylib
|
|
dir
|
|
|
|
# Setup MSBuild.exe path if required
|
|
- name: Setup MSBuild
|
|
uses: microsoft/setup-msbuild@v1.0.1
|
|
if: matrix.compiler == 'msvc16'
|
|
|
|
- name: Build Library (MinGW-w64)
|
|
run: |
|
|
cd src
|
|
gcc -v
|
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_BUILD_ARCH=${{ matrix.ARCH }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/raylib_3.1_win${{ matrix.bits }}/lib-mingw-w64"
|
|
cd ..
|
|
if: matrix.compiler == 'mingw-w64'
|
|
|
|
- name: Build Library (MSVC16)
|
|
run: |
|
|
cd projects/VS2017
|
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
|
|
copy /Y .\bin\Win32\Release\raylib.lib .\..\..\build\raylib_3.1_win${{ matrix.bits }}\lib-msvc16\raylib.lib
|
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
|
|
copy /Y .\bin\Win32\Release.DLL\raylib.dll .\..\..\build\raylib_3.1_win${{ matrix.bits }}\lib-msvc16\raylib.dll
|
|
copy /Y .\bin\Win32\Release.DLL\raylib.lib .\..\..\build\raylib_3.1_win${{ matrix.bits }}\lib-msvc16\raylibdll.lib
|
|
cd ../..
|
|
shell: cmd
|
|
if: matrix.compiler == 'msvc16'
|
|
|
|
- name: Generate Artifacts
|
|
run: |
|
|
copy /Y .\src\raylib.h .\build\raylib_3.1_win${{ matrix.bits }}\include\raylib.h
|
|
cd build
|
|
7z a ./raylib_3.1_win${{ matrix.bits }}.zip ./raylib_3.1_win${{ matrix.bits }}
|
|
dir
|
|
shell: cmd
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: raylib_3.1_win${{ matrix.bits }}.zip
|
|
path: ./build/raylib_3.1_win${{ matrix.bits }}.zip
|