2020-09-11 05:56:45 +00:00
|
|
|
name: Windows Build
|
|
|
|
|
|
|
|
# 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
|
2020-09-18 01:19:04 +00:00
|
|
|
paths-ignore:
|
|
|
|
- .gitignore
|
|
|
|
- "**/*.md"
|
|
|
|
- .clang-format
|
|
|
|
- debian-packager/
|
|
|
|
- bin/PCSX2_keys.ini.default
|
2020-12-17 23:48:33 +00:00
|
|
|
- "pcsx2/PAD/Linux/**"
|
2020-09-11 05:56:45 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-09-18 01:19:04 +00:00
|
|
|
paths-ignore:
|
|
|
|
- .gitignore
|
|
|
|
- "**/*.md"
|
|
|
|
- .clang-format
|
|
|
|
- debian-packager/
|
|
|
|
- bin/PCSX2_keys.ini.default
|
2020-12-17 23:48:33 +00:00
|
|
|
- "pcsx2/PAD/Linux/**"
|
2020-09-11 05:56:45 +00:00
|
|
|
|
|
|
|
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]
|
|
|
|
platform: [Win32, x64]
|
|
|
|
experimental: [false]
|
|
|
|
|
|
|
|
name: ${{ matrix.os }}-${{ matrix.platform }}
|
|
|
|
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: 30
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# NOTE - useful for debugging
|
|
|
|
# - name: Dump GitHub context
|
|
|
|
# env:
|
|
|
|
# GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
# run: |
|
|
|
|
# echo "$GITHUB_CONTEXT"
|
|
|
|
|
2020-09-18 18:26:32 +00:00
|
|
|
- name: Checkout Repository
|
2020-09-11 05:56:45 +00:00
|
|
|
uses: actions/checkout@v2
|
2020-09-18 18:26:32 +00:00
|
|
|
|
|
|
|
- name: Cache Submodules
|
|
|
|
id: cache-submodules
|
|
|
|
uses: actions/cache@v2
|
2020-09-11 05:56:45 +00:00
|
|
|
with:
|
2020-09-18 18:26:32 +00:00
|
|
|
key: submodules-${{ hashFiles('./.gitmodules') }}
|
|
|
|
path: |
|
2020-10-17 01:19:42 +00:00
|
|
|
./.git/modules/
|
|
|
|
./3rdparty/fmt
|
2020-09-18 18:26:32 +00:00
|
|
|
./3rdparty/xz
|
2020-11-27 18:57:32 +00:00
|
|
|
./3rdparty/yaml-cpp
|
2020-09-18 18:26:32 +00:00
|
|
|
./3rdparty/gtest
|
2020-09-18 19:26:09 +00:00
|
|
|
|
2020-09-18 18:26:32 +00:00
|
|
|
- name: Checkout Submodules
|
|
|
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
2020-09-20 01:24:25 +00:00
|
|
|
run: git submodule update --init --recursive --jobs 2
|
2020-09-11 05:56:45 +00:00
|
|
|
|
|
|
|
- name: Prepare Artifact Git Info
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
|
2020-09-18 18:26:32 +00:00
|
|
|
ARTIFACT_NAME="commit-$(git rev-parse --short "$GITHUB_SHA")"
|
2020-09-12 00:12:55 +00:00
|
|
|
if [ ${{ github.event_name == 'pull_request' }} ]; then
|
2020-09-18 18:26:32 +00:00
|
|
|
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
|
2020-09-11 05:56:45 +00:00
|
|
|
else
|
2020-09-18 18:26:32 +00:00
|
|
|
echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")"
|
2020-09-11 05:56:45 +00:00
|
|
|
fi
|
2020-09-18 18:26:32 +00:00
|
|
|
echo "##[set-output name=artifact-metadata;]${ARTIFACT_NAME}"
|
2020-09-11 05:56:45 +00:00
|
|
|
id: git-vars
|
|
|
|
|
2020-09-20 17:10:14 +00:00
|
|
|
- name: Verify VS Project Files
|
|
|
|
shell: powershell
|
2020-10-17 00:09:15 +00:00
|
|
|
run: .\.github\workflows\scripts\windows\validate-vs-filters.ps1
|
2020-09-20 17:10:14 +00:00
|
|
|
|
2020-09-11 05:56:45 +00:00
|
|
|
- name: Setup msbuild
|
2020-10-17 00:09:15 +00:00
|
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
2020-09-11 05:56:45 +00:00
|
|
|
with:
|
2020-09-18 18:26:32 +00:00
|
|
|
vs-version: 16.7
|
2020-09-11 05:56:45 +00:00
|
|
|
|
|
|
|
- name: Build PCSX2
|
2020-09-18 19:26:09 +00:00
|
|
|
run: msbuild "buildbot.xml" /m /v:n /t:ReleaseAll /p:Platform=${{ matrix.platform }}
|
2020-09-11 05:56:45 +00:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
2020-09-18 18:26:32 +00:00
|
|
|
name: PCSX2-${{ matrix.platform }}-${{ steps.git-vars.outputs.artifact-metadata }}
|
2020-09-11 05:56:45 +00:00
|
|
|
path: bin
|
2020-10-17 02:00:46 +00:00
|
|
|
retention-days: 30 # https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy
|