-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Prepare repository (part 2) (#4)
## Describe your changes Closes #2 ## Checklist before requesting a review - [x] I've followed Contributions guidelines - [x] I have performed a self-review of my code - [x] If it's a new feature, I've added tests that covers 100% of it - [x] If it's a bug fix, I've added test case to reproduce the bug
- Loading branch information
Showing
25 changed files
with
2,023 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable Bzlmod for every Bazel command | ||
common --enable_bzlmod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
IndentWidth: 4 | ||
--- | ||
Language: Cpp | ||
Standard: c++17 | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
FormatStyle: llvm | ||
CheckOptions: | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.ClassConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.ClassMemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ClassMethodCase | ||
value: camelBack | ||
- key: readability-identifier-naming.ConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.FunctionCase | ||
value: camelBack | ||
- key: readability-identifier-naming.LocalVariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.MemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.MethodCase | ||
value: camelBack | ||
- key: readability-identifier-naming.NamespaceCase | ||
value: lower_case | ||
- key: readability-identifier-naming.ParameterCase | ||
value: lower_case | ||
- key: readability-identifier-naming.StructCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[*] | ||
indent_style = space | ||
|
||
[*.nix] | ||
indent_size = 2 | ||
|
||
[*.bazel] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
... | ||
|
||
|
||
## Checklist before requesting a review | ||
|
||
- [ ] I've followed Contributions guidelines | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev-workflow | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | ||
- name: Build | ||
run: nix-shell --pure --run 'bazel build //:filc' | ||
|
||
- name: Archive binary | ||
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | ||
with: | ||
name: filc | ||
path: ${{ github.workspace }}/bazel-bin/filc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: "Build & Run" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | ||
- name: Build then run | ||
run: nix-shell --pure --run 'bazel run //:filc' | ||
|
||
unit-tests: | ||
name: "Unit tests" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 | ||
- name: Run tests | ||
run: nix-shell --pure --run 'bazel test //:unit-tests' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bazel-* | ||
.clwb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
cc_library( | ||
name = "filc_lib", | ||
srcs = glob([ | ||
"src/*.cpp", | ||
"src/**/*.cpp", | ||
]), | ||
hdrs = glob([ | ||
"include/filc/*.h", | ||
"include/filc/**/*.h", | ||
]), | ||
includes = ["include"], | ||
) | ||
|
||
cc_binary( | ||
name = "filc", | ||
srcs = ["main.cpp"], | ||
deps = ["//:filc_lib"], | ||
) | ||
|
||
cc_test( | ||
name = "unit-tests", | ||
srcs = glob([ | ||
"tests/unit/*.cpp", | ||
"tests/unit/**/*.cpp", | ||
]), | ||
deps = [ | ||
"//:filc_lib", | ||
"@googletest//:gtest", | ||
"@googletest//:gtest_main", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module(name = "filc") | ||
|
||
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency=True) |
Oops, something went wrong.