-
Notifications
You must be signed in to change notification settings - Fork 52
Add support for building on Windows #64
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
4770378
4c58d0d
f0d3d04
65a4be0
5dacca2
7211c96
5ffcbfa
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| REM @echo off | ||
| setlocal enabledelayedexpansion | ||
|
|
||
| REM Operate in the directory where this file is located | ||
| cd /d "%~dp0" | ||
|
|
||
| REM Updating Mathlib: We follow the instructions at | ||
| REM https://github.com/leanprover-community/mathlib4/wiki/Using-mathlib4-as-a-dependency#updating-mathlib4 | ||
|
|
||
| REM Note: we had once problems with the `lake-manifest` when a new dependency got added | ||
| REM to `mathlib`, we may need to add `rm lake-manifest.json` again if that's still a problem. | ||
|
|
||
| REM currently the mathlib post-update-hook is not good enough to update the lean-toolchain. | ||
| REM things break if the new lakefile is not valid in the old lean version | ||
| curl -L https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain -o lean-toolchain | ||
|
|
||
| REM note: mathlib has now a post-update hook that modifies the `lean-toolchain` | ||
| REM and calls `lake exe cache get`. | ||
|
|
||
| lake update -R | ||
| lake build | ||
| lake build Batteries |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @echo off | ||
| setlocal enabledelayedexpansion | ||
|
|
||
| REM Operate in the directory where this file is located | ||
| cd /d "%~dp0" | ||
|
|
||
| lake update -R | ||
| lake build |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
|
Collaborator
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 think we want to use mjs throughout the project?
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 have to rebase and try again probably. I worry, that a bit of time passed, and maybe something is stale here. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const { spawnSync } = require('child_process'); | ||
|
|
||
| // Change to ../Projects directory relative to this script | ||
| const baseDir = path.resolve(__dirname, '../Projects'); | ||
| process.chdir(baseDir); | ||
| const isWin = process.platform === 'win32'; | ||
| const buildScriptName = isWin ? 'build.cmd' : 'build.sh'; | ||
|
|
||
| // Iterate over subfolders in Projects | ||
| fs.readdirSync('.').forEach(folder => { | ||
| const folderPath = path.join(baseDir, folder); | ||
|
|
||
| if (fs.lstatSync(folderPath).isDirectory()) { | ||
|
|
||
| const buildScriptPath = path.join(folderPath, buildScriptName); | ||
|
|
||
| if (fs.existsSync(buildScriptPath)) { | ||
| const start = Date.now(); | ||
|
|
||
| console.log(`Start building ${folder}`); | ||
| if (!isWin) { | ||
| spawnSync('logger', ['-t', 'lean4web', `Start building ${folder}`]); | ||
| } | ||
|
|
||
| // Run the build script | ||
| const result = spawnSync('bash', [buildScriptPath], { stdio: 'inherit' }); | ||
|
|
||
| const duration = Math.floor((Date.now() - start) / 1000); | ||
| const minutes = Math.floor(duration / 60); | ||
| const seconds = duration % 60; | ||
|
|
||
| console.log(`Finished ${folder} in ${minutes}:${seconds < 10 ? '0' : ''}${seconds} min`); | ||
| if (!isWin) { | ||
| spawnSync('logger', ['-t', 'lean4web', `Finished ${folder} in ${minutes}:${seconds < 10 ? '0' : ''}${seconds} min`]); | ||
| } | ||
| } else { | ||
| console.log(`Skipping ${folder}: ${buildScriptName} missing`); | ||
| } | ||
| } | ||
| }); |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#64 (comment)