Skip to content

fixed bug in copy

fixed bug in copy #53

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- master
paths:
- 'gbrl/**' # Trigger on changes to files in the src directory
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
# sudo apt-get install -y lcov g++ gcc
sudo apt-get install -y g++ gcc
- name: Install LLVM via Homebrew
if: matrix.os == 'macos-latest'
run: brew install libomp llvm
- name: Configure Environment Variables
if: matrix.os == 'macos-latest'
run: |
echo "PATH=$(brew --prefix llvm)/bin:$PATH" >> $GITHUB_ENV
echo "LDFLAGS=-L$(brew --prefix libomp)/lib -L$(brew --prefix llvm)/lib -L$(brew --prefix llvm)/lib/c++ -Wl,-rpath,$(brew --prefix llvm)/lib/c++" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix libomp)/include -I$(brew --prefix llvm)/include" >> $GITHUB_ENV
echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=$(brew --prefix llvm)/lib:$(brew --prefix libomp)/lib" >> $GITHUB_ENV
- name: Set up MSVC environment
if: matrix.os == 'windows-latest'
run: |
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
- name: Set environment variable for coverage
if: matrix.os == 'ubuntu-latest'
run: echo "COVERAGE=1" >> $GITHUB_ENV
- name: Install Python dependencies and build the project with coverage
run: |
python -m pip install --upgrade pip
# python -m pip install coverage
pip install .
- name: Run tests
run: |
python -m unittest discover tests
# - name: Run tests with coverage
# if: matrix.os == 'ubuntu-latest'
# run: |
# coverage run --source=gbrl -m unittest discover tests
# - name: Run tests without coverage
# if: matrix.os == 'windows-latest'
# run: |
# python -m unittest discover tests
# - name: Generate coverage report
# if: matrix.os == 'ubuntu-latest'
# run: |
# coverage report
# coverage xml
# - name: Generate C++ coverage report
# if: matrix.os == 'ubuntu-latest'
# run: |
# lcov --capture --directory . --output-file coverage.info
# lcov --remove coverage.info '/usr/*' --output-file coverage.info
# lcov --list coverage.info
# - name: Upload coverage reports as artifacts
# if: matrix.os == 'ubuntu-latest'
# uses: actions/upload-artifact@v4
# with:
# name: coverage-reports
# path: |
# coverage.xml
# coverage.info