mirror of
https://github.com/verilator/verilator.git
synced 2025-01-19 12:54:02 +00:00
73a7595335
* Add the initial version of CI using GitHub Actions * Update .github/workflows/check_pr.yml Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org> * remove setting for travis * rename travis-*.bash to ci-*.bash * Rename TRAVIS_ variables to CI_ * install ccache and libsystemc(-dev) in ci-install.bash * Use CI_ variables and Ubuntu-20.04 that provides SystemC * call ccache maintenance Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
30 lines
925 B
Bash
Executable File
30 lines
925 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# DESCRIPTION: Verilator: CI ccache maintenance
|
|
#
|
|
# Copyright 2020 by Geza Lore. This program is free software; you
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
# Version 2.0.
|
|
#
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
################################################################################
|
|
# This script is run in 'before_script', once ccache has been set up.
|
|
################################################################################
|
|
|
|
set -e
|
|
set -x
|
|
|
|
# Show version
|
|
ccache --version
|
|
|
|
# Flush ccache if requested in commit message
|
|
COMMIT="${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}"
|
|
if git log --format=%B -n 1 "$COMMIT" | grep -q -i '\[CI\s\+ccache\s\+clear\]'; then
|
|
echo "Flushing ccache due to commit message"
|
|
ccache -C
|
|
fi
|
|
|
|
# Dump stats, then zero stats
|
|
ccache -s -z
|