Skip to content

Commit b4063f4

Browse files
committed
Added full weaver source code
1 parent e07b078 commit b4063f4

131 files changed

Lines changed: 23788 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# run on whole project with:
2+
# find src/ test/ -name "*.hpp" -o -name "*.cpp" | xargs clang-format -i --style=file
3+
---
4+
Language: Cpp
5+
BasedOnStyle: LLVM
6+
AlignOperands: AlignAfterOperator
7+
AllowAllArgumentsOnNextLine: false
8+
AllowShortEnumsOnASingleLine: false
9+
AllowShortFunctionsOnASingleLine: None
10+
AlwaysBreakAfterDefinitionReturnType: None
11+
AlwaysBreakAfterReturnType: None
12+
AlwaysBreakBeforeMultilineStrings: true
13+
AlwaysBreakTemplateDeclarations: Yes
14+
BinPackArguments: false
15+
BinPackParameters: false
16+
BreakBeforeBraces: Allman
17+
BraceWrapping:
18+
AfterCaseLabel: true
19+
AfterClass: true
20+
AfterControlStatement: Always
21+
AfterEnum: true
22+
AfterFunction: true
23+
AfterNamespace: true
24+
AfterObjCDeclaration: true
25+
AfterStruct: true
26+
AfterUnion: true
27+
AfterExternBlock: true
28+
BeforeCatch: true
29+
BeforeElse: true
30+
BeforeLambdaBody: true
31+
BeforeWhile: true
32+
IndentBraces: false
33+
SplitEmptyFunction: false
34+
SplitEmptyRecord: false
35+
SplitEmptyNamespace: false
36+
BreakBeforeInheritanceComma: true
37+
BreakConstructorInitializers: AfterColon
38+
BreakInheritanceList: AfterColon
39+
ColumnLimit: 120
40+
CommentPragmas: \/\/!
41+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
42+
ConstructorInitializerIndentWidth: 2
43+
ContinuationIndentWidth: 2
44+
DeriveLineEnding: false
45+
IncludeBlocks: Regroup
46+
IncludeCategories:
47+
- Regex: '^<(sys/)?[a-z_]+(\.h)?>$'
48+
Priority: 1
49+
- Regex: '^<parallel_hashmap/'
50+
Priority: 4
51+
- Regex: '^<paw/'
52+
Priority: 6
53+
- Regex: '^<weaver/'
54+
Priority: 10
55+
- Regex: '^"[a-z_]+\.hpp"$'
56+
Priority: 12
57+
- Regex: '.*'
58+
Priority: 100
59+
IndentExternBlock: false
60+
IndentGotoLabels: false
61+
IndentPPDirectives: AfterHash
62+
IndentWidth: 2
63+
KeepEmptyLinesAtTheStartOfBlocks: false
64+
MaxEmptyLinesToKeep: 1
65+
PenaltyReturnTypeOnItsOwnLine: 200
66+
PointerAlignment: Middle
67+
ReflowComments: true
68+
Standard: c++17
69+
TabWidth: 2

.clang-tidy

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
Checks: >
3+
-*,
4+
performance-*,
5+
bugprone-*,
6+
-bugprone-narrowing-conversions,
7+
# readability-*,
8+
# -readability-magic-numbers,
9+
# -readability-qualified-auto,
10+
# -readability-braces-around-statements,
11+
# -readability-uppercase-literal-suffix,
12+
# -readability-avoid-const-params-in-decls,
13+
# -readability-function-size,
14+
# -readability-function-cognitive-complexity,
15+
# -readability-container-size-empty
16+
# clang-analyzer-*,
17+
# -clang-analyzer-osx*,
18+
# modernize-*,
19+
# -modernize-use-trailing-return-type,
20+
21+
WarningsAsErrors: ''
22+
#HeaderFilterRegex: 'graphtyper/'
23+
AnalyzeTemporaryDtors: false
24+
FormatStyle: none
25+
CheckOptions:
26+
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
27+
...

.github/workflows/ci_linux.yaml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: CI on Linux
2+
3+
on:
4+
# Trigger workflow on pull requests of any branch
5+
pull_request:
6+
# Trigger workflow on pushes to following branches
7+
push:
8+
branches:
9+
- master
10+
- dev
11+
12+
env:
13+
TZ: Atlantic/Reykjavik
14+
15+
defaults:
16+
run:
17+
shell: bash -ex {0}
18+
19+
jobs:
20+
build:
21+
name: ${{ matrix.name }}
22+
runs-on: ubuntu-22.04
23+
timeout-minutes: 120
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- name: "GCC9 Debug"
29+
pkg: "g++-9"
30+
cxx: "g++-9"
31+
cc: "gcc-9"
32+
build_type: Debug
33+
34+
- name: "GCC9 Release"
35+
pkg: "g++-9"
36+
cxx: "g++-9"
37+
cc: "gcc-9"
38+
build_type: Release
39+
40+
- name: "GCC10 Debug C++20"
41+
pkg: "g++-10"
42+
cxx: "g++-10"
43+
cc: "gcc-10"
44+
cxx_flags: "-std=c++20"
45+
build_type: Debug
46+
47+
- name: "GCC11 Release C++20"
48+
pkg: "g++-11"
49+
cxx: "g++-11"
50+
cc: "gcc-11"
51+
cxx_flags: "-std=c++20"
52+
build_type: Release
53+
54+
- name: "Clang12 Release C++20"
55+
pkg: "clang-12"
56+
cxx: "clang++-12"
57+
cc: "clang-12"
58+
cxx_flags: "-std=c++20"
59+
build_type: Release
60+
61+
- name: "Clang16 Release C++20"
62+
pkg: "clang-16"
63+
cxx: "clang++-16"
64+
cc: "clang-16"
65+
cxx_flags: "-std=c++20"
66+
build_type: Release
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v2
70+
with:
71+
path: src
72+
fetch-depth: 2
73+
submodules: recursive
74+
75+
- name: Add package source
76+
run: |
77+
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
78+
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa
79+
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test
80+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
81+
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
82+
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
83+
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
84+
sudo apt-get update
85+
86+
- name: Install Build dependencies
87+
run: sudo apt-get install --yes cmake ccache
88+
89+
- name: Install compiler ${{ matrix.name }}
90+
run: sudo apt-get install --yes ${{ matrix.pkg }}
91+
92+
- name: Install zstd
93+
run: sudo apt-get install --yes zstd libzstd-dev
94+
95+
- name: Load ccache
96+
uses: actions/cache@v2
97+
with:
98+
path: .ccache
99+
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }}
100+
# Restoring: From current branch, otherwise from base branch, otherwise from any branch.
101+
restore-keys: |
102+
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}
103+
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }}
104+
${{ runner.os }}-${{ matrix.name }}-ccache-
105+
106+
- name: Tool versions
107+
run: |
108+
env cmake --version
109+
env ${{ matrix.cxx }} --version
110+
111+
- name: Configure tests
112+
env:
113+
CXX: ${{ matrix.cxx }}
114+
CC: ${{ matrix.cc }}
115+
run: |
116+
mkdir build
117+
cd build
118+
cmake ../src -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
119+
120+
- name: Build tests
121+
env:
122+
CCACHE_BASEDIR: ${{ github.workspace }}
123+
CCACHE_DIR: ${{ github.workspace }}/.ccache
124+
CCACHE_COMPRESS: true
125+
CCACHE_COMPRESSLEVEL: 6
126+
CCACHE_MAXSIZE: 500M
127+
run: |
128+
ccache -p || true
129+
cd build
130+
make -k -j2
131+
ccache -s || true
132+
133+
- name: Run tests
134+
run: |
135+
cd build
136+
make test
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Format-check
2+
3+
on:
4+
# Trigger workflow on pull requests of any branch
5+
pull_request:
6+
# Trigger workflow on pushes to following branches
7+
push:
8+
branches:
9+
- master
10+
- dev
11+
12+
env:
13+
TZ: Atlantic/Reykjavik
14+
15+
defaults:
16+
run:
17+
shell: bash -ex {0}
18+
19+
jobs:
20+
build:
21+
name: ${{ matrix.name }}
22+
runs-on: ubuntu-22.04
23+
timeout-minutes: 120
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
include:
28+
- name: "Clang12 Release C++20"
29+
pkg: "clang-12"
30+
format: "clang-format-12"
31+
cxx: "clang++-12"
32+
cc: "clang-12"
33+
cxx_flags: "-std=c++20"
34+
build_type: Release
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
with:
39+
path: src
40+
fetch-depth: 2
41+
submodules: recursive
42+
43+
- name: Add package source
44+
run: |
45+
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
46+
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa
47+
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test
48+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
49+
sudo add-apt-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
50+
sudo apt-get update
51+
52+
- name: Install CMake
53+
run: sudo apt-get install --yes cmake
54+
55+
- name: Install clang-format
56+
run: sudo apt-get install --yes ${{ matrix.pkg }} ${{ matrix.format }}
57+
58+
- name: Install zstd
59+
run: sudo apt-get install --yes zstd libzstd-dev
60+
61+
- name: Tool versions
62+
run: |
63+
env cmake --version
64+
env ${{ matrix.cxx }} --version
65+
env ${{ matrix.format }} --version
66+
- name: Configure tests
67+
env:
68+
CXX: ${{ matrix.cxx }}
69+
CC: ${{ matrix.cc }}
70+
run: |
71+
mkdir build
72+
cd build
73+
cmake ../src -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
74+
- name: Run tests
75+
run: |
76+
cd build
77+
make check_format

.gitmodules

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[submodule "submodules/catch"]
2+
path = submodules/catch
3+
url = https://github.com/catchorg/Catch2.git
4+
ignore = dirty
5+
[submodule "submodules/parallel-hashmap"]
6+
path = submodules/parallel-hashmap
7+
url = https://github.com/greg7mdp/parallel-hashmap.git
8+
ignore = dirty
9+
[submodule "submodules/paw"]
10+
path = submodules/paw
11+
url = https://github.com/hannespetur/paw.git
12+
ignore = dirty
13+
[submodule "submodules/gfatools"]
14+
path = submodules/gfatools
15+
url = https://github.com/lh3/gfatools.git
16+
ignore = dirty
17+
[submodule "submodules/cereal"]
18+
path = submodules/cereal
19+
url = https://github.com/USCiLab/cereal.git
20+
[submodule "submodules/libdeflate"]
21+
path = submodules/libdeflate
22+
url = https://github.com/ebiggers/libdeflate.git
23+
ignore = dirty
24+
[submodule "submodules/htslib"]
25+
path = submodules/htslib
26+
url = https://github.com/samtools/htslib.git
27+
ignore = dirty

0 commit comments

Comments
 (0)