remove ccache from mac builds (#4505)
This commit is contained in:
parent
a9f2fc427b
commit
e845c95816
2 changed files with 21 additions and 27 deletions
|
@ -49,6 +49,10 @@ while [[ "$@" ]]; do
|
||||||
BUILDTYPE="Release"
|
BUILDTYPE="Release"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
'--ccache')
|
||||||
|
USE_CCACHE=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if [[ $1 == -* ]]; then
|
if [[ $1 == -* ]]; then
|
||||||
echo "::error file=$0::unrecognized option: $1"
|
echo "::error file=$0::unrecognized option: $1"
|
||||||
|
@ -93,16 +97,20 @@ if [[ $PACKAGE_TYPE ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
|
if [[ $USE_CCACHE ]]; then
|
||||||
# prepend ccache compiler binaries to path
|
# prepend ccache compiler binaries to path
|
||||||
PATH="/usr/local/opt/ccache/libexec:$PATH"
|
PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
fi
|
||||||
# Add qt install location when using homebrew
|
# Add qt install location when using homebrew
|
||||||
flags+=" -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/"
|
flags+=" -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compile
|
# Compile
|
||||||
|
if [[ $USE_CCACHE ]]; then
|
||||||
echo "::group::Show ccache stats"
|
echo "::group::Show ccache stats"
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::group::Configure cmake"
|
echo "::group::Configure cmake"
|
||||||
cmake --version
|
cmake --version
|
||||||
|
@ -113,9 +121,11 @@ echo "::group::Build project"
|
||||||
cmake --build .
|
cmake --build .
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
if [[ $USE_CCACHE ]]; then
|
||||||
echo "::group::Show ccache stats again"
|
echo "::group::Show ccache stats again"
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $MAKE_TEST ]]; then
|
if [[ $MAKE_TEST ]]; then
|
||||||
echo "::group::Run tests"
|
echo "::group::Run tests"
|
||||||
|
|
22
.github/workflows/desktop-build.yml
vendored
22
.github/workflows/desktop-build.yml
vendored
|
@ -152,7 +152,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --debug --test
|
RUN --server --debug --test --ccache
|
||||||
|
|
||||||
- name: Build release package
|
- name: Build release package
|
||||||
id: package
|
id: package
|
||||||
|
@ -196,7 +196,7 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- target: Debug # tests only
|
- target: Debug # tests only
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
xcode: 12.1
|
xcode: 12.5.1
|
||||||
type: Debug
|
type: Debug
|
||||||
do_tests: 0 # tests do not work yet on mac
|
do_tests: 0 # tests do not work yet on mac
|
||||||
make_package: false
|
make_package: false
|
||||||
|
@ -231,7 +231,6 @@ jobs:
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: ~/.ccache
|
|
||||||
DEVELOPER_DIR:
|
DEVELOPER_DIR:
|
||||||
/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
|
/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer
|
||||||
|
|
||||||
|
@ -243,7 +242,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
# cmake cannot find the mysql connector
|
# cmake cannot find the mysql connector
|
||||||
# neither of these works: mariadb-connector-c mysql-connector-c++
|
# neither of these works: mariadb-connector-c mysql-connector-c++
|
||||||
run: brew install ccache protobuf
|
run: brew update && brew install protobuf
|
||||||
|
|
||||||
- name: Install QT using homebrew
|
- name: Install QT using homebrew
|
||||||
id: brew_install_qt
|
id: brew_install_qt
|
||||||
|
@ -255,21 +254,6 @@ jobs:
|
||||||
if: steps.brew_install_qt.outcome != 'success'
|
if: steps.brew_install_qt.outcome != 'success'
|
||||||
uses: jurplel/install-qt-action@v2
|
uses: jurplel/install-qt-action@v2
|
||||||
|
|
||||||
- name: Get ccache timestamp
|
|
||||||
id: ccache_timestamp
|
|
||||||
shell: bash
|
|
||||||
run: echo "::set-output name=timestamp::$(date -u '+%Y%m%d%H%M%S')"
|
|
||||||
|
|
||||||
- name: Restore ccache cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
env:
|
|
||||||
timestamp: ${{steps.ccache_timestamp.outputs.timestamp}}
|
|
||||||
with:
|
|
||||||
path: ${{env.CCACHE_DIR}}
|
|
||||||
key: ${{runner.os}}-xcode-${{matrix.xcode}}-ccache-${{env.timestamp}}
|
|
||||||
restore-keys: |
|
|
||||||
${{runner.os}}-xcode-${{matrix.xcode}}-ccache-
|
|
||||||
|
|
||||||
- name: Build on Xcode ${{matrix.xcode}}
|
- name: Build on Xcode ${{matrix.xcode}}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in a new issue