The answer to this kind of question is that you need a cross-platform project.
You should be able to check out your project on those platforms where it has to work, run whatever preparation is needed, and then execute the test case suite.
Whenever you release a new version of the script, you have to execute that test plan: update to the release baseline on all the supported platforms, and run the test cases, and execute whatever other test plan you have for gaining confidence that things work on each supported platform.
With some care, you should be able to write Awk code that produces the same results in GNU Awk, nawk and others.
the nawk source code and compiling however yacc is not available on my distro and Bison is not sufficiently compatible
I see that the "One True Awk" project has done something very silly. The makefile defines YACC = bison -d. This means that the awkgram.y grammar file is now at the mercy of the default behavior of whatever version of Bison the user has installed. To compound the problem, the project does not ship the generated parser sources that the maintainer actually builds and tests with. The downstream users are thus running different C code for a pretty important part of the program.
If you have difficulties with your Bison installation, try changing that to bison --yacc -d. bison is not really Yacc without the -y or --yacc arguments.
Failing that, generate the parser on some other platform, and use those generated files.
Even if you get nawk running on platform A, that doesn't mean you can assume your code works on platform B without testing.
Anyway, it looks like the One True Awk sources do not include the Yacc-generated parser, which is a mistake. What you can do is just run Yacc on a platform where it works, and then add the resulting y.tab.c and y.tab.h files to your local tree. Make sure you touch the time stamps so these files are newer than awkgram.y so the makefile doesn't try to rebuild them; or else tweak the makefile.
Yacc programs generate output that is intended to be portable C, so that downstream users can build the program without having Yacc installed. Projects with Yacc grammars should always publish the generated code, so that everyone is downstream is compiling the same C. It's already risky enough when people have the same C sources, but building them for different machines and environments.
I'm surprised Bison wouldn't be able to process the awkgram.y file in Brian Kernighan's awk. You have to use bison --yacc or bison -y. On systems where the Yacc implementation is provided by Bison, there is usually a script called yacc which passes its arguments to bison -y or bison --yacc. I just checked out https://github.com/onetrueawk/awk.git on a Ubuntu 18 instance where I have the default Bison 3.0.4 installation, as well as a Bison 2.5 in /usr/local/bin. Both of them accept awkgram.y without errors.