-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fixed version for cbindgen install + formatting I guess
- Loading branch information
Showing
3 changed files
with
89 additions
and
54 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 |
---|---|---|
@@ -1,54 +1,66 @@ | ||
[env] | ||
HEADER_OUTPUT_DIR_C="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes" | ||
HEADER_OUTPUT_DIR_CPP="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes-cpp" | ||
HEADER_OUTPUT_DIR_C = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes" | ||
HEADER_OUTPUT_DIR_CPP = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes-cpp" | ||
|
||
HEADER_NAME="wooting-analog-common.h" | ||
HEADER_NAME = "wooting-analog-common.h" | ||
|
||
HEADER_PATH_CLEAN="${HEADER_OUTPUT_DIR_C}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN_CPP="${HEADER_OUTPUT_DIR_CPP}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN = "${HEADER_OUTPUT_DIR_C}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN_CPP = "${HEADER_OUTPUT_DIR_CPP}/wooting-analog-common*" | ||
|
||
PLUGIN_GEN_PATH="${CARGO_MAKE_WORKING_DIRECTORY}/cbindgen-plugin.toml" | ||
PLUGIN_GEN_PATH = "${CARGO_MAKE_WORKING_DIRECTORY}/cbindgen-plugin.toml" | ||
|
||
[tasks.header-cpp] | ||
command = "cbindgen" | ||
args = ["-l", "c++", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c++", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}", | ||
] | ||
|
||
[tasks.header-c] | ||
command = "cbindgen" | ||
args = ["-l", "c", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}", | ||
] | ||
|
||
[tasks.cbindgen-install] | ||
install_crate = { crate_name = "cbindgen", rustup_component_name="cbindgen", binary="cbindgen", test_arg = "--help" } | ||
install_crate = { crate_name = "cbindgen", rustup_component_name = "cbindgen", binary = "cbindgen", test_arg = "--help", version = "0.26.0" } | ||
command = "cbindgen" | ||
args = ["--version"] | ||
|
||
[tasks.cbindgen] | ||
#TODO: Check the rustup_component_name arg to see if it is the correct name | ||
dependencies=["cbindgen-install", "header-c", "header-cpp"] | ||
dependencies = ["cbindgen-install", "header-c", "header-cpp"] | ||
|
||
[tasks.gen-headers] | ||
env = { CBINDGEN_ARGS="-v" } | ||
env = { CBINDGEN_ARGS = "-v" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.verify-headers] | ||
env = { CBINDGEN_ARGS="--verify" } | ||
env = { CBINDGEN_ARGS = "--verify" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.clean-headers] | ||
#env = { HEADER_POSTFIX="*" } | ||
script_runner = "@shell" | ||
script = [ | ||
''' | ||
script = [''' | ||
rm ${HEADER_PATH_CLEAN} | ||
rm ${HEADER_PATH_CLEAN_CPP} | ||
''' | ||
] | ||
'''] | ||
|
||
[tasks.post-test] | ||
dependencies=["verify-headers"] | ||
dependencies = ["verify-headers"] | ||
|
||
[tasks.post-build] | ||
dependencies=["gen-headers"] | ||
dependencies = ["gen-headers"] | ||
|
||
[tasks.clean] | ||
#dependencies=["clean-headers"] | ||
#dependencies=["clean-headers"] |
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,52 +1,64 @@ | ||
[env] | ||
HEADER_OUTPUT_DIR_C="${CARGO_MAKE_WORKING_DIRECTORY}/../includes" | ||
HEADER_OUTPUT_DIR_CPP="${CARGO_MAKE_WORKING_DIRECTORY}/../includes-cpp" | ||
HEADER_OUTPUT_DIR_C = "${CARGO_MAKE_WORKING_DIRECTORY}/../includes" | ||
HEADER_OUTPUT_DIR_CPP = "${CARGO_MAKE_WORKING_DIRECTORY}/../includes-cpp" | ||
|
||
HEADER_NAME="wooting-analog-plugin-dev.h" | ||
HEADER_NAME = "wooting-analog-plugin-dev.h" | ||
|
||
HEADER_PATH_CLEAN="${HEADER_OUTPUT_DIR_C}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN_CPP="${HEADER_OUTPUT_DIR_CPP}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN = "${HEADER_OUTPUT_DIR_C}/wooting-analog-common*" | ||
HEADER_PATH_CLEAN_CPP = "${HEADER_OUTPUT_DIR_CPP}/wooting-analog-common*" | ||
|
||
|
||
[tasks.header-cpp] | ||
command = "cbindgen" | ||
args = ["-l", "c++", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c++", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}", | ||
] | ||
|
||
[tasks.header-c] | ||
command = "cbindgen" | ||
args = ["-l", "c", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}", | ||
] | ||
|
||
[tasks.cbindgen-install] | ||
install_crate = { crate_name = "cbindgen", rustup_component_name="cbindgen", binary="cbindgen", test_arg = "--help" } | ||
install_crate = { crate_name = "cbindgen", rustup_component_name = "cbindgen", binary = "cbindgen", test_arg = "--help", version = "0.26.0" } | ||
command = "cbindgen" | ||
args = ["--version"] | ||
|
||
[tasks.cbindgen] | ||
dependencies=["cbindgen-install", "header-c", "header-cpp"] | ||
dependencies = ["cbindgen-install", "header-c", "header-cpp"] | ||
|
||
[tasks.gen-headers] | ||
env = { CBINDGEN_ARGS="-v" } | ||
env = { CBINDGEN_ARGS = "-v" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.verify-headers] | ||
env = { CBINDGEN_ARGS="--verify" } | ||
env = { CBINDGEN_ARGS = "--verify" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.clean-headers] | ||
#env = { HEADER_POSTFIX="*" } | ||
script_runner = "@shell" | ||
script = [ | ||
''' | ||
script = [''' | ||
rm ${HEADER_PATH_CLEAN} | ||
rm ${HEADER_PATH_CLEAN_CPP} | ||
''' | ||
] | ||
'''] | ||
|
||
[tasks.post-test] | ||
dependencies=["verify-headers"] | ||
dependencies = ["verify-headers"] | ||
|
||
[tasks.post-build] | ||
dependencies=["gen-headers"] | ||
dependencies = ["gen-headers"] | ||
|
||
[tasks.clean] | ||
#dependencies=["clean-headers"] | ||
#dependencies=["clean-headers"] |
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,51 +1,62 @@ | ||
[env] | ||
HEADER_NAME="wooting-analog-wrapper.h" | ||
HEADER_OUTPUT_DIR_C="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes" | ||
HEADER_OUTPUT_DIR_CPP="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes-cpp" | ||
HEADER_NAME = "wooting-analog-wrapper.h" | ||
HEADER_OUTPUT_DIR_C = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes" | ||
HEADER_OUTPUT_DIR_CPP = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/includes-cpp" | ||
|
||
[tasks.header-cpp] | ||
command = "cbindgen" | ||
args = ["-l", "c++", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c++", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME}", | ||
] | ||
#Include clean on the second header gen as otherwise it'll strangely fail on windows and mac | ||
|
||
[tasks.header-c] | ||
command = "cbindgen" | ||
args = ["-l", "c", "${CBINDGEN_ARGS}", "--clean", "-o", "${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}"] | ||
args = [ | ||
"-l", | ||
"c", | ||
"${CBINDGEN_ARGS}", | ||
"--clean", | ||
"-o", | ||
"${HEADER_OUTPUT_DIR_C}/${HEADER_NAME}", | ||
] | ||
#Have had to throw in clean as well as there's some weird cases where cbindgen will fail when generating all headers | ||
|
||
[tasks.cbindgen-install] | ||
install_crate = { crate_name = "cbindgen", rustup_component_name="cbindgen", binary="cbindgen", test_arg = "--help" } | ||
install_crate = { crate_name = "cbindgen", rustup_component_name = "cbindgen", binary = "cbindgen", test_arg = "--help", version = "0.26.0" } | ||
command = "cbindgen" | ||
args = ["--version"] | ||
|
||
[tasks.cbindgen] | ||
dependencies=["cbindgen-install", "header-c", "header-cpp"] | ||
dependencies = ["cbindgen-install", "header-c", "header-cpp"] | ||
|
||
[tasks.gen-headers] | ||
env = { CBINDGEN_ARGS="-v" } | ||
env = { CBINDGEN_ARGS = "-v" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.verify-headers] | ||
env = { CBINDGEN_ARGS="--verify" } | ||
env = { CBINDGEN_ARGS = "--verify" } | ||
run_task = "cbindgen" | ||
|
||
[tasks.clean-headers] | ||
#env = { HEADER_POSTFIX="*" } | ||
script_runner = "@shell" | ||
script = [ | ||
''' | ||
script = [''' | ||
rm ${HEADER_OUTPUT_DIR_CPP}/${HEADER_NAME} | ||
rm ${HEADER_OUTPUT_DIR_C}/${HEADER_NAME} | ||
''' | ||
] | ||
|
||
'''] | ||
|
||
|
||
[tasks.post-test] | ||
dependencies=["verify-headers"] | ||
dependencies = ["verify-headers"] | ||
|
||
[tasks.post-build] | ||
dependencies=["gen-headers"] | ||
dependencies = ["gen-headers"] | ||
|
||
[tasks.clean] | ||
#dependencies=["clean-headers"] | ||
#dependencies=["clean-headers"] |