blob: f43b5126819c861498f24d250672b10c4e7b5974 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
@echo off
setlocal enabledelayedexpansion
if not defined OLS_VERSION (
for /f %%a in ('git rev-parse --short HEAD 2^>NUL') do set commit_hash=%%a
for /f %%d in ('powershell -command "[DateTime]::UtcNow.ToString('yyyy-MM-dd')"') do set today=%%d
set "OLS_VERSION=nightly-!today!-!commit_hash!"
)
if "%1" == "CI" (
set "PATH=%cd%\Odin;!PATH!"
odin test tests -collection:src=src -define:ODIN_TEST_THREADS=1
if %errorlevel% neq 0 exit /b 1
odin build src\ -collection:src=src -out:ols.exe -o:speed -no-bounds-check -extra-linker-flags:"/STACK:4000000,2000000" -define:VERSION=%OLS_VERSION%
pushd .
call "tools/odinfmt/tests.bat"
if %errorlevel% neq 0 exit /b 1
popd
odin build tools\odinfmt\main.odin -file -collection:src=src -out:odinfmt.exe -o:speed -no-bounds-check -extra-linker-flags:"/STACK:4000000,2000000"
) else (
odin build src\ -collection:src=src -out:ols.exe -o:speed -no-bounds-check -extra-linker-flags:"/STACK:4000000,2000000" -define:VERSION=%OLS_VERSION%
odin build tools\odinfmt\main.odin -file -collection:src=src -out:odinfmt.exe -o:speed -no-bounds-check -extra-linker-flags:"/STACK:4000000,2000000"
)
|