-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use develop
in tests
#469
Comments
Yeah, |
It's not wrong to require a specific compiler when you're gonna enable all sorts of instrumentation, especially when some of it is more contemporary, so I wouldn't bother making this "portable", as long as it isn't the default. |
If you're going to rely on CI infrastructure with a specific compiler available, it seems OK to depend on that compiler to run the tests, assuming the compiler itself can be easily obtained. |
The problem with relying on a single compiler is that we have already had one compiler catch errors the other didn't (I personally had Clang catch errors GCC let go, but GCC is the one supporting the flags in question). That's why I would prefer to find a way that lets us keep both compilers in the CI. |
You can set up two CI tasks with specific compilers and specific flags for each. |
I had in mind to have |
Set the flags externally in the CI script along with the compiler itself (i.e., set both |
That, or wrap it in a shell script you can run outside of CI, or have |
I wanted to separate the target compiler (including MinGW) from the target configuration (debug / release). |
I have set up a test repo to test Actions on. Testing the *nix builds works like a charm, but trying to get the Windows builds is a nightmare. The main binaries fail to compile because there are no libpng development headers for mingw (could be worked around by using the base system's given that they are basically identical, but that sounds hacky to me).
|
Yeah, it is a nightmare, and that's why I decided to cross compile the Windows binaries... |
Well, this is cross-compiling the binaries (just not the libs), but there are missing headers. On my Arch box, I have those headers in a package so the current solution (MinGW's |
I have a Fedora VM that has libpng and zlib as packages to cross compile for Windows. I don't think that Debian has them, for example. It took me a couple of tries to find a distro that had them. |
I currently have two ideas:
Other option, pray that macOS can do the job. (I doubt it.) |
Have you tried |
Finally did it..! For the binaries, I eventually just went "fuck it" and mimicked Arch Linux's build script for libpng headers. Works wonders, we have the binaries now—this requires, however, having copies of two MinGW scripts in the repo, especially as one of the scripts is broken and does not run on the build machine by default. For the DLLs, I realized by luck that the MinGW package (for zlib) and compilation (for libpng) yield DLLs at Currently, however, the test suite fails on Windows... blame rgbgfx somehow. Fixing this would require a Windows VM though, which I currently do not have. (Note: the binaries are available in the tiny "Artifacts" link near the top.) |
It was determined that the 32-bit build links against |
I was able to enable |
After more testing, even the 32-bit MSVC build of libpng just fails. I think we should just deprecate (by distributing the 32-bit bundle and telling people to get the GCC runtime somehow) or outright drop 32-bit support. What do you say? |
I think you can remove it. If you need the 32-bit windows build you need to:
This is pretty unlikely... |
It's more likely that you think, given how many people don't know how to install a new OS, and for the longest time a lot of windows 7 machines shipped with a 32-bit OS (despite their hardware being 64-bit capable). These sort of machines are still in use today and pop up every once in a bit in the pret discord. I don't want to turn these people away from hacking on a 20-y/o game on a machine that's more than capable of doing that. If you guys don't want to support 32-bit windows I understand. I can always look into this myself or tell people to build it on cygwin. |
I imagine a lot of Windows Vista and Windows 7 machines had a 32-bit OS for a couple reasons:
Would it help to take a survey on pret, gbdev, etc. to see what architecture everybody uses? How would a survey even work? Is it straightforward for someone who knows Game Boy programming but not obscurities of OS administration to determine whether Windows or Linux is 64-bit? I know for Linux you could ask people to do this:
What would the analogous procedure for Windows 10, 8.1, and 7? |
For windows machines the following should give the correct result on all platforms: However, I doubt basing this decision on the distribution in the current userbase is the right thing to do. Dropping 32bit-support (for now) because of the issue mentioned above should be alright. |
Doesn't Windows also show the bitness under System in the Control Panel? |
Yes, it does show on the System-screen as well (atleast on Windows 7) accessible by the shortcut WIN+PAUSE however I don't know if this works on all platforms. |
To attain a compromise, we have this setup that fails on Win32, but skips the tests involving RGBGFX on it. |
Patch note regarding the previous comment: the Win32 testing has been re-enabled after some discussion with Windows users—the required GCC runtime is now packaged inside the 32-bit Windows zip. |
Here's the current state of this: Opinions on what to do? On how to do it best? |
|
[EDIT] This is the current state of the issue; the original post can be found unedited below the horizontal separator.
CI has been moved to GitHub Actions, and
develop
is enabled in exactly one of the build jobs.What is needed? Looking into ways to enable
develop
for as many jobs as possible. Our Makefile is currently POSIX-compatible, but there's been talk to drop that and switch to GNU Make only, so it's not excluded.(Half of this overlaps with #283.)
After b49e025 accidentally broke error reporting (+ undefined behavior, etc etc 🤷♂️), it might be a good idea to run
make develop
instead ofmake
in the CI.I've done that in the develop branch... and the five jobs all fail.
Clang
Clang (9.0.1 on my machine) complains about the following flags:
-Wformat-overflow=2
-Wformat-truncation=1
-Wstringop-overflow=4
-Walloc-zero
-Wduplicated-cond
-Wlogical-op
-Wno-aggressive-loop-optimizations
GCC
The GCC version Travis uses by default is 5.4.0, which fails to recognize the following flags:
-Walloc-zero
-Wduplicated-cond
-Wformat-overflow=2
-Wformat-truncation=1
-Wstringop-overflow=4
However, GCC 7.4.0 is available in Travis, and I have confirmed on my machine that 7.5.0 works correctly, but links against
libubsan.so
which I don't have installed. GCC 6.4.0 fails to recognize the options as well.It seems possible to require a minimum GCC version with Travis, as mentioned in the link above, but that seems to be—bluntly—a clusterfuck. I'm considering trying to move to GitHub Actions instead (which I would try to set up in a separate repo of mine first, of course). That would have the added benefit of Windows testing.
Thoughts on the following?
The text was updated successfully, but these errors were encountered: