summaryrefslogtreecommitdiffstats
path: root/cmake/GitHubRelease.cmake
Commit message (Collapse)AuthorAge
* format cmake files (#5406)Ellie Hermaszewska2024-10-29
| | | | | | | | | * format cmake files * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Make slang-llvm fetching and failure more robust (#5346)Ellie Hermaszewska2024-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make slang-llvm fetching and failure more robust Improve error reporting when things go wrong. Fall back by default to a non-llvm build Closes https://github.com/shader-slang/slang/issues/5247 Tested sensible behavior with: - `FETCH_BINARY_IF_POSSIBLE`, valid tag - No errors or warnings, successful build with llvm - `FETCH_BINARY_IF_POSSIBLE`, no valid tag - Warning message, successful llvm build with slang-llvm from latest release - `FETCH_BINARY_IF_POSSIBLE`, no valid tag, bad `SLANG_SLANG_LLVM_BINARY_URL` specified - Warning message, successful no-llvm build - `FETCH_BINARY_IF_POSSIBLE`, no valid tag, unable to fetch release information - Warning message, successful no-llvm build - `FETCH_BINARY`, valid tag - No errors or warnings, successful build with llvm - `FETCH_BINARY`, no valid tag - Warning message, successful llvm build with slang-llvm from latest release - `FETCH_BINARY`, no valid tag, bad `SLANG_SLANG_LLVM_BINARY_URL` specified - Error, explaining that we couldn't fetch it - `FETCH_BINARY`, no valid tag, unable to fetch release info - Error, explaining that we couldn't fetch it * Allow downloading from a local file --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Use GITHUB_TOKEN if set (#5070)Jay Kwak2024-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | * Use GITHUB_TOKEN if set We have been having an error from Github saying that API rate limit exceeded for IP. It hits the limit more often if your public IP is shared by many other collegues. {"message":"API rate limit exceeded for 216.228.112.22. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"} The suggested solution from GitHub is to use gh.exe tool with "auth login" arguments. It will store a token and allow us to use API more than the limit set for IP without token. However, our cmake build doesn't use gh.exe and API is called via REST. This commit adds an extra header to the HTTP request with the infomration of the github token if the value is. Usage: cmake.exe --preset vs2019 -DSLANG_GITHUB_TOKEN=your_token_here * Adding a warning message to use LANG_GITHUB_TOKEN --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Dont require llvm for building generators (#4895)Ellie Hermaszewska2024-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Dont require llvm for building generators * Fetch slang-llvm.so from correct release (#4847) * Fetch slang-llvm.so from correct release Closes https://github.com/shader-slang/slang/issues/4648 Should close https://github.com/shader-slang/slang/issues/4812 * Update docs * Correct documentation on cmake option * Neaten cmake script * Fix fetching on windows --------- Co-authored-by: Yong He <yonghe@outlook.com> * Be a bit more careful dealing with release list fetching failure * clarify error messages --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Revert "Fetch slang-llvm.so from correct release (#4847)" (#4893)Yong He2024-08-20
| | | This reverts commit 579d59c761cb0460701e0e820eb066275fe357b3.
* Fetch slang-llvm.so from correct release (#4847)Ellie Hermaszewska2024-08-20
* Fetch slang-llvm.so from correct release Closes https://github.com/shader-slang/slang/issues/4648 Should close https://github.com/shader-slang/slang/issues/4812 * Update docs * Correct documentation on cmake option * Neaten cmake script * Fix fetching on windows --------- Co-authored-by: Yong He <yonghe@outlook.com>