Closed k-doering-NOAA closed 3 years ago
I am stuck on this. I've been working on a workflow in: https://github.com/nmfs-stock-synthesis/stock-synthesis/blob/setup-gh-actions/.github/workflows/build.yml
The issue is I can't figure out how to add ADMB to the PATH; the admb command is therefore not recognized. I've tried many different ways, including the recommended way and methods I've used on Jenkins, but I haven't gotten anything to work so that ADMB is found.
I will try reaching out to people who have used github actions before to see if they have any idea what I'm doing wrong.
Try @ChristineStawitz-NOAA
Sara Ogaz figured it out in 10 min! EDIT: the issues was I had to add admb-12.2/bin
to the path instead of admb-12.2
or admb-12.2/bin/admb
Making good progress on this. Some notes:
ls -l
to the script. Maybe in the process of archiving or copying? I will look into this more, as we want the binary we post on vlab to have the correct permissions.Successfully was able to setup workflows to compile all mac and windows SS binaries! Remaining issues to clean up:
After talking a bit with @iantaylor-NOAA about file permissions and reading a little more online, I'm not sure if the permissions for linux and mac binaries were created correctly even before github actions. I'm not sure if there was any way to guarantee this aside from distributing the executables some other way (for example, in the .tar format, which supposedly ships files with their permissions?) I think the simplest solution for now would be not to worry about permissions and instead document this potential problem so that users know they can run chmod a+x
to make SS executable. I would expect linux users know this, but mac users may not (as someone who used mac for many years and never thought about file permissions).
If anyone has other thoughts about how to deal with this issue, please let me know!
I pinged a few people that are Mac users and they said that this has been an issue for them, especially when teaching a class where they are trying to distribute the executable. Their workaround was to use "chmod 755 ss" to get it to work and manually copy the executable (or at least the path to the executable) to each directory they used.
Thanks for confirming my suspicion, @kellijohnson-NOAA! Given this, I think just adding to the SS website/documentation that you may have to change permissions on your machine using chmod
may be the best path forward for now.
I'm going to close this issue, but we can reopen it or create a new issue if we get another lead about a way to fix distribution permissions problems.
Lee Qi confirmed that chmod +x ss didn't work for some people, but chmod 755 did.
Thanks, I just assumed chmod a+x
alone would work, but maybe the write and read privileges are important, too. The a+x is easier for me to remember, which is why I use it, but I will stick to the numbers from now on to be more specific! Theses are the specific permissions 755 gives, in case it is helpful: https://chmodcommand.com/chmod-755/
The goal here would be to build windows, linux, and mac versions of ss automatically. Jenkins can only build the linux version for now.
Started to put this together (24c3b78)
The steps I see toward doing this are: