jak-project/.github/workflows/windows-workflow.yaml
ManDude 9430b4772a
Implement runtime display (test) (#318)
* Implement runtime display (test)

* Update runtime.cpp

* [game display] add "-nodisplay" argument

* style fixes

* Update gfx.cpp

* [deci2server] fix deadlock when killing a Deci2Server

* add libxrandr to linux github test

* correct package name to libxrandr-dev

* set g_main_thread_id in exec_runtime

* add libxinerama to linux test packages

* correct the name

* add libxcursor1 package

* Update linux-workflow.yaml

* add libxi-dev

* fix constructor for g_main_thread_id

* fix submodules + use -nodisplay during tests

* move the gfx loop to its own function and use a lambda for exit conditions

* fix include

* fix include

* fix includes (for real this time)
2021-03-09 23:51:28 -05:00

95 lines
3.2 KiB
YAML

name: Windows
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
# Prevent one build from failing everything (although maybe those should be included as experimental builds instead)
fail-fast: false
matrix:
os: [windows-2019]
config: [Release]
experimental: [false]
name: ${{ matrix.config }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 20
steps:
# NOTE - useful for debugging
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: |
# echo "$GITHUB_CONTEXT"
- name: Checkout Repository
uses: actions/checkout@v2
- name: Cache Submodules
id: cache-submodules
uses: actions/cache@v2
with:
key: submodules-${{ hashFiles('./.gitmodules') }}
path: |
./third-party/googletest
./third-party/zydis
./third-party/glfw
./.git/modules/
- name: Checkout Submodules
if: steps.cache-submodules.outputs.cache-hit != 'true'
run: git submodule update --init --recursive --jobs 2
- name: Prepare Artifact Git Info
shell: bash
run: |
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
ARTIFACT_NAME="commit-$(git rev-parse --short "$GITHUB_SHA")"
if [ ${{ github.event_name == 'pull_request' }} ]; then
echo "##[set-output name=short-sha;]$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")"
if [ ! -z "${{ github.event.pull_request.number }}" ]; then
ARTIFACT_NAME="pr-${{ github.event.pull_request.number }}-commit-$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")"
fi
else
echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")"
fi
echo "##[set-output name=artifact-metadata;]${ARTIFACT_NAME}"
id: git-vars
# https://github.com/ilammy/setup-nasm
- uses: ilammy/setup-nasm@v1
- name: CMake Generation
shell: cmd # ideally id like everything to be powershell but running this bat file is finicky
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
cmake --version
cmake -B build -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" .
- name: Build Project
working-directory: ./build
shell: cmd
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set CL=/MP
nmake
- name: Run Tests
timeout-minutes: 5
run: |
$env:NEXT_DIR = $pwd
$env:FAKE_ISO_PATH = "/game/fake_iso.txt"
./build/bin/goalc-test.exe --gtest_color=yes