doc: Add gif demo to showcase progressbar #54
This file contains hidden or 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: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
# available runners: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
os: | |
- ubuntu-24.04 | |
- ubuntu-22.04 | |
- macos-15 | |
- macos-13 | |
compiler: | |
- gcc | |
- llvm | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup MacOS environment | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
brew install coreutils ctags expect | |
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH | |
- name: Setup Linux environment | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y exuberant-ctags expect-dev | |
- name: Setup compiler | |
uses: aminya/setup-cpp@v1.5.3 | |
with: | |
compiler: ${{ matrix.compiler }} | |
gcovr: true | |
- name: Run unit tests | |
# stdbuf has a bug on mac-latest (stdbuf is arm64, github wm arm64e) | |
# using 'unbuffer' command (made availavble by 'expect' package); | |
# run: | | |
# stdbuf -oL -eL ./test/run.sh 2>&1 | |
run: | | |
unbuffer ./test/run.sh | |
- name: Setup $GCOV executable (llvm) | |
if: matrix.compiler == 'llvm' | |
run: | | |
echo GCOV=$(dirname $(which $CC))/llvm-cov gcov >> $GITHUB_ENV | |
- name: Setup $GCOV executable (gcc) | |
if: matrix.compiler == 'gcc' | |
run: | | |
echo GCOV=$(dirname $(which $CC))/gcov-$($CC -dumpversion|cut -d. -f1) >> $GITHUB_ENV | |
- name: Collect coverage info with gcovr | |
run: | | |
gcovr # for debug | |
gcovr --fail-under-line 30 --delete --xml coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
flags: ${{ runner.os }} | |
name: ${{ matrix.os }}-${{ matrix.compiler }}-coverage | |
gcov_executable: ${{ env.GCOV }} | |
files: coverage.xml |