CI Improvements, Minor documentation changes #38
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: RAD-Sim CI | |
env: | |
SYSTEMC_VERSION: "2.3.4" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
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" | |
design-tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
test-script: [mlp_test.sh, dlrm_test.sh, npu_test.sh] | |
test: [""] | |
exclude: | |
- test-script: npu_test.sh # Don't run all the NPU tests in the same runner | |
test: "" | |
include: | |
- test-script: npu_test.sh | |
test: std_gemv | |
- test-script: npu_test.sh | |
test: std_rnn | |
- test-script: npu_test.sh | |
test: std_gru | |
- test-script: npu_test.sh | |
test: std_lstm | |
- test-script: npu_test.sh | |
test: std_mlp | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache SystemC build files | |
id: cache-systemc | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/systemc-${{ env.SYSTEMC_VERSION }}/build | |
key: ubuntu-64-systemc-${{ env.SYSTEMC_VERSION }} | |
- name: Setup SystemC | |
run: ./.github/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: Run Test | |
env: | |
TEST_SCRIPT: ${{ matrix.test-script }} | |
TEST: ${{ matrix.test }} | |
run: ./.github/scripts/run_test.sh |