Skip to content

Commit

Permalink
Switch to using rust-build-tools submodule
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 7f68fde17009d2a9dd7569b34e8af94e3b502a36
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 22:06:27 2024 -0400

    Some more changes I forgot about

commit 852d9f6400b983b832f5a3ada57e4a362fe29bf1
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 22:05:45 2024 -0400

    Minor: submodule update

commit 86b3bbf3d0b7eab3012771982d8f1b03f3bd3d40
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 22:01:47 2024 -0400

    Remove parts that are now implemented in build-tools

commit d049ddf9e4d465e345fbe14c5fc0554caf782376
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 22:00:39 2024 -0400

    Minor: submodule update

commit 4026844f5b248dc13763f821c2b21c1011420dc9
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 21:51:52 2024 -0400

    Minor: submodule update

commit 3d57cb7dfe903ba7e4589058bb2178e4ed4bfc74
Author: Vadim Belman <vrurg@users.noreply.github.com>
Date:   Sat Oct 19 21:51:11 2024 -0400

    Minor: submodule update
  • Loading branch information
vrurg committed Oct 20, 2024
1 parent af0c877 commit a6e65e1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 119 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
.vscode/
Cargo.lock
.release-tested
93 changes: 9 additions & 84 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,113 +1,38 @@
extend = "build-tools/makefile.toml"

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
__FIELDX_DEFAULT_TOOLCHAIN__ = { value = "nightly", condition = { env_not_set = ["__FIELDX_DEFAULT_TOOLCHAIN__"] } }
__FIELDX_TASK__ = { value = "test", condition = { env_not_set = ["__FIELDX_TASK__"] } }
__FIELDX_TOOLCHAINS__ = "1.77 1.78 stable beta nightly"
__MAKE_README_CRATE_ROOT__ = "core"
__MAKE_TEST_TASKS__ = "test-default test-serde test-send_guard test-all-features"
__MAKE_TOOLCHAINS__ = "1.77 1.78 stable beta nightly"

[config]
default_to_workspace = false

[tasks.test]
category = "Test"
clear = true
dependencies = ["test-default", "test-serde", "test-send_guard", "test-all-features"]
description = "Extensive testing"

[tasks.test-versions]
description = "TESTING SUPPORTED Rust VERSIONS"
script = '''
toolchain_list = array %{__FIELDX_TOOLCHAINS__}
for toolchain in ${toolchain_list}
echo Testing toolchain '${toolchain}'
set_env __FIELDX_DEFAULT_TOOLCHAIN__ ${toolchain}
rm Cargo.lock
cm_run_task ${__FIELDX_TASK__}
end
'''
script_runner = "@duckscript"

[tasks.update-versions]
description = "Updating .stderr for all versions"
env = { TRYBUILD = "overwrite", __FIELDX_TASK__ = "test-compilation" }
run_task = { name = ["test-versions"] }

[tasks.test-default]
args = ["test", "--workspace"]
category = "Test"
command = "cargo"
description = "Test with only the default features"
toolchain = "${__FIELDX_DEFAULT_TOOLCHAIN__}"
toolchain = "${__MAKE_DEFAULT_TOOLCHAIN__}"

[tasks.test-serde]
args = ["test", "--workspace", "--features", "serde"]
category = "Test"
command = "cargo"
description = "Test with 'serde' feature"
toolchain = "${__FIELDX_DEFAULT_TOOLCHAIN__}"
toolchain = "${__MAKE_DEFAULT_TOOLCHAIN__}"

[tasks.test-send_guard]
args = ["test", "--workspace", "--features", "send_guard"]
category = "Test"
command = "cargo"
description = "Test with 'serde' feature"
toolchain = "${__FIELDX_DEFAULT_TOOLCHAIN__}"
toolchain = "${__MAKE_DEFAULT_TOOLCHAIN__}"

[tasks.test-all-features]
args = ["test", "--workspace", "--all-features"]
category = "Test"
command = "cargo"
description = "Test with all features enabled"
toolchain = "${__FIELDX_DEFAULT_TOOLCHAIN__}"

[tasks.test-compilation]
description = "Run only the compilation test"
script = '''
echo Skipping compilation test for ${__FIELDX_DEFAULT_TOOLCHAIN__} in ${CARGO_MAKE_WORKING_DIRECTORY}
'''
script_runner = "@duckscript"
workspace = true

[tasks.depends]
description = "Install necessary dependencies and tools"
script = '''
echo "Installing dependencies"
exec cargo install cargo-readme
'''
script_runner = "@duckscript"

[tasks.doc]
description = "Build documentation"
script = '''
readme_content = exec --fail-on-error cargo readme -r core --template ../README.tpl
writefile ./README.md ${readme_content.stdout}
'''
script_runner = "@duckscript"

[tasks.publish]
clear = true
dependencies = ["test-versions", "doc"]
description = "Publish on crates.io"
script = '''
print -bgc red -c black " ► "
print -bgc black -c white " Do you want to publish the crates? "
print -s bold "(y/N)"
echo " "
reply = read
reply = lowercase ${reply}
if eq ${reply} "y"
exec --fail-on-error cargo release -x --no-confirm
else
echo "Won't publish."
end
'''
script_runner = "@duckscript"

[tasks.pre-release]
clear = true
description = "Produce CHANGELOG.md"
script = """
cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}
exec --fail-on-error git cliff -o CHANGELOG.md --tag ${CARGO_RELEASE_VERSION}
"""
script_runner = "@duckscript"
toolchain = "${__MAKE_DEFAULT_TOOLCHAIN__}"
11 changes: 0 additions & 11 deletions README.tpl

This file was deleted.

2 changes: 1 addition & 1 deletion build-tools
Submodule build-tools updated 4 files
+11 −0 README.tpl
+26 −0 makefile.ds
+205 −0 makefile.toml
+20 −0 release.toml
23 changes: 0 additions & 23 deletions release.toml

This file was deleted.

0 comments on commit a6e65e1

Please sign in to comment.