Skip to content

Broadcasting for Tensor matmul operation on 3D and 4D matrices. #95

Broadcasting for Tensor matmul operation on 3D and 4D matrices.

Broadcasting for Tensor matmul operation on 3D and 4D matrices. #95

Workflow file for this run

name: Run cTensor Tests
on:
push:
branches:
- test
pull_request:
branches:
- test
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
artifact_name: report-ubuntu.csv
platform_report_suffix: linux
- os: macos-latest
artifact_name: report-macos.csv
platform_report_suffix: macos
- os: windows-latest
artifact_name: report-windows.csv
platform_report_suffix: windows
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake and C Compiler
uses: lukka/get-cmake@latest
- name: Configure CMake
run: cmake -B build -S .
- name: Build tests
run: cmake --build build --target cten_tests
- name: Run cTensor tests
run: |
cd build
ctest -C Debug --output-on-failure
# Fallback if ctest doesn't run or if direct execution is preferred:
# if [ ! -f ./cten_test_report.csv ]; then
# if [ "${{ runner.os }}" == "Windows" ]; then
# ./bin/Debug/cten_tests.exe
# else
# ./bin/cten_tests
# fi
# fi
shell: bash
- name: Upload test report artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: build/cten_test_report_${{ matrix.platform_report_suffix }}.csv
if-no-files-found: error
analyze_results:
runs-on: ubuntu-latest
needs: build_and_test
if: always()
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Create reports directory
run: mkdir -p reports
- name: Download Ubuntu report
uses: actions/download-artifact@v4
with:
name: report-ubuntu.csv
path: reports/
continue-on-error: true
- name: Download macOS report
uses: actions/download-artifact@v4
with:
name: report-macos.csv
path: reports/
continue-on-error: true
- name: Download Windows report
uses: actions/download-artifact@v4
with:
name: report-windows.csv
path: reports/
continue-on-error: true
- name: List downloaded reports
run: ls -R reports/
- name: Run Python script to check results
run: python3 .github/check_all_results.py reports/*.csv