Skip to content

Added modifier "invocable" for operator() #298

Added modifier "invocable" for operator()

Added modifier "invocable" for operator() #298

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build_linux:
runs-on: ubuntu-20.04
container: { image: "ghcr.io/rollbear/${{matrix.config.container}}", options: "--security-opt seccomp=unconfined" }
strategy:
fail-fast: false
matrix:
config:
- { cxx: clang++-15, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:15" }
- { cxx: clang++-15, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:15" }
- { cxx: clang++-15, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:15" }
- { cxx: clang++-15, std: 14, container: "clang:15" }
- { cxx: clang++-15, std: 17, container: "clang:15" }
- { cxx: clang++-15, std: 20, container: "clang:15" }
- { cxx: clang++-16, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:16" }
- { cxx: clang++-16, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:16" }
- { cxx: clang++-16, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:16" }
- { cxx: clang++-16, std: 23, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:16" }
- { cxx: clang++-16, std: 14, container: "clang:16" }
- { cxx: clang++-16, std: 17, container: "clang:16" }
- { cxx: clang++-16, std: 20, container: "clang:16" }
- { cxx: clang++-16, std: 23, container: "clang:16" }
- { cxx: clang++-17, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:17" }
- { cxx: clang++-17, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:17" }
- { cxx: clang++-17, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:17" }
- { cxx: clang++-17, std: 23, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:17" }
- { cxx: clang++-17, std: 14, container: "clang:17" }
- { cxx: clang++-17, std: 17, container: "clang:17" }
- { cxx: clang++-17, std: 20, container: "clang:17" }
- { cxx: clang++-17, std: 23, container: "clang:17" }
- { cxx: g++-13, std: 14, container: "gcc:13" }
- { cxx: g++-13, std: 17, container: "gcc:13" }
- { cxx: g++-13, std: 20, container: "gcc:13" }
- { cxx: g++-12, std: 14, container: "gcc:12" }
- { cxx: g++-12, std: 17, container: "gcc:12" }
- { cxx: g++-12, std: 20, container: "gcc:12" }
- { cxx: clang++-14, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:14" }
- { cxx: clang++-14, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:14" }
- { cxx: clang++-14, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:14" }
- { cxx: clang++-14, std: 14, container: "clang:14" }
- { cxx: clang++-14, std: 17, container: "clang:14" }
- { cxx: clang++-14, std: 20, container: "clang:14" }
- { cxx: clang++-13, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:13" }
- { cxx: clang++-13, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:13" }
- { cxx: clang++-13, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:13" }
- { cxx: clang++-13, std: 14, container: "clang:13" }
- { cxx: clang++-13, std: 17, container: "clang:13" }
- { cxx: clang++-13, std: 20, container: "clang:13" }
- { cxx: clang++-12, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:12" }
- { cxx: clang++-12, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:12" }
- { cxx: clang++-12, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:12" }
- { cxx: clang++-12, std: 14, container: "clang:12" }
- { cxx: clang++-12, std: 17, container: "clang:12" }
- { cxx: clang++-12, std: 20, container: "clang:12" }
- { cxx: clang++-11, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:11" }
- { cxx: clang++-11, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:11" }
- { cxx: clang++-11, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:11" }
- { cxx: clang++-11, std: 14, container: "clang:11" }
- { cxx: clang++-11, std: 17, container: "clang:11" }
- { cxx: clang++-11, std: 20, container: "clang:11" }
- { cxx: clang++-10, std: 14, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:10" }
- { cxx: clang++-10, std: 17, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:10" }
- { cxx: clang++-10, std: 20, stdlib: "libc++", linker: "-fuse-ld=gold -lc++abi", container: "clang:10" }
- { cxx: clang++-10, std: 14, container: "clang:10" }
- { cxx: clang++-10, std: 17, container: "clang:10" }
- { cxx: clang++-10, std: 20, container: "clang:10" }
- { cxx: g++-10, std: 14, container: "gcc:10" }
- { cxx: g++-10, std: 17, container: "gcc:10" }
- { cxx: g++-10, std: 20, container: "gcc:10" }
- { cxx: clang++-9, std: 14, container: "clang:9" }
- { cxx: clang++-9, std: 17, container: "clang:9" }
- { cxx: g++-9, std: 14, container: "gcc:9" }
- { cxx: g++-9, std: 17, container: "gcc:9" }
- { cxx: clang++-8, std: 14, container: "clang:8" }
- { cxx: clang++-8, std: 17, container: "clang:8" }
- { cxx: g++-8, std: 14, container: "gcc:8" }
- { cxx: g++-8, std: 17, container: "gcc:8" }
- { cxx: g++-7, std: 14, container: "gcc:7" }
- { cxx: g++-7, std: 17, container: "gcc:7" }
name: "Linux ${{matrix.config.cxx}} C++${{matrix.config.std}} ${{matrix.config.stdlib}}"
steps:
- uses: actions/checkout@v3
- name: "setup"
shell: bash
run: |
STDLIB=""
if [ -n "${{matrix.config.stdlib}}" ]
then
STDLIB="-stdlib=libc++"
fi
LIBRARY_PREFIX="/usr/local/lib/c++${{matrix.config.std}}${{matrix.config.stdlib}}"
cmake \
-S . \
-B build \
-DCMAKE_CXX_COMPILER=${{matrix.config.cxx}} \
-DCMAKE_CXX_STANDARD=${{matrix.config.std}} \
-DCMAKE_CXX_FLAGS="${STDLIB} -Wall -Wextra -Wconversion -pedantic -Werror --coverage" \
-DCMAKE_PREFIX_PATH="${LIBRARY_PREFIX}" \
-DCMAKE_VERBOSE_MAKEFILE=yes \
-DSTRONG_TYPE_UNIT_TEST=yes \
-DCMAKE_BUILD_TYPE=Debug
- name: "build"
run: |
cmake --build build -t self_test test_fmt8 test_fmt9 test_fmt10
- name: "test"
run: |
./build/test/self_test -s && \
./build/test/test_fmt8/test_fmt8 -s && \
./build/test/test_fmt9/test_fmt9 -s && \
./build/test/test_fmt10/test_fmt10 -s
- name: "collect coverage"
run: |
COV=`echo ${{matrix.config.cxx}} | grep -q clang && echo "llvm-cov gcov"|| echo gcov`
${COV} -abcfup `find . -name "test*.gcno"`
ls *.gcov| grep -v 'include#strong_type'|xargs rm
- name: "upload coverage"
uses: codecov/codecov-action@v3
with:
gcov_include: "include/strong_type"
name: "Linux ${{matrix.config.cxx}} C++${{matrix.config.std}} ${{matrix.config.stdlib}}"
fail_ci_if_error: false
verbose: true
build_windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
config:
- { std: 14 }
- { std: 17 }
- { std: 20 }
name: "Windows C++${{matrix.config.std}}"
steps:
- uses: actions/checkout@v3
- name: Configure MSVC console (Windows)
uses: ilammy/msvc-dev-cmd@v1
- name: "setup"
shell: bash
run: |
cmake \
-S . \
-B build \
-DCMAKE_CXX_COMPILER=cl \
-DCMAKE_C_COMPILER=cl \
-DCMAKE_CXX_STANDARD=${{matrix.config.std}} \
-DCMAKE_CXX_FLAGS="'/permissive- /EHsc /W4 /WX'" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=yes \
-DSTRONG_TYPE_UNIT_TEST=yes \
-G Ninja
- name: "build"
shell: bash
run: |
cmake --build build --target self_test
- name: "test"
shell: bash
run: |
./build/test/self_test.exe -s