-
Notifications
You must be signed in to change notification settings - Fork 9
feat(taskfiles)!: Add checksum header comment; Update and refactor Boost tasks by:
#80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
be569ba
3a9334e
f807f1a
ffc0c06
9e41b40
3329f52
5572a89
c8d706c
aca9e63
aef0786
b0ea5bc
3d66108
6af0c39
ea102c7
7c9701d
a6f7922
9e3b981
6740397
b7849d9
3d82d19
6930c6f
a3fedaa
51c0ee8
77d6fea
955d6bd
df4f9cb
319771d
c745ba8
8959121
040b694
2240fd4
4bc7164
4fdc23e
23dd1e9
4997cf2
05b2d68
8d655c2
be5d231
a6297c9
0144e84
361f891
da843e9
1292184
cf02bb6
8a72950
2bb4119
96f7cfe
42f7495
1a2c692
d86541d
b03226c
058b867
74a07ba
bb1688b
6ddec14
7d96c0a
5ef2d31
dc829f2
f1c73f2
853afcf
a9cf000
6a959ee
78abea7
f09e083
4743a67
b6552d1
2afbc02
4dd002b
c72511e
394d45f
3b5a816
9c935f9
07b88fc
20802e7
a2ff6f4
194440e
3a92d53
c31ef24
07fd3e4
4ec6588
93a6296
5a230b9
01280e1
b6df417
882c5be
fbe8a72
8534c24
40d4579
bbb32bc
d53221e
3871d7d
35e3773
d07138e
53c12a4
95f680a
8363fc4
25cb0be
3bd67a0
94508f5
f1aaacf
51a1547
d9efd11
c678b74
40cf0b3
f425cc6
509bc3c
6773dcc
310401e
50e2f71
e5f700d
4f39d6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,36 +8,39 @@ set: ["u", "pipefail"] | |||||||||||||
| shopt: ["globstar"] | ||||||||||||||
|
|
||||||||||||||
| tasks: | ||||||||||||||
| # Generates `GENERATE_DIR` by copying `SOURCE_DIR` and then running boost's bootstrap step. | ||||||||||||||
| # Runs Boost's generate (bootstrap) step. | ||||||||||||||
| # A sentinel file is written to `SOURCE_DIR` and added to `generates` to explicitly track whether | ||||||||||||||
| # this task updated `SOURCE_DIR`. | ||||||||||||||
| # | ||||||||||||||
| # @param {string} SOURCE_DIR Project source directory. | ||||||||||||||
| # @param {string} GENERATE_DIR Directory in which to generate `b2` and the build configuration. | ||||||||||||||
| # @param {string} GENERATE_CHECKSUM_FILE Checksum file for `GENERATE_DIR`. | ||||||||||||||
| # @param {string} INSTALL_PREFIX Path prefix of where the project should be installed. | ||||||||||||||
| # @param {string} SOURCE_DIR Project source directory. | ||||||||||||||
| # @param {string[]} TARGETS Target libraries to build. | ||||||||||||||
| # @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the generate command. | ||||||||||||||
| # @param {string} [CHECKSUM_FILE={{.SOURCE_DIR}}.md5] Checksum file path for `SOURCE_DIR`. | ||||||||||||||
| # @param {string[]} [EXTRA_ARGS=[]] Any additional arguments to pass to the generate command. | ||||||||||||||
| generate: | ||||||||||||||
| internal: true | ||||||||||||||
| label: "{{.TASK}}:{{.SOURCE_DIR}}" | ||||||||||||||
| vars: | ||||||||||||||
| EXTRA_ARGS: | ||||||||||||||
| ref: "default (list) .EXTRA_ARGS" | ||||||||||||||
| CHECKSUM_FILE: >- | ||||||||||||||
| {{default (printf "%s.md5" .SOURCE_DIR) .CHECKSUM_FILE}} | ||||||||||||||
| SOURCE_SENTINEL_FILE: "{{.SOURCE_DIR}}/{{.TASK}}.sentinel" | ||||||||||||||
| requires: | ||||||||||||||
| vars: ["SOURCE_DIR", "GENERATE_DIR", "GENERATE_CHECKSUM_FILE", "INSTALL_PREFIX", "TARGETS"] | ||||||||||||||
| sources: | ||||||||||||||
| - "{{.SOURCE_DIR}}/**/*" | ||||||||||||||
| vars: | ||||||||||||||
| - "INSTALL_PREFIX" | ||||||||||||||
| - "SOURCE_DIR" | ||||||||||||||
| - "TARGETS" | ||||||||||||||
| sources: ["{{.TASKFILE}}"] | ||||||||||||||
| generates: | ||||||||||||||
| - "{{.GENERATE_CHECKSUM_FILE}}" | ||||||||||||||
| - "{{.CHECKSUM_FILE}}" | ||||||||||||||
| - "{{.SOURCE_SENTINEL_FILE}}" | ||||||||||||||
| dir: "{{.SOURCE_DIR}}" | ||||||||||||||
| deps: | ||||||||||||||
| - task: "checksum:validate" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.GENERATE_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: | ||||||||||||||
| - "{{.GENERATE_DIR}}" | ||||||||||||||
| CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.SOURCE_DIR}}"] | ||||||||||||||
| cmds: | ||||||||||||||
| - |- | ||||||||||||||
| rm -rf "{{.GENERATE_DIR}}" | ||||||||||||||
| cp -R "{{.SOURCE_DIR}}" "{{.GENERATE_DIR}}" | ||||||||||||||
| pushd "{{.GENERATE_DIR}}" | ||||||||||||||
| ./bootstrap.sh \ | ||||||||||||||
| --prefix="{{.INSTALL_PREFIX}}" \ | ||||||||||||||
| --exec-prefix="{{.INSTALL_PREFIX}}" \ | ||||||||||||||
|
|
@@ -46,36 +49,70 @@ tasks: | |||||||||||||
| {{.}} \ | ||||||||||||||
| {{- end}} | ||||||||||||||
| ; | ||||||||||||||
| popd | ||||||||||||||
| - "touch '{{.SOURCE_SENTINEL_FILE}}'" | ||||||||||||||
| - task: "checksum:compute" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.GENERATE_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: | ||||||||||||||
| - "{{.GENERATE_DIR}}" | ||||||||||||||
| CHECKSUM_FILE: "{{.CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.SOURCE_DIR}}"] | ||||||||||||||
|
|
||||||||||||||
| # Runs boost's b2 build and install step, and creates a CMake settings file. The caller must have | ||||||||||||||
| # previously called `generate` on `SOURCE_DIR` (to produce the `GENERATE_DIR`) for this task to | ||||||||||||||
| # succeed. | ||||||||||||||
| # Runs Boost's combined b2 build and install step. | ||||||||||||||
| # Fails if the caller has not successfully called `generate` on `SOURCE_DIR`. | ||||||||||||||
| # A sentinel file is written to `SOURCE_DIR` and added to `generates` to explicitly track whether | ||||||||||||||
| # this task updated `SOURCE_DIR`. | ||||||||||||||
| # | ||||||||||||||
| # @param {string} GENERATE_DIR Directory containing boost's source and build files. | ||||||||||||||
| # Required parameters | ||||||||||||||
| # @param {string} BUILD_DIR Directory in which to build boost. | ||||||||||||||
| # @param {string} INSTALL_PREFIX Path prefix of where the project should be installed. | ||||||||||||||
| # @param {string[]} [EXTRA_ARGS] Any additional arguments to pass to the build command. | ||||||||||||||
| # @param {int} [JOBS] The maximum number of concurrent processes to use when building. If | ||||||||||||||
| # omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the | ||||||||||||||
| # @param {string} SOURCE_DIR Directory containing boost's source and build files. | ||||||||||||||
| # | ||||||||||||||
| # Checksum parameters | ||||||||||||||
| # @param {string} [BUILD_CHECKSUM_FILE={{.BUILD_DIR}}.md5] Checksum file path for `BUILD_DIR`. | ||||||||||||||
| # @param {string} [INSTALL_CHECKSUM_FILE={{.INSTALL_PREFIX}}.md5] Checksum file path for | ||||||||||||||
| # `INSTALL_PREFIX` | ||||||||||||||
| # @param {string} [SOURCE_CHECKSUM_FILE={{.SOURCE_DIR}}.md5] Checksum file path for `SOURCE_DIR`. | ||||||||||||||
| # | ||||||||||||||
| # b2 parameters | ||||||||||||||
| # @param {string[]} [EXTRA_ARGS=[]] Any additional arguments to pass to the build command. | ||||||||||||||
| # @param {int} [JOBS=0] The maximum number of concurrent processes to use when building. If 0, the | ||||||||||||||
| # b2 flag is ommitted and the default is used. Before 1.76.0, the number was 1. Since 1.76.0, the | ||||||||||||||
| # default is the number of cores. | ||||||||||||||
|
Comment on lines
+76
to
78
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: "ommitted" → "omitted". Same typo appears on line 158. 📝 Proposed fix- # b2 flag is ommitted and the default is used. Before 1.76.0, the number was 1. Since 1.76.0, the
+ # b2 flag is omitted and the default is used. Before 1.76.0, the number was 1. Since 1.76.0, the📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| # @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings | ||||||||||||||
| # file should be stored. | ||||||||||||||
| build-and-install: | ||||||||||||||
| internal: true | ||||||||||||||
| label: "{{.TASK}}:{{.BUILD_DIR}}-{{.INSTALL_PREFIX}}" | ||||||||||||||
| vars: | ||||||||||||||
| EXTRA_ARGS: | ||||||||||||||
| ref: "default (list) .EXTRA_ARGS" | ||||||||||||||
| JOBS: >- | ||||||||||||||
| {{default "" .JOBS}} | ||||||||||||||
| BUILD_CHECKSUM_FILE: >- | ||||||||||||||
| {{default (printf "%s.md5" .BUILD_DIR) .BUILD_CHECKSUM_FILE}} | ||||||||||||||
| INSTALL_CHECKSUM_FILE: >- | ||||||||||||||
| {{default (printf "%s.md5" .INSTALL_PREFIX) .INSTALL_CHECKSUM_FILE}} | ||||||||||||||
| SOURCE_CHECKSUM_FILE: >- | ||||||||||||||
| {{default (printf "%s.md5" .SOURCE_DIR) .SOURCE_CHECKSUM_FILE}} | ||||||||||||||
| SOURCE_SENTINEL_FILE: "{{.SOURCE_DIR}}/{{.TASK}}.sentinel" | ||||||||||||||
| requires: | ||||||||||||||
| vars: ["GENERATE_DIR", "BUILD_DIR", "INSTALL_PREFIX"] | ||||||||||||||
| dir: "{{.GENERATE_DIR}}" | ||||||||||||||
| vars: | ||||||||||||||
| - "BUILD_DIR" | ||||||||||||||
| - "INSTALL_PREFIX" | ||||||||||||||
| - "SOURCE_DIR" | ||||||||||||||
| sources: ["{{.TASKFILE}}"] | ||||||||||||||
| generates: | ||||||||||||||
| - "{{.BUILD_CHECKSUM_FILE}}" | ||||||||||||||
| - "{{.INSTALL_CHECKSUM_FILE}}" | ||||||||||||||
| - "{{.SOURCE_CHECKSUM_FILE}}" | ||||||||||||||
| - "{{.SOURCE_SENTINEL_FILE}}" | ||||||||||||||
| dir: "{{.SOURCE_DIR}}" | ||||||||||||||
| deps: | ||||||||||||||
davidlion marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| - task: "checksum:validate" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.BUILD_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.BUILD_DIR}}"] | ||||||||||||||
| - task: "checksum:validate" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.INSTALL_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.INSTALL_PREFIX}}"] | ||||||||||||||
| - task: "checksum:validate" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.SOURCE_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.SOURCE_DIR}}"] | ||||||||||||||
| FAIL_ON_ERROR: "true" | ||||||||||||||
| cmds: | ||||||||||||||
davidlion marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| - |- | ||||||||||||||
| ./b2 install \ | ||||||||||||||
|
|
@@ -87,102 +124,80 @@ tasks: | |||||||||||||
| -j{{.JOBS}} \ | ||||||||||||||
| {{- end}} | ||||||||||||||
| ; | ||||||||||||||
| - >- | ||||||||||||||
| {{- if .CMAKE_SETTINGS_DIR}} | ||||||||||||||
| echo "set(Boost_ROOT | ||||||||||||||
| \"{{.INSTALL_PREFIX}}\" | ||||||||||||||
| CACHE PATH | ||||||||||||||
| \"Package root for Boost.\" | ||||||||||||||
| )" >> "{{.CMAKE_SETTINGS_DIR}}/Boost.cmake" | ||||||||||||||
| {{- end}} | ||||||||||||||
| - "touch '{{.SOURCE_SENTINEL_FILE}}'" | ||||||||||||||
| - task: "checksum:compute" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.BUILD_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.BUILD_DIR}}"] | ||||||||||||||
| - task: "checksum:compute" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.INSTALL_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.INSTALL_PREFIX}}"] | ||||||||||||||
| - task: "checksum:compute" | ||||||||||||||
| vars: | ||||||||||||||
| CHECKSUM_FILE: "{{.SOURCE_CHECKSUM_FILE}}" | ||||||||||||||
| INCLUDE_PATTERNS: ["{{.SOURCE_DIR}}"] | ||||||||||||||
|
|
||||||||||||||
davidlion marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| # Downloads boost from `URL` and installs boost. | ||||||||||||||
| # | ||||||||||||||
| # General parameters | ||||||||||||||
| # @param {string} [WORK_DIR={{.ROOT_DIR}}] Base directory in which to store the source, generate, | ||||||||||||||
| # build, and install directories. | ||||||||||||||
| # @param {string} [SOURCE_DIR={{.WORK_DIR}}/boost-src] Directory in which to extract the tar | ||||||||||||||
| # file. | ||||||||||||||
| # | ||||||||||||||
| # Download parameters | ||||||||||||||
| # @param {string} FILE_SHA256 Content hash to verify the downloaded tar file against. | ||||||||||||||
| # @param {string} URL | ||||||||||||||
| # Downloads Boost from `TAR_URL` and then generates, builds, and installs Boost inside `WORK_DIR`. | ||||||||||||||
| # If `CMAKE_SETTINGS_DIR` is set, a settings file will be created in that directory, containing a | ||||||||||||||
| # `Boost_ROOT` CMake variable that points to the installation. | ||||||||||||||
| # | ||||||||||||||
| # Boost generate parameters | ||||||||||||||
| # @param {string} [GENERATE_DIR={{.WORK_DIR}}/boost-generate] Directory in which to generate the | ||||||||||||||
| # project build files. | ||||||||||||||
| # @param {string} [GENERATE_CHECKSUM_FILE={{.WORK_DIR}}/boost-generate.md5] Checksum file for the | ||||||||||||||
| # generate directory. | ||||||||||||||
| # @param {string} [INSTALL_PREFIX={{.WORK_DIR}}/boost-install] Path prefix of where the project | ||||||||||||||
| # should be installed. | ||||||||||||||
| # @param {string[]} [TARGETS] Target libraries to build. | ||||||||||||||
| # @param {string[]} [GENERATE_ARGS] Any additional arguments to pass to the generate command. | ||||||||||||||
| # Required parameters | ||||||||||||||
| # @param {string} TAR_SHA256 Content hash to verify the downloaded tar file against. | ||||||||||||||
| # @param {string} TAR_URL URL of the tar file to download. | ||||||||||||||
| # @param {string[]} TARGETS Target libraries to build. | ||||||||||||||
| # @param {string} WORK_DIR Directory in which to store the source, build, and install directories. | ||||||||||||||
| # | ||||||||||||||
| # Boost build-and-install parameters | ||||||||||||||
| # @param {string} [BUILD_DIR={{.WORK_DIR}}/boost-build] Directory in which to build the project. | ||||||||||||||
| # @param {int} [JOBS] The maximum number of concurrent processes to use when building. If | ||||||||||||||
| # omitted, the b2 default number is used. Before 1.76.0, the number was 1. Since 1.76.0, the | ||||||||||||||
| # default is the number of cores. | ||||||||||||||
| # @param {string[]} [BUILD_AND_INSTALL_ARGS] Any additional arguments to pass to boost's build | ||||||||||||||
| # Boost parameters | ||||||||||||||
| # @param {string[]} [BUILD_AND_INSTALL_ARGS=[]] Any additional arguments to pass to boost's build | ||||||||||||||
| # and install command. | ||||||||||||||
| # @param {string} [CMAKE_SETTINGS_DIR] If set, the directory where the project's CMake settings | ||||||||||||||
| # @param {string} [CMAKE_SETTINGS_DIR=""] If set, the directory where the project's CMake settings | ||||||||||||||
| # file should be stored. | ||||||||||||||
| # @param {string[]} [GENERATE_ARGS=[]] Any additional arguments to pass to the generate command. | ||||||||||||||
| # @param {int} [JOBS=0] The maximum number of concurrent processes to use when building. If 0, the | ||||||||||||||
| # b2 flag is ommitted and the default is used. Before 1.76.0, the number was 1. Since 1.76.0, the | ||||||||||||||
| # default is the number of cores. | ||||||||||||||
| download-and-install: | ||||||||||||||
| internal: true | ||||||||||||||
| label: "{{.TASK}}:{{.URL}}-{{.INSTALL_PREFIX}}" | ||||||||||||||
| label: "{{.TASK}}:{{.TAR_URL}}-{{.WORK_DIR}}" | ||||||||||||||
| vars: | ||||||||||||||
| # General parameters | ||||||||||||||
| WORK_DIR: >- | ||||||||||||||
| {{default .ROOT_DIR .WORK_DIR}} | ||||||||||||||
| SOURCE_DIR: >- | ||||||||||||||
| {{default (printf "%s/boost-src" .WORK_DIR) .SOURCE_DIR}} | ||||||||||||||
|
|
||||||||||||||
| # Boost generate parameters | ||||||||||||||
| GENERATE_DIR: >- | ||||||||||||||
| {{default (printf "%s/boost-generate" .WORK_DIR) .GENERATE_DIR}} | ||||||||||||||
| GENERATE_CHECKSUM_FILE: >- | ||||||||||||||
| {{default (printf "%s/boost-generate.md5" .WORK_DIR) .GENERATE_CHECKSUM_FILE}} | ||||||||||||||
| INSTALL_PREFIX: >- | ||||||||||||||
| {{default (printf "%s/boost-install" .WORK_DIR) .INSTALL_PREFIX}} | ||||||||||||||
| TARGETS: | ||||||||||||||
| ref: "default (list) .TARGETS" | ||||||||||||||
| GENERATE_ARGS: | ||||||||||||||
| ref: "default (list) .GENERATE_ARGS" | ||||||||||||||
|
|
||||||||||||||
| # Boost build-and-install parameters | ||||||||||||||
| BUILD_DIR: >- | ||||||||||||||
| {{default (printf "%s/boost-build" .WORK_DIR) .BUILD_DIR}} | ||||||||||||||
| BUILD_AND_INSTALL_ARGS: | ||||||||||||||
| ref: "default (list) .BUILD_AND_INSTALL_ARGS" | ||||||||||||||
| JOBS: >- | ||||||||||||||
| {{default "" .JOBS}} | ||||||||||||||
| CMAKE_SETTINGS_DIR: >- | ||||||||||||||
| {{default "" .CMAKE_SETTINGS_DIR}} | ||||||||||||||
| BUILD_DIR: "{{.WORK_DIR}}/boost-build" | ||||||||||||||
| EXTRACTION_DIR: "{{.WORK_DIR}}/boost-extracted" | ||||||||||||||
| INSTALL_PREFIX: "{{.WORK_DIR}}/boost-install" | ||||||||||||||
| requires: | ||||||||||||||
| vars: ["FILE_SHA256", "URL"] | ||||||||||||||
| vars: | ||||||||||||||
| - "TAR_SHA256" | ||||||||||||||
| - "TAR_URL" | ||||||||||||||
| - "TARGETS" | ||||||||||||||
| - "WORK_DIR" | ||||||||||||||
| deps: | ||||||||||||||
| - task: "remote:download-and-extract-tar" | ||||||||||||||
| vars: | ||||||||||||||
| FILE_SHA256: "{{.FILE_SHA256}}" | ||||||||||||||
| OUTPUT_DIR: "{{.SOURCE_DIR}}" | ||||||||||||||
| URL: "{{.URL}}" | ||||||||||||||
| FILE_SHA256: "{{.TAR_SHA256}}" | ||||||||||||||
| OUTPUT_DIR: "{{.EXTRACTION_DIR}}" | ||||||||||||||
| URL: "{{.TAR_URL}}" | ||||||||||||||
| cmds: | ||||||||||||||
| - task: "generate" | ||||||||||||||
| vars: | ||||||||||||||
| SOURCE_DIR: "{{.SOURCE_DIR}}" | ||||||||||||||
| GENERATE_DIR: "{{.GENERATE_DIR}}" | ||||||||||||||
| GENERATE_CHECKSUM_FILE: "{{.GENERATE_CHECKSUM_FILE}}" | ||||||||||||||
| INSTALL_PREFIX: "{{.INSTALL_PREFIX}}" | ||||||||||||||
| SOURCE_DIR: "{{.EXTRACTION_DIR}}" | ||||||||||||||
| TARGETS: | ||||||||||||||
| ref: ".TARGETS" | ||||||||||||||
| EXTRA_ARGS: | ||||||||||||||
| ref: ".GENERATE_ARGS" | ||||||||||||||
| - task: "build-and-install" | ||||||||||||||
| vars: | ||||||||||||||
| GENERATE_DIR: "{{.GENERATE_DIR}}" | ||||||||||||||
| BUILD_DIR: "{{.BUILD_DIR}}" | ||||||||||||||
| INSTALL_PREFIX: "{{.INSTALL_PREFIX}}" | ||||||||||||||
| SOURCE_DIR: "{{.EXTRACTION_DIR}}" | ||||||||||||||
| EXTRA_ARGS: | ||||||||||||||
| ref: ".BUILD_AND_INSTALL_ARGS" | ||||||||||||||
| JOBS: "{{.JOBS}}" | ||||||||||||||
| CMAKE_SETTINGS_DIR: "{{.CMAKE_SETTINGS_DIR}}" | ||||||||||||||
| - >- | ||||||||||||||
| {{- if .CMAKE_SETTINGS_DIR}} | ||||||||||||||
| echo "set(Boost_ROOT | ||||||||||||||
| \"{{.INSTALL_PREFIX}}\" | ||||||||||||||
| CACHE PATH | ||||||||||||||
| \"Package root for Boost.\" | ||||||||||||||
| )" > "{{.CMAKE_SETTINGS_DIR}}/Boost.cmake" | ||||||||||||||
| {{- end}} | ||||||||||||||
davidlion marked this conversation as resolved.
Show resolved
Hide resolved
davidlion marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,45 @@ | ||
| version: "3" | ||
|
|
||
| set: ["u", "pipefail"] | ||
| shopt: ["globstar"] | ||
|
Comment on lines
+3
to
+4
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know we removed these in the last PR, but after some debate it is easier to have our guideline be to just always include these lines despite them only doing anything in the root taskfile. I'll update the guidelines when I get a chance. Sorry. |
||
|
|
||
| # The checksum tasks are a robust way for a task to decided whether or not it should run. | ||
| # | ||
| # For many tasks it is not feasible to list out all files in `sources` and `generates`. These tasks | ||
| # provide a way to `compute` a checksum for the contents of directories/files and `validate` whether | ||
| # the contents still match the checksum in later runs. | ||
| # | ||
| # When creating a checksum a task should: | ||
| # | ||
| # a. Call the `compute` task at the end to create the checksum file. | ||
| # b. Call `validate` in `deps` to verify the checksum file matches the current contents. | ||
| # - `validate` will delete the checksum file if there is no match. | ||
| # c. Add the checksum file to `generates`. This ensures the task runs if: | ||
| # - The task has not run before. | ||
| # - `validate` deleted the checksum file as the contents did not match. | ||
| # | ||
| # When multiple tasks mutate the same contents, each task updates the checksum file and also tracks | ||
| # whether it has run or not by creating a sentinel file. | ||
| # | ||
| # a. Before calling `compute`, create a sentinel file with a name unique to the task. | ||
| # b. Add the sentinel file to `generates`. This ensures the task runs if: | ||
| # - The checksum file exists and matches the contents, but this task has not been run. | ||
| # | ||
| # Additional guidelines: | ||
| # | ||
| # - When creating a directory that will be included in a checksum, always delete any existing | ||
| # contents first. | ||
| # - This ensures that if the contents diverge from the checksum file, the task is re-run with no | ||
| # stale data. | ||
| # - If task, A, implicitly depends on task, B, but A does not call `B` in `deps`, it is possible | ||
| # for a user to run A without having run B. A can ensure it fails gracefully by calling `validate` | ||
| # on B's checksum with `FAIL_ON_ERROR: "true"`. | ||
|
|
||
| tasks: | ||
| # Compute the checksum of the given path include/exclude patterns, saving the result to | ||
| # `CHECKSUM_FILE`. The calling task can set `IGNORE_ERROR` to "true" if they wish to continue if | ||
| # checksum computation fails. | ||
| # | ||
| # Note that using this task without setting `pipefail` in the root taskfile will cause `tar` | ||
| # failures to be ignored. | ||
| # | ||
| # @param {string} CHECKSUM_FILE | ||
| # @param {string[]} INCLUDE_PATTERNS Path wildcard patterns to compute the checksum for. | ||
| # @param {string[]} [EXCLUDE_PATTERNS=[]] Path wildcard patterns, relative to any | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.