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
|
|
|
|
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: [ubuntu-20.04]
|
|
|
|
platform: [x86, x64]
|
|
|
|
experimental: [false]
|
|
|
|
|
2020-09-12 00:12:55 +00:00
|
|
|
name: ${{ matrix.os }}-${{ matrix.platform }}
|
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 }}
|
|
|
|
|
|
|
|
- name: Checkout Repository & Submodules
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
# -- 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}")
|
|
|
|
|
|
|
|
- name: ccache cache files
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: .ccache
|
|
|
|
key: ${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.compiler-version }}-ccache-
|
|
|
|
|
2020-09-12 00:12:55 +00:00
|
|
|
- name: Install Packages
|
2020-09-11 05:57:09 +00:00
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
|
|
|
# TODO - give the file executable permissions and commit it
|
|
|
|
run: |
|
|
|
|
chmod +x .github/workflows/scripts/build-linux.sh
|
2020-09-12 00:12:55 +00:00
|
|
|
./.github/workflows/scripts/build-linux.sh install_packages
|
2020-09-11 05:57:09 +00:00
|
|
|
|
2020-09-12 00:12:55 +00:00
|
|
|
- name: Build PCSX2
|
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
|
|
|
# TODO - give the file executable permissions and commit it
|
|
|
|
run: |
|
|
|
|
chmod +x .github/workflows/scripts/build-linux.sh
|
|
|
|
./.github/workflows/scripts/build-linux.sh generate_cmake
|
|
|
|
./.github/workflows/scripts/build-linux.sh compile
|