Skip to content

fix token

fix token #973

Workflow file for this run

name: Catch2
on: [push]
jobs:
platform-compatibility:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, ubuntu-22.04]
fail-fast: false
steps:
- name: Display Compiler Version
run: g++ --version
- name: Install MPFR
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update -y
sudo apt-get install -y libmpfr-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew update
brew install mpfr
fi
- name: Checkout Repository
uses: actions/checkout@v3
- name: Execute Tests
run: make test
code-coverage:
runs-on: ubuntu-22.04
env:
working-directory: .test/unit
steps:
- name: Display Compiler Version
run: clang++ --version
- name: Install lcov
run: |
sudo apt-get update -y
sudo apt-get install -y lcov
- name: Install MPFR
run: sudo apt-get install -y libmpfr-dev
- name: Checkout Repository
uses: actions/checkout@v3
- name: Copy Library Directory
working-directory: ${{env.working-directory}}
run: cp -r ../../hypercomplex hypercomplex
- name: Compile Test Program
working-directory: ${{env.working-directory}}
run: g++ -O0 -fprofile-arcs -ftest-coverage -fno-elide-constructors -Wall --std=c++17 --coverage -o test test.cpp -lmpfr -lgmp
- name: Execute Test Program
working-directory: ${{env.working-directory}}
run: ./test [unit]
- name: Generate Coverage Report
working-directory: ${{env.working-directory}}
run: |
gcov test.cpp
lcov --capture --directory . --output-file coverage.info
rm -rf *.gcov test.gc*
- name: Submit Report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .test/unit/coverage.info
fail_ci_if_error: true
verbose: true
memcheck:
runs-on: ubuntu-22.04
env:
working-directory: .test/unit
steps:
- name: Display Compiler Version
run: g++ --version
- name: Install MPFR
run: |
sudo apt-get update -y
sudo apt-get install -y libmpfr-dev
- name: Install Valgrind
run: sudo apt install -y valgrind
- name: Checkout Repository
uses: actions/checkout@v3
- name: Copy Library Directory
working-directory: ${{env.working-directory}}
run: cp -r ../../hypercomplex hypercomplex
- name: Compile Test Program
working-directory: ${{env.working-directory}}
run: g++ -O0 -Wall --std=c++17 -o test test.cpp -lmpfr -lgmp
- name: Analyze Test Program Exec
working-directory: ${{env.working-directory}}
run: |
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind.txt ./test [unit]
cat valgrind.txt
grep -q -w "All heap blocks were freed -- no leaks are possible" "valgrind.txt"