Skip to content

Commit 6b12ff7

Browse files
committed
Init Commit
0 parents  commit 6b12ff7

Some content is hidden

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

41 files changed

+6522
-0
lines changed

.clang-format

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
Language: Cpp
2+
Standard: Cpp11
3+
UseTab: Never
4+
TabWidth: 4
5+
IndentWidth: 4
6+
AccessModifierOffset: -4
7+
# AccessModifierOffset: 2
8+
AlignAfterOpenBracket: Align
9+
AlignConsecutiveAssignments: true
10+
# AlignConsecutiveBitFields: false
11+
AlignConsecutiveDeclarations: true
12+
# AlignConsecutiveMacros: false
13+
AlignEscapedNewlines: Right
14+
# AlignOperands: AlignAfterOperator
15+
AlignTrailingComments: true
16+
# AllowAllArgumentsOnNextLine: false
17+
# AllowAllConstructorInitializersOnNextLine: false
18+
AllowAllParametersOfDeclarationOnNextLine: true
19+
AllowShortBlocksOnASingleLine: false
20+
AllowShortCaseLabelsOnASingleLine: false
21+
# AllowShortEnumsOnASingleLine: true
22+
AllowShortFunctionsOnASingleLine: All
23+
AllowShortIfStatementsOnASingleLine: true
24+
# AllowShortLambdasOnASingleLine: Empty
25+
AllowShortLoopsOnASingleLine: false
26+
AlwaysBreakAfterReturnType: None
27+
AlwaysBreakBeforeMultilineStrings: false
28+
AlwaysBreakTemplateDeclarations: true
29+
BinPackArguments: true
30+
BinPackParameters: true
31+
# BitFieldColonSpacing: Both
32+
BreakBeforeBraces: Custom # Allman
33+
BraceWrapping:
34+
# AfterCaseLabel: true
35+
AfterClass: true
36+
AfterControlStatement: false
37+
AfterEnum: true
38+
AfterFunction: true
39+
AfterNamespace: false
40+
AfterStruct: true
41+
AfterUnion: true
42+
AfterExternBlock: false
43+
BeforeCatch: true
44+
BeforeElse: true
45+
# BeforeLambdaBody: false
46+
# BeforeWhile: false
47+
SplitEmptyFunction: false
48+
SplitEmptyRecord: false
49+
SplitEmptyNamespace: false
50+
BreakBeforeTernaryOperators: true
51+
BreakConstructorInitializers: BeforeComma
52+
BreakStringLiterals: false
53+
ColumnLimit: 120
54+
CompactNamespaces: false
55+
ConstructorInitializerIndentWidth: 2
56+
Cpp11BracedListStyle: true
57+
PointerAlignment: Left
58+
FixNamespaceComments: true
59+
IncludeBlocks: Preserve
60+
# IndentCaseBlocks: false
61+
IndentCaseLabels: true
62+
# IndentGotoLabels: false
63+
# IndentPPDirectives: BeforeHash
64+
KeepEmptyLinesAtTheStartOfBlocks: false
65+
MaxEmptyLinesToKeep: 1
66+
NamespaceIndentation: None
67+
ReflowComments: false
68+
SortIncludes: false
69+
SortUsingDeclarations: true
70+
SpaceAfterCStyleCast: false
71+
# SpaceAfterLogicalNot: false
72+
SpaceAfterTemplateKeyword: false
73+
SpaceBeforeAssignmentOperators: true
74+
# SpaceBeforeCpp11BracedList: false
75+
SpaceBeforeParens: ControlStatements
76+
# SpaceBeforeRangeBasedForLoopColon: true
77+
# SpaceBeforeSquareBrackets: false
78+
# SpaceInEmptyBlock: false
79+
SpaceInEmptyParentheses: false
80+
SpacesBeforeTrailingComments: 2
81+
SpacesInAngles: false
82+
SpacesInCStyleCastParentheses: false
83+
# SpacesInConditionalStatement: false
84+
SpacesInContainerLiterals: false
85+
SpacesInParentheses: false
86+
SpacesInSquareBrackets: false
87+
ContinuationIndentWidth: 4

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* text=auto
2+
*.h text eol=crlf
3+
*.cpp text eol=crlf
4+
*.hpp text eol=crlf
5+
*.cc text eol=crlf
6+
*.ixx text eol=crlf
7+
*.bat text eol=crlf
8+
*.py text eol=crlf
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: LoongDiff Build And Test
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
workflow_call:
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: windows-latest
13+
steps:
14+
- name: Git checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup MSVC
18+
uses: ilammy/msvc-dev-cmd@v1.4.1
19+
with:
20+
toolset: 14.3
21+
arch: x64
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.x
27+
28+
- name: Setup Meson
29+
run: pip install meson
30+
31+
- name: Configure and compile
32+
run: |
33+
meson setup build/release --buildtype=release --backend=ninja
34+
meson compile -C build/release -j1
35+
meson install -C build/release
36+
copy build/release/ldiff.pdb dist/
37+
38+
- name: Run Tests
39+
run: |
40+
./build/release/ldiff.exe --version
41+
meson test -C build/release --repeat 2
42+
43+
- name: Upload Build and Test logs
44+
if: always()
45+
uses: actions/upload-artifact@v2
46+
with:
47+
name: ldiff-build-and-test-log
48+
path: build/release/meson-logs
49+
50+
- name: Upload Build Artifact
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: ldiff-build-dist
54+
path: dist
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: LoongDiff Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build-and-test-ldiff.yml
11+
release:
12+
runs-on: windows-latest
13+
needs: build
14+
steps:
15+
- name: Download Build Artifact
16+
uses: actions/download-artifact@v2
17+
with:
18+
name: ldiff-build-dist
19+
path: dist
20+
21+
- name: Create Release
22+
id: create_release
23+
uses: actions/create-release@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.LDIFF_ACTION_TOKEN }}
26+
with:
27+
tag_name: ${{ github.ref }}
28+
release_name: ldiff ${{ github.ref }} Release
29+
draft: false
30+
prerelease: false
31+
32+
- name: Upload Release Asset (ldiff.exe)
33+
uses: actions/upload-release-asset@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.LDIFF_ACTION_TOKEN }}
36+
with:
37+
upload_url: ${{ steps.create_release.outputs.upload_url }}
38+
asset_path: ./dist/ldiff.exe
39+
asset_name: ldiff.exe
40+
asset_content_type: application/octet-stream
41+
42+
- name: Upload Release Asset (ldiff.pdb)
43+
uses: actions/upload-release-asset@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.LDIFF_ACTION_TOKEN }}
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: ./dist/ldiff.pdb
49+
asset_name: ldiff.pdb
50+
asset_content_type: application/octet-stream

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/build/
2+
/dist/
3+
/subprojects/*
4+
!/subprojects/*.wrap
5+
.DS_Store
6+
**/__pycache__/
7+
*.pyc

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"files.associations": {
3+
"*.hexpat": "cpp",
4+
"initializer_list": "cpp",
5+
"type_traits": "cpp",
6+
"xstring": "cpp",
7+
"xutility": "cpp",
8+
"xtr1common": "cpp",
9+
"*.ixx": "cpp"
10+
}
11+
}

ChangeLog

Whitespace-only changes.

0 commit comments

Comments
 (0)