2020-09-11 05:57:09 +00:00
|
|
|
name: Linux 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/Windows/**"
|
2020-09-11 05:57:09 +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/Windows/**"
|
2020-09-11 05:57:09 +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:
|
2020-11-24 00:44:30 +00:00
|
|
|
include:
|
|
|
|
- os: ubuntu-20.04
|
|
|
|
platform: x86
|
|
|
|
compiler: gcc
|
|
|
|
experimental: false
|
|
|
|
- os: ubuntu-20.04
|
|
|
|
platform: x64
|
|
|
|
compiler: gcc
|
|
|
|
experimental: false
|
|
|
|
- os: ubuntu-20.04
|
|
|
|
platform: x86
|
|
|
|
compiler: clang
|
2020-11-24 10:48:49 +00:00
|
|
|
# Need to disable PCH until cmake 3.17
|
|
|
|
# (PCH conflicts with ccache, fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400)
|
|
|
|
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
|
|
|
|
detail: -nopch
|
2020-11-24 00:44:30 +00:00
|
|
|
experimental: false
|
|
|
|
- os: ubuntu-20.04
|
|
|
|
platform: x86
|
|
|
|
compiler: gcc
|
|
|
|
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
|
|
|
|
detail: -nopch
|
2020-11-24 10:48:49 +00:00
|
|
|
experimental: false
|
2020-09-11 05:57:09 +00:00
|
|
|
|
2020-11-24 00:44:30 +00:00
|
|
|
name: ${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.compiler }}${{ matrix.detail }}
|
2020-09-11 05:57:09 +00:00
|
|
|
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"
|
|
|
|
# echo ${{ github.event.pull_request.title }}
|
|
|
|
|
2020-09-18 18:26:32 +00:00
|
|
|
- name: Checkout Repository
|
2020-09-11 05:57:09 +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:57:09 +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
|
|
|
|
|
|
|
|
- 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:57:09 +00:00
|
|
|
|
|
|
|
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
|
|
|
|
- name: Prepare ccache timestamp
|
|
|
|
id: ccache_cache_timestamp
|
|
|
|
shell: cmake -P {0}
|
|
|
|
run: |
|
|
|
|
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
|
|
|
message("::set-output name=timestamp::${current_date}")
|
|
|
|
|
2020-09-28 00:18:19 +00:00
|
|
|
- name: ccache cache files
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: .ccache
|
2020-11-24 00:44:30 +00:00
|
|
|
key: ${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.compiler }}${{ matrix.detail }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
2020-09-28 00:18:19 +00:00
|
|
|
restore-keys: |
|
2020-11-24 00:44:30 +00:00
|
|
|
${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.compiler }}${{ matrix.detail }}-ccache-
|
2020-09-11 05:57:09 +00:00
|
|
|
|
2020-09-12 00:12:55 +00:00
|
|
|
- name: Install Packages
|
2020-09-11 05:57:09 +00:00
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
2020-10-17 00:09:15 +00:00
|
|
|
COMPILER: ${{ matrix.compiler }}
|
|
|
|
run: ./.github/workflows/scripts/linux/install-packages.sh
|
2020-09-11 05:57:09 +00:00
|
|
|
|
2020-10-17 00:09:15 +00:00
|
|
|
- name: Generate CMake
|
2020-09-12 00:12:55 +00:00
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
2020-10-17 00:09:15 +00:00
|
|
|
COMPILER: ${{ matrix.compiler }}
|
2020-11-24 00:44:30 +00:00
|
|
|
ADDITIONAL_CMAKE_ARGS: ${{ matrix.cmakeflags }}
|
2020-10-17 00:09:15 +00:00
|
|
|
run: ./.github/workflows/scripts/linux/generate-cmake.sh
|
|
|
|
|
|
|
|
- name: Build PCSX2
|
|
|
|
working-directory: ./build
|
|
|
|
run: ../.github/workflows/scripts/linux/compile.sh
|