-
Notifications
You must be signed in to change notification settings - Fork 196
Parallel builds v2 #1522
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
Open
jmgomez
wants to merge
9
commits into
nim-lang:master
Choose a base branch
from
jmgomez:parallel_builds_v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Parallel builds v2 #1522
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
34af36f
Adds stew and results
jmgomez a2da799
Builds pkgs binaries in parallel for vnext
jmgomez e23b896
Fix binaries ci
jmgomez 86a0243
Attempt to fix ci
jmgomez 18e5886
Attempt to fix ci
jmgomez 857a02c
fixes issue
jmgomez a59ee80
Refactors {.cast(gcsafe).} to threadvars when possible
jmgomez 25d4243
Fixes a random/race condition issue in the CI. Refactor in preparatio…
jmgomez cc2595f
Attempt to fix random race cond in the CI
jmgomez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,39 @@ | ||
| # Async file operations using chronos async processes | ||
| # Similar to Node.js - uses external commands for file I/O | ||
|
|
||
| import std/os | ||
| import chronos except Duration | ||
| import chronos/asyncproc | ||
|
|
||
| export chronos except Duration | ||
| export asyncproc | ||
|
|
||
| proc copyFileAsync*(source, dest: string): Future[void] {.async: (raises: [CatchableError, AsyncProcessError, AsyncProcessTimeoutError, CancelledError]).} = | ||
| ## Async file copy using chronos async processes | ||
| when defined(windows): | ||
| # Windows: use xcopy for better handling | ||
| let cmd = "xcopy /Y /Q " & quoteShell(source) & " " & quoteShell(dest) & "*" | ||
| else: | ||
| # Unix: use cp command with preserve permissions and recursive for dirs | ||
| let cmd = "cp -f -p -r " & quoteShell(source) & " " & quoteShell(dest) | ||
|
|
||
| let exitCode = await execCommand(cmd) | ||
| if exitCode != 0: | ||
| raise newException(IOError, "Failed to copy file from " & source & " to " & dest & " (exit code: " & $exitCode & ")") | ||
|
|
||
| proc copyDirAsync*(sourceDir, destDir: string): Future[void] {.async: (raises: [CatchableError, AsyncProcessError, AsyncProcessTimeoutError, CancelledError]).} = | ||
| ## Async directory copy using chronos async processes - copies entire directory tree | ||
| when defined(windows): | ||
| # Windows: use robocopy for robust directory copying | ||
| # /E = copy subdirs including empty, /NFL = no file list, /NDL = no dir list, /NJH = no job header, /NJS = no job summary, /NC = no class, /NS = no size, /NP = no progress | ||
| let cmd = "robocopy " & quoteShell(sourceDir) & " " & quoteShell(destDir) & " /E /NFL /NDL /NJH /NJS /NC /NS /NP" | ||
| let exitCode = await execCommand(cmd) | ||
| # robocopy exit codes: 0-7 are success (0=no files, 1=files copied, 2=extra files, etc.) | ||
| if exitCode > 7: | ||
| raise newException(IOError, "Failed to copy directory from " & sourceDir & " to " & destDir & " (exit code: " & $exitCode & ")") | ||
| else: | ||
| # Unix: use cp -r to copy entire directory recursively | ||
| let cmd = "cp -r -p " & quoteShell(sourceDir) & "/. " & quoteShell(destDir) | ||
| let exitCode = await execCommand(cmd) | ||
| if exitCode != 0: | ||
| raise newException(IOError, "Failed to copy directory from " & sourceDir & " to " & destDir & " (exit code: " & $exitCode & ")") |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.