mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #14028 from janisozaur/ccache
Add ccache action to GitHub Actions
This commit is contained in:
commit
41d09a2691
|
@ -85,6 +85,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: windows-mingw
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: |
|
run: |
|
||||||
sudo su
|
sudo su
|
||||||
|
@ -100,6 +104,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: windows-mingw-nt51
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
run: |
|
run: |
|
||||||
sudo su
|
sudo su
|
||||||
|
@ -149,6 +157,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: linux-portable
|
||||||
- name: Get pre-reqs
|
- name: Get pre-reqs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv && get-discord-rpc
|
run: . scripts/setenv && get-discord-rpc
|
||||||
|
@ -184,6 +196,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: linux-portable-32
|
||||||
- name: Get pre-reqs
|
- name: Get pre-reqs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv && get-discord-rpc
|
run: . scripts/setenv && get-discord-rpc
|
||||||
|
@ -224,12 +240,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: linux-appimage
|
||||||
- name: Get pre-reqs
|
- name: Get pre-reqs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv -q && get-discord-rpc
|
run: . scripts/setenv -q && get-discord-rpc
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON -DOPENRCT2_USE_CCACHE=off
|
run: . scripts/setenv -q && build -DCMAKE_BUILD_TYPE=Release -DAPPIMAGE=ON -DOPENRCT2_USE_CCACHE=on
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv -q && build-appimage
|
run: . scripts/setenv -q && build-appimage
|
||||||
|
@ -282,6 +302,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: linux-clang
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
shell: bash
|
shell: bash
|
||||||
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON -DDISABLE_HTTP=ON -DDISABLE_OPENGL=ON
|
run: . scripts/setenv && build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON -DDISABLE_HTTP=ON -DDISABLE_OPENGL=ON
|
||||||
|
@ -294,6 +318,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: android
|
||||||
- name: Build OpenRCT2
|
- name: Build OpenRCT2
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -146,6 +146,19 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1z ${COMMON_COMPILE_OPTIONS} -Wnon-virtual-dtor")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1z ${COMMON_COMPILE_OPTIONS} -Wnon-virtual-dtor")
|
||||||
get_filename_component(ORCT2_ROOT "${CMAKE_SOURCE_DIR}/../../../../../" REALPATH)
|
get_filename_component(ORCT2_ROOT "${CMAKE_SOURCE_DIR}/../../../../../" REALPATH)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${ORCT2_ROOT}/cmake")
|
||||||
|
|
||||||
|
find_package(CCache)
|
||||||
|
|
||||||
|
if (CCache_FOUND)
|
||||||
|
option(OPENRCT2_USE_CCACHE "Use CCache to improve recompilation speed (optional)" ON)
|
||||||
|
if (OPENRCT2_USE_CCACHE)
|
||||||
|
# Use e.g. "ccache clang++" instead of "clang++"
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCache_EXECUTABLE}")
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCache_EXECUTABLE}")
|
||||||
|
endif (OPENRCT2_USE_CCACHE)
|
||||||
|
endif (CCache_FOUND)
|
||||||
|
|
||||||
file(GLOB_RECURSE LIBOPENRCT2_SOURCES
|
file(GLOB_RECURSE LIBOPENRCT2_SOURCES
|
||||||
"${ORCT2_ROOT}/src/openrct2/*.cpp"
|
"${ORCT2_ROOT}/src/openrct2/*.cpp"
|
||||||
"${ORCT2_ROOT}/src/openrct2/*.h"
|
"${ORCT2_ROOT}/src/openrct2/*.h"
|
||||||
|
|
Loading…
Reference in New Issue