Skip to content

Merge pull request #13 from andrewboutros/dev-gtrieu #28

Merge pull request #13 from andrewboutros/dev-gtrieu

Merge pull request #13 from andrewboutros/dev-gtrieu #28

Workflow file for this run

name: RAD-Sim CI
env:
SYSTEMC_VERSION: "2.3.4"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
actions: read
checks: write
jobs:
script-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Run Python Tests for RAD-Sim scripts
working-directory: rad-sim
run: |
pip install -r test/requirements.txt
python -m xmlrunner discover . --output-file test/test-report.xml
- name: Test Summary
uses: test-summary/action@v2
if: always()
with:
paths: "rad-sim/test/*report.xml"
show: "all"
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v3
- name: Set time
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Cache SystemC build files
id: cache-systemc
uses: actions/cache@v3
with:
path: /home/runner/work/rad-flow/rad-flow/systemc-${{ env.SYSTEMC_VERSION }}/build
key: ubuntu-64-systemc-${{ env.SYSTEMC_VERSION }}
- name: Setup SystemC
run: ./scripts/setup_system_c.sh -v ${{ env.SYSTEMC_VERSION }}
- name: Setup Mambaforge (Conda)
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: radflow
use-mamba: true
- name: Cache Conda ENV
id: cache-conda
uses: actions/cache@v3
with:
path: /usr/share/miniconda3/envs/radflow
key: ubuntu-64-conda-${{ hashFiles('rad-flow-env.yml') }}
- name: Update Conda ENV
if: steps.cache.outputs.cache-hit != 'true'
run: mamba env update -n radflow -f rad-flow-env.yml
- name: Build RAD-Sim
run: |
cd rad-sim
python config.py mlp
- name: Generate Test Cases
run: |
cd rad-sim/example-designs/mlp/compiler
python gen_testcase.py 4 512 512 512 256 128 4 3 2 2
- name: Run Tests
run: |
cd rad-sim/build
make run