Page 4 of 12

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 8:01 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 7:54 pm
I think the environment does run, but we don't get to see its output. Probably the build fails at some point and therefore no resulting artifact files are generated. Not sure what to do here, I'm afraid.

The only suggestion I have at this poibt is to remove the path:oolite line from the Checkout Oolite job. It seems to result in the subnodules getting installed in D:\a\oolite\oolite\oolite, which is not right (they should go in D:\a\oolite\oolite, like everything else). Maybe this is why the build might be failing. Give it a try.
I do not think so.

The workspace is

Code: Select all

D:\a\oolite\oolite
. Inside that I checkout

Code: Select all

DevelopmentEnvironment
and

Code: Select all

oolite
, so Oolite resides in

Code: Select all

D:\a\oolite\oolite\oolite
. And the submodules are underneath that path. It seems to match in my POV.

On the other hand, if the environment were running, I'd expect it to execute profile at some point in time. Here I added the lines

Code: Select all

###### Oolite changes start ######

echo "Environment variables:"
env | sort

echo "Current working directory:"
pwd

if [ ! -z "$GITHUB_WORKFLOW" ]; then
  echo "We are in Github. Let's build the project.
  cd "$GITHUB_WORKSPACE"
  make -fMakefile pkg-win-snapshot
fi
###### Oolite changes end   ######
So I'd at the very least would expect the environment variables and the current working directory to be printed. But as we see there is nothing. Not even an exit code !=0.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 8:15 pm
by another_commander
You are probably right about the location of the checkouts. As for msys: the windows runner executes cmd.exe and that in turn calls msys, but I am not sure whether the msys messages are supposed to be redirected to the output of the github runner or not. Msys is basically a bash shell and I am not certain about the details of how it handles its input and output streams. Given how short the overall running time of the workflow is, it may be entirely possible that msys does not run at all though. At this point, I have no idea why.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 8:29 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 8:15 pm
You are probably right about the location of the checkouts. As for msys: the windows runner executes cmd.exe and that in turn calls msys, but I am not sure whether the msys messages are supposed to be redirected to the output of the github runner or not. Msys is basically a bash shell and I am not certain about the details of how it handles its input and output streams. Given how short the overall running time of the workflow is, it may be entirely possible that msys does not run at all though. At this point, I have no idea why.
Seems we need to go in little steps and even consider a .bat file to be outdated.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:02 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 8:15 pm
You are probably right about the location of the checkouts. As for msys: the windows runner executes cmd.exe and that in turn calls msys, but I am not sure whether the msys messages are supposed to be redirected to the output of the github runner or not. Msys is basically a bash shell and I am not certain about the details of how it handles its input and output streams. Given how short the overall running time of the workflow is, it may be entirely possible that msys does not run at all though. At this point, I have no idea why.
Some small progress. I created a minimal cmd script, and it seems the workflow gets to call that. Finally!

Now we can add the .bat functionality...

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:14 pm
by another_commander
Good. In further news...

I found a potential issue with the dev environment. I was under the impression that it was location agnostic, but it looks like there are some hard-coded paths in it in the etc/fstab file. Apparently the location-agnostic version is the Dev Env Light Edition one which I had distributed in the past, but that version does not have installer creation capability.

Just to be safe, I think it would be a good idea to ensure that path references agree between the folder where the dev environment is installed during the github action runs and the fstab file. The etc/fstab file should read

Code: Select all

D:/a/oolite/oolite/DevelopmentEnvironment/gcc/nsis						/nsis
D:/a/oolite/oolite/DevelopmentEnvironment/SourceControl/git				/git

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:18 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 9:14 pm
Good. In further news...

I found a potential issue with the dev environment. I was under the impression that it was location agnostic, but it looks like there are some hard-coded paths in it in the etc/fstab file. Apparently the location-agnostic version is the Dev Env Light Edition one which I had distributed in the past, but that version does not have installer creation capability.

Just to be safe, I think it would be a good idea to ensure that path references agree between the folder where the dev environment is installed during the github action runs and the fstab file. The etc/fstab file should read

Code: Select all

D:/a/oolite/oolite/DevelopmentEnvironment/gcc/nsis						/nsis
D:/a/oolite/oolite/DevelopmentEnvironment/SourceControl/git				/git
Is that a snippet or the full file? I think we can make the oolite build-windows.yml workflow write those settings. Ah, seeing the current version this is definitely a snippet. We could also continue the drive mapping pattern:
O: points to Oolite
T: points to the toolchain/development environment

Another thing I figured out using the cmd script:
This line is problematic as it triggers a process in a separate window, then terminates. I'd change start into a call?

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:29 pm
by another_commander
Not sure how the github runners would behave if you try to map a new drive (o:) as part of the build process. There could be permission issues involved, but sure, if you want to try it give it a go. The snippet I posted is essentially the entire fstab file, since all the rest of the lines contained within the original fstab are either comments (begin with #) or refer to SVN, which was the source control we had back in the early 2010s.

Try to change start to a call. Hopefully it will help.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:42 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 9:29 pm
Not sure how the github runners would behave if you try to map a new drive (o:) as part of the build process. There could be permission issues involved, but sure, if you want to try it give it a go. The snippet I posted is essentially the entire fstab file, since all the rest of the lines contained within the original fstab are either comments (begin with #) or refer to SVN, which was the source control we had back in the early 2010s.
I shall have a look at this.
another_commander wrote: Sun Jan 09, 2022 9:29 pm
Try to change start to a call. Hopefully it will help.
It helped. We now have

Code: Select all

h: /etc/profile: line 75: unexpected EOF while looking for matching `"'
sh: /etc/profile: line 80: syntax error: unexpected end of file
]0;MINGW32:~
runneradmin@fv-az82-541 ~
$ logout
Current working directory:
/home/runneradmin

D:\a\oolite\oolite>exit
:-)

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:46 pm
by another_commander
The closing quotes at line 74 are missing.

Code: Select all

echo "We are in Github. Let's build the project.
Close them and try again.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:49 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 9:46 pm
The closing quotes at line 74 are missing.

Code: Select all

echo "We are in Github. Let's build the project.
Close them and try again.
So now we have

Code: Select all

Current working directory:
/home/runneradmin
We are in Github. Let's build the project.
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'.  Stop.
]0;MINGW32:/d/a/oolite/oolite
Changed the cd, now running again.

Yeeha!

Code: Select all

We are in Github. Let's build the project.
make -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=1.91.0.1-220109-262a22a debug=no strip=yes
This is gnustep-make 2.4.0. Type 'make print-gnustep-make-help' for help.
make[1]: Entering directory `/d/a/oolite/oolite/oolite'
Making all for objc_program oolite...
 Compiling file src/Core/legacy_random.c ...
 Compiling file src/BSDCompat/strlcpy.c ...
 Compiling file src/Core/Debug/OOTCPStreamDecoder.c ...
 Compiling file src/Core/OOPlanetData.c ...
 Compiling file src/Core/MiniZip/ioapi.c ...
 Compiling file src/Core/MiniZip/unzip.c ...
 Compiling file src/Core/Debug/OODebugMonitor.m ...
...

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:58 pm
by another_commander
OMG, it is compiling!!!! Yay!!!

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 9:59 pm
by Cholmondely
Congratulations.

That is the first time in how long? 2 years?

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 10:00 pm
by hiran
another_commander wrote: Sun Jan 09, 2022 9:58 pm
OMG, it is compiling!!!! Yay!!!
Once that is done I may need your help to identify a meaningful build, and what to publish as a release.
The 'check filesystem' step lists everything recursively and creates about 16 MB of output. The browser gui does not display it all, but the logs can be downloaded and evaluated in full.

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 10:04 pm
by hiran
hiran wrote: Sun Jan 09, 2022 10:00 pm
another_commander wrote: Sun Jan 09, 2022 9:58 pm
OMG, it is compiling!!!! Yay!!!
Once that is done I may need your help to identify a meaningful build, and what to publish as a release.
The 'check filesystem' step lists everything recursively and creates about 1.6 MB of output. The browser gui does not display it all, but the logs can be downloaded and evaluated in full.
Oh, I've seen NSIS (it's been a long time) and this:

Code: Select all

Output: "d:\a\oolite\oolite\oolite\installers\win32\OoliteInstall-1.91.0.262a22a-dev.exe"
So that is the desired release?

Re: Changing Oolite...

Posted: Sun Jan 09, 2022 10:08 pm
by another_commander
Yes, but where is it? Is it possible to extract it from where it is stored?