Skip to content

print newline after logging Exited with... #254

print newline after logging Exited with...

print newline after logging Exited with... #254

Workflow file for this run

# SPDX-FileCopyrightText: 2022 - 2023 Serdar Sayın <https://serdarsayin.com>
#
# SPDX-License-Identifier: MIT
name: build
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
types: [ opened, synchronize, reopened ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
build_type: [Debug, Release]
env:
RISCV32_TOOLCHAIN_GZIP: riscv32-embecosm-gcc-ubuntu2204-20230430
RISCV32_TOOLCHAIN_URL: https://buildbot.embecosm.com/job/riscv32-gcc-ubuntu2204/60/artifact/riscv32-embecosm-gcc-ubuntu2204-20230430.tar.gz
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup prerequisites
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update -y
sudo apt install -y gcc-12 g++-12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
sudo apt-get install -y libboost-dev ninja-build gcovr
- name: Set up msbuild
uses: microsoft/setup-msbuild@v1.1
if: ${{ runner.os == 'Windows' }}
- name: Build
if: ${{ runner.os == 'Windows' }}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -S . -B ${{matrix.build_type}}
cd ${{matrix.build_type}}
MSBuild.exe riscv32-sim.sln
- name: Cache RV32 GCC Toolchain
id: cache-riscv-toolchain
if: ${{ runner.os == 'Linux' }}
uses: actions/cache@v3
with:
path: ~/.riscv-gcc
key: ${{ runner.os }}-riscv-gcc
restore-keys: ${{ runner.os }}-riscv-gcc
- name: Download & Extract RISCV32 GCC Toolchain
if: ${{ (runner.os == 'Linux') && (steps.cache-riscv-toolchain.outputs.cache-hit != 'true') }}
shell: bash
run: |
mkdir -p $HOME/.riscv-gcc
wget -q ${{env.RISCV32_TOOLCHAIN_URL}}
tar xf ${{env.RISCV32_TOOLCHAIN_GZIP}}.tar.gz -C $HOME/.riscv-gcc/
- name: Set up ENV
if: ${{ runner.os == 'Linux' }}
run: echo "$HOME/.riscv-gcc/${{env.RISCV32_TOOLCHAIN_GZIP}}/bin" >> $GITHUB_PATH
- name: Cache riscv-tests
id: cache-riscv-tests
if: ${{ runner.os == 'Linux' }}
uses: actions/cache@v3
with:
path: ~/.riscv-gcc/${{env.RISCV32_TOOLCHAIN_GZIP}}/share
key: ${{ runner.os }}-riscv-tests
restore-keys: ${{ runner.os }}-riscv-tests
- name: Set-up riscv-tests
if: ${{ (runner.os == 'Linux') && (steps.cache-riscv-tests.outputs.cache-hit != 'true') }}
shell: bash
run: |
RISCV=$HOME/.riscv-gcc/${{env.RISCV32_TOOLCHAIN_GZIP}} bash ${{github.workspace}}/tools/build_riscv_tests.sh
- name: Build and Test with build.sh
shell: bash
if: ${{ runner.os == 'Linux' }}
run: |
bash ${{github.workspace}}/tools/build.sh ${{matrix.build_type}} ${{matrix.build_type}} \
$HOME/.riscv-gcc/${{env.RISCV32_TOOLCHAIN_GZIP}}/share/riscv-tests/isa
- name: Upload build logs
uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' }}
with:
name: build-logs-artifact
path: ${{matrix.build_type}}/log