test-verilated-peripherals #365
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-verilated-peripherals | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
inputs: | |
renode_gitrev: | |
description: 'Renode git revision' | |
required: false | |
default: '' | |
env: | |
RENODE_GITREV: "${{ github.event.inputs.renode_gitrev }}" | |
VERILATOR_VERSION: "4.200" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { arch: "x86_64", os: "ubuntu-20.04" } | |
- { arch: "x86_64", os: "macos-latest" } | |
- { arch: "x86_64", os: "windows-latest" } | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ccache | |
key: ${{ runner.os }}-${{ matrix.config.arch }} | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
if: ${{ runner.os == 'Windows' }} | |
with: | |
update: true | |
install: >- | |
git | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-make | |
patch | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.5' # newer version breaks pip on Windows | |
- name: Download and build Renode | |
run: | | |
set -ex | |
RUNNER_OS=${{ runner.os }} | |
source .github/scripts/build-renode.sh | |
mkdir -p artifacts | |
tar -czf artifacts/renode.tar.gz renode/ | |
- name: Build peripherals for Windows | |
if: ${{ runner.os == 'Windows' }} | |
shell: msys2 {0} | |
run: | | |
set -ex | |
RUNNER_OS="Windows" | |
MAKE_BIN="mingw32-make.exe" | |
BUILD_ARCH=${{ matrix.config.arch }} | |
git submodule update --init --recursive | |
source .github/scripts/build-verilator.sh | |
source .github/scripts/build.sh | |
- name: Build peripherals for ${{ runner.os }} | |
if: ${{ runner.os != 'Windows' }} | |
run: | | |
set -ex | |
RUNNER_OS=${{ runner.os }} | |
MAKE_BIN="make" | |
BUILD_ARCH=${{ matrix.config.arch }} | |
git submodule update --init --recursive | |
source .github/scripts/build-verilator.sh | |
source .github/scripts/build.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }} | |
path: artifacts/* | |
test: | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { arch: "x86_64", os: "ubuntu-20.04" } | |
- { arch: "x86_64", os: "macos-latest" } | |
- { arch: "x86_64", os: "windows-latest" } | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }} | |
path: artifacts | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.5' # newer version breaks pip on Windows | |
- name: Test peripherals for ${{ runner.os }} | |
run: | | |
set -ex | |
tar -xf artifacts/renode.tar.gz | |
source .github/scripts/test.sh | |
- uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: renode-verilator-integration-${{ runner.os }}-${{ matrix.config.arch }}-${{ github.run_id }} | |
path: renode/output/tests/* |