It looks like I have been running an unintended version of Python
from GitHub Actions. In Linux/Mac I used `python3`, and in Windows
I used `py`. It appears that I should be executing `python` in
all 3 operating systems.
This is an experiment to see if I can get everyone on the same page.
Deleted the do-nothing placeholders for installing
the Kotlin Native compiler. We are not going to support
Kotlin Native for now.
Removed redundant installation of pylint from the
Windows commit_hook.bat.
Other batch file cleanup, now that I know "||" works in Windows.
The Mac OS tests failed because the Kotlin Native
compiler created an unexpected directory:
demo/kotlin/native/moonphase.kexe.dSYM/
I fixed this by adding *.dSYM to .gitignore.
Also, the GitHub Action `fwilhe2/setup-kotlin@main`
defaults to an older version of the compiler.
I added an option to specify using version 1.6.20.
Nothing very interesting yet.
Just building a very basic Kotlin Native app
to make sure build and execute work on GitHub Actions,
on Linux and Mac OS. I will worry about Windows later.
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.
I just noticed a build problem in the Kotlin code
was detected by GitHub Actions in Linux and Mac OS,
but not in Windows. It marked the Windows test as
a success, even though the output clearly shows that
run.bat failed. I theorize that the steps inside
the file .github/workflows/astronomy-engine-tests.yml
are not being checked for errors after each step, but
only after all of them execute. So I have moved them
into a new batch file generate/commit_hook.bat, which
does check each step.
After pushing this change, all 3 builds should fail.
Once I get Windows to fail also, I will fix the failure.
This is strange. I noticed looking in the GitHub Actions report
for running tests that my Gradle/Kotlin steps were run before
their dependencies were supposedly installed. Perhaps the
steps "set up JDK 1.8" and "gradle/wrapper-validation-action@v1"
are not even needed? Regardless, I moved these steps to run
before building and testing the Kotlin code.
Even if the steps are not needed, they are a helpful reference
point for understanding what things a developer needs to install
on a local system before making contributions to Astronomy Engine.
Instead of being executed directly by the GitHub Actions
yml file, the Kotlin build now has been integrated with
the build/test steps for the other 4 languages in the
bash script `generate/run` and the Windows batch file
`generate/run.bat`. This will be necessary to control the
order of execution, because the Kotlin source code will have
to be written by the code generator before it is built
and executed.
I also added hints for myself and other contributors about
how to set up Kotlin/JDK tools on a new developement machine.
These instructions are not needed by most users of Astronomy Engine,
just contributors.
From the GitHub Actions logs, it looks like verify_clean.bat
is not running after run.bat, like I intended. I'm guessing I
need to add "call" before both batch files to ensure that
control returns to the caller.
I found a mistake in the raytracer's Spheroid class,
thanks to a warning about an unused member variable.
I don't believe it had any effect on the currently
generated images, but it was important to fix it before
I ever do any set operations on Spheroids.
On macOS, there is no 'realpath' command by default.
So I eliminated some more attempts to use 'realpath'
in the demo test scripts.
Renamed the GitHub Actions tests to be consistent:
Astronomy-Engine-Linux
Astronomy-Engine-Macos
Now that Microsoft has officially released .NET 6,
I have upgraded the C# version of Astronomy Engine to use it.
No source code changes were needed. I just bumped the
version number in the project files, and targeted .NET 6
in the GitHub Actions continuous integration tests.
Fixed some obsolete wording in generate/README.md.