-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for all CLP FFI functionality and refactor existing code: (…
…#3) - Add CLP encoding/decoding functionalities - Add CLP IR wildcard query support - Add basic GitHub templates and workflows - Rewrite CLP IR serialization/deserialization functionalities to match the latest CLP glossary, and simplify resource management - Add reader/writer interfaces for CLP IR - Update formatting and lining tooling - Switch to use static library
- Loading branch information
Showing
87 changed files
with
4,333 additions
and
1,641 deletions.
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,40 @@ | ||
name: "Bug Report" | ||
description: Report software deficiencies | ||
labels: ["bug"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Use this form to report any functional or performance bugs you've found in the software. | ||
Be sure to check if your [issue](https://github.com/y-scope/clp-ffi-go/issues) has already been reported. | ||
- type: textarea | ||
attributes: | ||
label: Bug | ||
description: "Describe what's wrong and if applicable, what you expected instead." | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
attributes: | ||
label: clp-ffi-go version | ||
description: "The release version number or development commit hash that has the bug." | ||
placeholder: "Version number or commit hash" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Environment | ||
description: "The environment in which you're running/using clp-ffi-go." | ||
placeholder: "OS version, docker version, etc." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Reproduction steps | ||
description: "List each step required to reproduce the bug." | ||
validations: | ||
required: true |
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 @@ | ||
blank_issues_enabled: true |
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,23 @@ | ||
name: "Feature/Change Request" | ||
description: Request a feature or change | ||
labels: ["enhancement"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Use this form to request a feature/change in the software, or the project as a whole. | ||
- type: textarea | ||
attributes: | ||
label: Request | ||
description: "Describe your request and why it's important." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Possible implementation | ||
description: "Describe any implementations you have in mind." | ||
validations: | ||
required: true | ||
|
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,9 @@ | ||
# References | ||
<!-- Any issues or pull requests relevant to this pull request --> | ||
|
||
# Description | ||
<!-- Describe what this request will change/fix and provide any details necessary for reviewers --> | ||
|
||
# Validation performed | ||
<!-- What tests and validation you performed on the change --> | ||
|
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,66 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
workflow_call: | ||
|
||
# TODO: add separate jobs for building, linting, and testing c++ | ||
jobs: | ||
prebuilt-test: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.x' | ||
check-latest: true | ||
|
||
- run: go clean -cache && go build ./... | ||
|
||
- run: go test -count=1 ./... | ||
|
||
build-lint-test: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.x' | ||
check-latest: true | ||
|
||
- if: ${{ 'macos-latest' == matrix.os }} | ||
run: | | ||
brew update | ||
brew install llvm | ||
- name: Remove repo's generated c++ libraries and go code | ||
run: | | ||
rm ./lib/* ./**/*_string.go | ||
- run: | | ||
go install mvdan.cc/gofumpt@latest | ||
go install github.com/segmentio/golines@latest | ||
go install golang.org/x/tools/cmd/stringer@latest | ||
- run: go clean -cache && go generate ./... | ||
|
||
- run: | | ||
diff="$(golines -m 100 -t 4 --base-formatter='gofumpt' --dry-run .)" | ||
if [[ -n "$diff" ]]; then echo "$diff"; exit 1; fi | ||
# - run: cmake -S ./cpp -B ./cpp/build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | ||
|
||
- run: go test -count=1 ./... |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
build/ | ||
cpp/.cache/ | ||
cpp/clp/ | ||
**/compile_commands.json |
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 |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "clp"] | ||
path = cpp/clp | ||
url = [email protected]:y-scope/clp.git | ||
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 |
---|---|---|
@@ -1,53 +1,18 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library") | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
|
||
cc_library( | ||
name = "libclp_ffi", | ||
srcs = select({ | ||
"@io_bazel_rules_go//go/platform:android_amd64": [ | ||
"lib/libclp_ffi_linux_amd64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:android_arm64": [ | ||
"lib/libclp_ffi_linux_arm64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_amd64": [ | ||
"lib/libclp_ffi_darwin_amd64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:darwin_arm64": [ | ||
"lib/libclp_ffi_darwin_arm64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:ios_amd64": [ | ||
"lib/libclp_ffi_darwin_amd64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:ios_arm64": [ | ||
"lib/libclp_ffi_darwin_arm64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:linux_amd64": [ | ||
"lib/libclp_ffi_linux_amd64.so", | ||
], | ||
"@io_bazel_rules_go//go/platform:linux_arm64": [ | ||
"lib/libclp_ffi_linux_arm64.so", | ||
], | ||
"//conditions:default": [], | ||
}), | ||
hdrs = glob([ | ||
"cpp/src/**/*.h", | ||
]), | ||
srcs = glob(["cpp/src/ffi_go/**"]) + [ | ||
], | ||
hdrs = glob(["cpp/src/ffi_go/**/*.h"]), | ||
includes = [ | ||
"cpp/src", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_library( | ||
name = "clp-ffi-go", | ||
srcs = ["generate.go"], | ||
importpath = "github.com/y-scope/clp-ffi-go", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
alias( | ||
name = "go_default_library", | ||
actual = ":clp-ffi-go", | ||
deps = [ | ||
"@com_github_y_scope_clp//:libclp_core", | ||
], | ||
copts = [ | ||
"-std=c++20", | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
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
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
Oops, something went wrong.