Skip to content

build

build #313

Workflow file for this run

# DESCRIPTION: Github actions config
#
# This file ONLY is placed under the Creative Commons Public Domain, for
# any use, without warranty, 2020 by Wilson Snyder.
# SPDX-License-Identifier: CC0-1.0
name: build
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
vlt:
runs-on: ubuntu-22.04
name: build and test
env:
CI_OS_NAME: linux
CI_RUNS_ON: ubuntu-22.04
CI_COMMIT: ${{ github.sha }}
CI_M32: 0
CCACHE_COMPRESS: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 4Gi
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Cache
uses: actions/cache@v4
env:
cache-name: ccache
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install packages for build
env:
CI_BUILD_STAGE_NAME: build
run: |
cd submodules/verilator && bash ci/ci-install.bash
sudo cpan -fi Bit::Vector # For t_cores_el2_cmark
- name: CCACHE maintenance
run: mkdir -p $CCACHE_DIR && cd submodules/verilator && bash ci/ci-ccache-maint.bash
- name: Build
env:
CI_BUILD_STAGE_NAME: build
run: cd submodules/verilator && bash ci/ci-script.bash
- name: Install packages for tests
env:
CI_BUILD_STAGE_NAME: test
run: |
cd submodules/verilator && bash ci/ci-install.bash
PIP_BREAK_SYSTEM_PACKAGES=1 sudo pip install --upgrade pip
PIP_BREAK_SYSTEM_PACKAGES=1 sudo pip install ../astsee
- name: Test
run: |
export VERILATOR_ROOT=$GITHUB_WORKSPACE/submodules/verilator
make test