mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Use both gcc and clang in CI (#2667)
* Remove remaining TRAVIS_ variable * Use both gcc and clang.
This commit is contained in:
parent
666d0ab552
commit
7f6d4ac359
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -11,15 +11,28 @@ on:
|
||||
|
||||
jobs:
|
||||
vlt:
|
||||
runs-on: ubuntu-20.04
|
||||
name: build and test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04]
|
||||
compiler: [clang, gcc]
|
||||
include:
|
||||
- compiler: clang
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
- compiler: gcc
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.os }}-${{ matrix.compiler }}-build-test
|
||||
env:
|
||||
CI_OS_NAME: linux
|
||||
CI_COMMIT: ${{ github.sha }}
|
||||
CCACHE_COMPRESS: 1
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
CCACHE_MAXSIZE: 4Gi
|
||||
CC: ccache gcc
|
||||
CXX: ccache g++
|
||||
CCACHE_MAXSIZE: 2Gi # 2GiB for clang and gcc, 4GiB in total
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@ -29,12 +42,9 @@ jobs:
|
||||
cache-name: ccache
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}-${{ github.sha }}
|
||||
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
|
||||
${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}
|
||||
- name: Install packages for build
|
||||
env:
|
||||
CI_BUILD_STAGE_NAME: build
|
||||
|
@ -19,7 +19,7 @@ set -x
|
||||
ccache --version
|
||||
|
||||
# Flush ccache if requested in commit message
|
||||
COMMIT="${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}"
|
||||
COMMIT="${CI_PULL_REQUEST_SHA:-$CI_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
|
||||
|
Loading…
Reference in New Issue
Block a user