diff options
| -rw-r--r-- | .github/workflows/ci.yml | 8 | ||||
| -rw-r--r-- | .github/workflows/nightly.yml | 10 | ||||
| -rw-r--r-- | build.bat | 12 | ||||
| -rwxr-xr-x | build.sh | 32 | ||||
| -rw-r--r-- | ci.bat | 16 | ||||
| -rw-r--r-- | ci.sh | 39 |
6 files changed, 65 insertions, 52 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d4132a..348a73c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat cd Odin - ./build.bat 1 + ./ci.bat 1 - name: Build ols shell: cmd - run: ./build.bat CI + run: ./ci.bat CI linux: strategy: matrix: @@ -53,7 +53,7 @@ jobs: git clone --depth 1 https://github.com/odin-lang/Odin cd Odin && ./build_odin.sh release - name: Build ols - run: ./build.sh CI + run: ./ci.sh CI macos: strategy: @@ -75,4 +75,4 @@ jobs: git clone --depth 1 https://github.com/odin-lang/Odin cd Odin && ./build_odin.sh release - name: Build ols - run: ./build.sh CI + run: ./ci.sh CI diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0f1aac0..344e2f8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,7 +24,7 @@ jobs: cd Odin ./build_odin.sh release - name: Build ols - run: ./build.sh CI_NO_TESTS -target:darwin_arm64 -extra-linker-flags:"--target=arm64-apple-macos" + run: ./ci.sh CI_NO_TESTS -target:darwin_arm64 -extra-linker-flags:"--target=arm64-apple-macos" - name: Move to Dist run: | mkdir dist @@ -54,7 +54,7 @@ jobs: cd Odin make release - name: Build ols - run: ./build.sh CI + run: ./ci.sh CI - name: Move to Dist run: | mkdir dist @@ -84,7 +84,7 @@ jobs: cd Odin ./build_odin.sh release - name: Build ols - run: ./build.sh CI + run: ./ci.sh CI - name: Move to Dist run: | mkdir dist @@ -109,10 +109,10 @@ jobs: run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat cd Odin - ./build.bat 1 + ./ci.bat 1 - name: Build ols shell: cmd - run: ./build.bat CI + run: ./ci.bat CI - name: Move to Dist shell: cmd run: | @@ -1,17 +1,7 @@ @echo off
setlocal enabledelayedexpansion
-if "%1" == "CI" (
- set "PATH=%cd%\Odin;!PATH!"
-
- rem odin test tests -collection:src=src -define:ODIN_TEST_THREADS=1
- rem if %errorlevel% neq 0 exit /b 1
-
- odin build src\ -collection:src=src -out:ols.exe -o:speed
-
- call "tools/odinfmt/tests.bat"
- if %errorlevel% neq 0 exit /b 1
-) else if "%1" == "test" (
+if "%1" == "test" (
odin test tests -collection:src=src -debug -define:ODIN_TEST_THREADS=1
) else if "%1" == "single_test" (
odin test tests -collection:src=src -define:ODIN_TEST_NAMES=%2 -debug
@@ -1,38 +1,6 @@ #!/usr/bin/env bash -if [[ $1 == "CI" ]] -then - shift - - export PATH=$PATH:$PWD/Odin - #BUG in odin test, it makes the executable with the same name as a folder and gets confused. - cd tests - - odin test ../tests -collection:src=../src -o:speed $@ -define:ODIN_TEST_THREADS=1 - - if ([ $? -ne 0 ]) - then - echo "Ols tests failed" - exit 1 - fi - - cd .. - - tools/odinfmt/tests.sh - - if ([ $? -ne 0 ]) - then - echo "Odinfmt tests failed" - exit 1 - fi -fi -if [[ $1 == "CI_NO_TESTS" ]] -then - shift - - export PATH=$PATH:$PWD/Odin -fi if [[ $1 == "single_test" ]] then shift @@ -0,0 +1,16 @@ +@echo off + +setlocal enabledelayedexpansion +if "%1" == "CI" ( + set "PATH=%cd%\Odin;!PATH!" + + rem odin test tests -collection:src=src -define:ODIN_TEST_THREADS=1 + rem if %errorlevel% neq 0 exit /b 1 + + odin build src\ -collection:src=src -out:ols.exe -o:speed + + call "tools/odinfmt/tests.bat" + if %errorlevel% neq 0 exit /b 1 +) else ( + odin build src\ -collection:src=src -out:ols.exe -o:speed -no-bounds-check +)
\ No newline at end of file @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + + +if [[ $1 == "CI" ]] +then + shift + + export PATH=$PATH:$PWD/Odin + #BUG in odin test, it makes the executable with the same name as a folder and gets confused. + cd tests + + odin test ../tests -collection:src=../src -o:speed $@ -define:ODIN_TEST_THREADS=1 + + if ([ $? -ne 0 ]) + then + echo "Ols tests failed" + exit 1 + fi + + cd .. + + tools/odinfmt/tests.sh + + if ([ $? -ne 0 ]) + then + echo "Odinfmt tests failed" + exit 1 + fi +fi + +if [[ $1 == "CI_NO_TESTS" ]] +then + shift + + export PATH=$PATH:$PWD/Odin +fi + + +odin build src/ -show-timings -collection:src=src -out:ols -no-bounds-check -o:speed $@ |