Skip to content

Update docs

Update docs #245

Workflow file for this run

# Copyright Glen Knowles 2021 - 2024.
# Distributed under the Boost Software License, Version 1.0.
#
# github-build.yml
name: build
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
workflow_dispatch: {}
jobs:
build-win:
strategy:
fail-fast: false
matrix:
platform: [Win32, x64]
configuration: [Debug, Release]
toolset: [v140, v141, v142, v143]
include:
- toolset: v140
image: windows-2019
- toolset: v141
image: windows-2019
- toolset: v142
image: windows-2019
- toolset: v143
image: windows-2022
runs-on: ${{matrix.image}}
defaults:
run:
shell: cmd
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build
working-directory: ${{github.workspace}}
run: |
md build
cd build
if "${{matrix.toolset}}" == "v143" (
set generator=Visual Studio 17 2022
) else (
set generator=Visual Studio 16 2019
)
cmake .. -G "%generator%" -A ${{matrix.platform}} -T ${{matrix.toolset}}
cmake . -DCMAKE_BUILD_TYPE=${{matrix.configuration}}^
-DCMAKE_INSTALL_PREFIX=publish -DINSTALL_LIBS:BOOL=ON
cmake --build . --target install --config ${{matrix.configuration}}
cd publish
:: 7z a dimcli-latest.zip include lib
- name: Test
working-directory: ${{github.workspace}}
run: '"bin/cli" --test'
build-unix:
strategy:
fail-fast: false
matrix:
configuration: [Debug, Release]
env:
- CXX=clang++-6.0 CC=clang-6.0 INSTALL_LLVM_BIONIC=6.0
- CXX=clang++-9 CC=clang-9 INSTALL_LLVM=9
- CXX=clang++-10 CC=clang-10
- CXX=clang++-11 CC=clang-11
- CXX=clang++-12 CC=clang-12 INSTALL_LLVM=12
- CXX=clang++-13 CC=clang-13 INSTALL_LLVM=13
- CXX=clang++-14 CC=clang-14 INSTALL_LLVM=14
- CXX=clang++-15 CC=clang-15 INSTALL_LLVM=15
- CXX=clang++-16 CC=clang-16 INSTALL_LLVM=16
- CXX=clang++-17 CC=clang-17 INSTALL_LLVM=17
- CXX=g++-7 CC=gcc-7 INSTALL_APT=7
- CXX=g++-8 CC=gcc-8 INSTALL_APT=8
- CXX=g++-9 CC=gcc-9
- CXX=g++-10 CC=gcc-10
- CXX=g++-11 CC=gcc-11
- CXX=g++-12 CC=gcc-12
- CXX=g++-13 CC=gcc-13 INSTALL_APT=13
include:
- env: CXX=g++-10 CC=gcc-10 GCOV=gcov-10 BUILD_COVERAGE=ON
image: ubuntu-22.04
configuration: Debug
coverage: true
- image: ubuntu-22.04
- env: CXX=clang++-6.0 CC=clang-6.0 INSTALL_LLVM_BIONIC=6.0
image: ubuntu-20.04
- env: CXX=clang++-9 CC=clang-9 INSTALL_LLVM=9
image: ubuntu-20.04
- env: CXX=clang++-10 CC=clang-10
image: ubuntu-20.04
- env: CXX=clang++-11 CC=clang-11
image: ubuntu-20.04
- env: CXX=clang++-12 CC=clang-12 INSTALL_LLVM=12
image: ubuntu-20.04
- env: CXX=clang++-13 CC=clang-13 INSTALL_LLVM=13
image: ubuntu-20.04
- env: CXX=clang++-14 CC=clang-14 INSTALL_LLVM=14
image: ubuntu-20.04
- env: CXX=clang++-15 CC=clang-15 INSTALL_LLVM=15
image: ubuntu-20.04
- env: CXX=g++-7 CC=gcc-7 INSTALL_APT=7
image: ubuntu-20.04
- env: CXX=g++-8 CC=gcc-8 INSTALL_APT=8
image: ubuntu-20.04
runs-on: ${{matrix.image}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install
run: |
export ${{matrix.env}}
if [ -n "$INSTALL_LLVM_BIONIC" ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | \
sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ \
llvm-toolchain-bionic-$INSTALL_LLVM_BIONIC main"
export INSTALL_APT=${INSTALL_LLVM_BIONIC}
fi
if [ -n "$INSTALL_LLVM" ]; then
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $INSTALL_LLVM
elif [ -n "$INSTALL_APT" ]; then
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y ${CC} ${CXX} ${{matrix.apt-get}}
fi
- name: Build
working-directory: ${{github.workspace}}
run: |
export ${{matrix.env}}
mkdir -p build && cd build
cmake .. -DBUILD_COVERAGE:BOOL=${BUILD_COVERAGE}
cmake --build . --config ${{matrix.configuration}}
- name: Test
working-directory: ${{github.workspace}}
run: |
export ${{matrix.env}}
export LANG=en_US.UTF-8
export COLUMNS=80
bin/cli --test
- name: Report Coverage
if: matrix.coverage
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true