Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +25,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
144 changes: 144 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Example / Linux

on:
workflow_dispatch:
push:
branches: [ main ]
paths: [ '**.cpp', '**.hpp*', '**.cmake', '**/CMakeLists.txt' ]
pull_request:
branches: [ main ]
paths: [ '**.cpp', '**.hpp*', '**.cmake', '**/CMakeLists.txt' ]
schedule:
- cron: '0 12 * * 3'

jobs:
main:
runs-on: 'ubuntu-${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: [ 22.04 ]
compiler: [ clang-15, gcc-11 ]
isPR:
- ${{ github.event_name == 'pull_request' }}
env:
BUILD_TYPE: 'Debug RelWithDebInfo'

steps:
- uses: actions/checkout@v3

- name: Update dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build googletest libunwind-dev

- name: Install dependencies clang
if: 1 && !startsWith(matrix.compiler, 'gcc')
run: |
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
ubuntu="jammy"
gcc_version=11
llvm_version=15
compiler=${{ matrix.compiler }}
clang_version=${compiler:6}
if [[ $clang_version -ge $llvm_version ]]; then
sudo add-apt-repository "deb http://apt.llvm.org/$ubuntu/ llvm-toolchain-$ubuntu-${clang_version} main"
fi
sudo apt-get update
sudo apt-get install clang-${clang_version} libc++-${clang_version}-dev libc++abi-${clang_version}-dev \
gcc-${gcc_version} g++-${gcc_version} libstdc++-${gcc_version}-dev

sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 200 \
--slave /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-${gcc_version} \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-${gcc_version} \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-${gcc_version} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${gcc_version} \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-${gcc_version} \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-${gcc_version}
sudo update-alternatives --auto gcc

sudo update-alternatives \
--install /usr/bin/cpp cpp /usr/bin/cpp-${gcc_version} 200
sudo update-alternatives --auto cpp

- name: Install dependencies gcc
if: startsWith(matrix.compiler, 'gcc')
run: |
compiler=${{ matrix.compiler }}
version=${compiler:4}
sudo apt-get install gcc-$version g++-$version libstdc++-$version-dev
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-$version 200 \
--slave /usr/bin/g++ g++ /usr/bin/g++-$version \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-$version \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-$version \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-$version \
--slave /usr/bin/gcov gcov /usr/bin/gcov-$version \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-$version \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-$version
sudo update-alternatives --auto gcc

sudo update-alternatives \
--install /usr/bin/cpp cpp /usr/bin/cpp-$version 200
sudo update-alternatives --auto cpp

- name: Configure CMake
run: |
compiler=${{ matrix.compiler }}
if [[ "$compiler" == gcc* ]]; then
version=${compiler:4}
c_compiler="gcc"
compiler="g++"
else
version=${compiler:6}
c_compiler="clang-$version"
compiler="clang++-$version"
fi


stdlib_names=(libcxx libstdcxx)
link_options=(
"-stdlib=libc++;-lc++abi"
"-stdlib=libstdc++"
)
compile_options=(
"-stdlib=libc++"
"-stdlib=libstdc++"
)

for (( j=0; j<${#stdlib_names[*]}; j+=1 )); do
for build_type in ${BUILD_TYPE[*]}; do
link_option=""; compile_option=""
if [[ "$compiler" == "g++" ]]; then
if [[ "${stdlib_names[$j]}" != "libstdcxx" ]]; then
continue # TODO(kononovk) I dunno how to get GNU GCC to work with other stdlibs
fi
else
link_option=${link_options[$j]}; compile_option=${compile_options[$j]}
if [[ "${stdlib_names[$j]}" == "libstdcxx" ]]; then
continue;
fi
fi
dir="build_${compiler}_${stdlib_names[$j]}_${build_type}"
echo $dir

cmake -S . -B $dir \
-DCMAKE_BUILD_TYPE="$build_type" \
-DIONE_CXX_STANDARD="20" \
-DIONE_EXAMPLE=ON \
-DIONE_FLAGS="$flags" \
-DCMAKE_CXX_COMPILER="$compiler" \
-DCMAKE_C_COMPILER="$c_compiler" \
-G"Ninja" \
-DIONE_LINK_OPTIONS="$link_option" \
-DIONE_COMPILE_OPTIONS="$compile_option"
done
done

- name: Build
run: |
for dir in build*/; do
ninja -C $dir
done
86 changes: 10 additions & 76 deletions .github/workflows/linux.yml → .github/workflows/linux_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: Test / Linux

on:
workflow_dispatch:
Expand All @@ -9,75 +9,18 @@ on:
branches: [ main ]
paths: [ '**.cpp', '**.hpp*', '**.cmake', '**/CMakeLists.txt' ]
schedule:
- cron: '0 12 * * 1-5'
- cron: '0 12 * * 3'

jobs:
# TODO(kononovk) Add clang-5.0, clang-6.0, clang-7
# Fucking cppreference liars, clang doesn't support simple variant usage, before clang-8!
# We can only support this when we remove the variant from the Result
# TODO(kononovk) Add clang-15 when it release
# TODO(kononovk) Add other compilers, like Intel C++?
# TODO(kononovk) libstdc++-7-dev, libc++ old version

main:
runs-on: 'ubuntu-${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: [ 20.04, 22.04 ]
compiler: [ clang-9, clang-10, clang-11, clang-12, clang-13, clang-14,
gcc-10, gcc-11, gcc-12 ]
os: [ 22.04 ]
compiler: [ clang-15, gcc-11 ]
isPR:
- ${{ github.event_name == 'pull_request' }}
exclude:
- isPR: true
os: 20.04
compiler: gcc-12

- isPR: false
os: 20.04
compiler: gcc-12

- isPR: true
os: 22.04
compiler: clang-9
- isPR: true
os: 22.04
compiler: clang-10
- isPR: true
os: 22.04
compiler: clang-11
- isPR: true
os: 22.04
compiler: clang-12
- isPR: true
os: 22.04
compiler: clang-13
- isPR: true
os: 22.04
compiler: clang-14

- isPR: true
os: 22.04
compiler: gcc-10
- isPR: true
os: 22.04
compiler: gcc-11
- isPR: true
os: 22.04
compiler: gcc-12

- isPR: false
os: 22.04
compiler: clang-8
- isPR: false
os: 22.04
compiler: clang-9
- isPR: false
os: 22.04
compiler: clang-10


env:
BUILD_TYPE: 'Debug RelWithDebInfo'

Expand All @@ -93,19 +36,9 @@ jobs:
if: 1 && !startsWith(matrix.compiler, 'gcc')
run: |
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
if [[ ${{ matrix.os }} == "18.04" ]]; then
ubuntu="bionic"
gcc_version=7
llvm_version=9
elif [[ ${{ matrix.os }} == "20.04" ]]; then
ubuntu="focal"
gcc_version=7
llvm_version=9
else
ubuntu="jammy"
gcc_version=9
llvm_version=13
fi
ubuntu="jammy"
gcc_version=11
llvm_version=15
compiler=${{ matrix.compiler }}
clang_version=${compiler:6}
if [[ $clang_version -ge $llvm_version ]]; then
Expand Down Expand Up @@ -164,7 +97,7 @@ jobs:
compiler="clang++-$version"
fi


stdlib_names=(libcxx libstdcxx)
link_options=(
"-stdlib=libc++;-lc++abi"
Expand Down Expand Up @@ -194,7 +127,7 @@ jobs:
cmake -S . -B $dir \
-DCMAKE_BUILD_TYPE="$build_type" \
-DIONE_CXX_STANDARD="20" \
-DIONE_TEST=SINGLE \
-DIONE_TEST=ON \
-DIONE_FLAGS="$flags" \
-DCMAKE_CXX_COMPILER="$compiler" \
-DCMAKE_C_COMPILER="$c_compiler" \
Expand All @@ -210,6 +143,7 @@ jobs:
ninja -C $dir
done


- name: Test
run: |
for dir in build*/; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths: [ '**.cpp', '**.hpp*', '**.cmake', '**/CMakeLists.txt' ]
types: [ assigned ]
schedule:
- cron: '0 12 * * 1-5'
- cron: '0 12 * * 3'

jobs:
# TODO(kononovk) Add MEMSAN?
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
run: |
flags=${{ matrix.flags }}
build_type=${{ matrix.build_type }}
compiler_names=(clang gnu apple_clang)
compiler_names=(clang gnu)
stdlib_names=(libcxx libstdcxx default)
linker=""
cxx_compilers=(clang++-14 g++)
Expand All @@ -75,7 +75,7 @@ jobs:
slowdown=1
linker="-fuse-ld=lld-14"


for (( i=0; i<${#cxx_compilers[*]}; i+=1 )); do
for (( j=0; j<${#link_options[*]}; j+=1 )); do
link_option=${link_options[$j]}; compile_option=${compile_options[$j]}
Expand Down
Loading