mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-04 22:57:43 -05:00
I found out in the Kotlin branch that GitHub Actions only checks for error codes in the last step of the Windows commands it executes. I moved all the command line steps into a batch file generate\commit_hook.bat. It does all the error checking itself.
36 lines
1.1 KiB
Batchfile
36 lines
1.1 KiB
Batchfile
@echo off
|
|
REM --------------------------------------------------------------------------------
|
|
REM Astronomy Engine - GitHub Actions steps for Windows.
|
|
REM This batch file is executed on every push to GitHub.
|
|
REM --------------------------------------------------------------------------------
|
|
|
|
REM Change to project/repo root directory.
|
|
cd %~dp0\..
|
|
echo.commit_hook: Repo root = %cd%
|
|
|
|
echo.commit_hook: Installing Python linter.
|
|
python -m pip install --upgrade pip
|
|
if errorlevel 1 (exit /b 1)
|
|
pip install pylint
|
|
if errorlevel 1 (exit /b 1)
|
|
|
|
echo.commit_hook: Installing Doxygen.
|
|
md bin
|
|
cd bin
|
|
curl -o doxygen.zip https://www.doxygen.nl/files/doxygen-1.9.3.windows.x64.bin.zip
|
|
if errorlevel 1 (exit /b 1)
|
|
7z x doxygen.zip
|
|
if errorlevel 1 (exit /b 1)
|
|
del doxygen.zip
|
|
|
|
REM change to 'generate' directory, which is where this batch file is located.
|
|
cd %~dp0
|
|
echo.commit_hook: Running Astronomy Engine tests.
|
|
del output\vsop*.txt output\*.eph output\jupiter_moons.txt
|
|
call run.bat
|
|
if errorlevel 1 (exit /b 1)
|
|
call verify_clean.bat
|
|
if errorlevel 1 (exit /b 1)
|
|
echo.commit_hook: SUCCESS
|
|
exit /b 0
|