-
Notifications
You must be signed in to change notification settings - Fork 14
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 Dockerfile and script for building in container instead of running the entire job in the container #34
base: master
Are you sure you want to change the base?
Commits on Nov 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3f4b0e6 - Browse repository at this point
Copy the full SHA 3f4b0e6View commit details
Commits on Nov 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9c02c0e - Browse repository at this point
Copy the full SHA 9c02c0eView commit details -
Fix docker action not being called
Used local action see https://github.com/orgs/community/discussions/26245#discussioncomment-3250938
Configuration menu - View commit details
-
Copy full SHA for 3349e52 - Browse repository at this point
Copy the full SHA 3349e52View commit details -
Fix "Can't find 'action.yml', 'action.yaml' or 'Dockerfile"
I thought the action name could be anything, but apparently it has to be action.yml. I created an actions folder just to make it clearer that this is an action, not a workflow
Configuration menu - View commit details
-
Copy full SHA for 859393e - Browse repository at this point
Copy the full SHA 859393eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae551ff - Browse repository at this point
Copy the full SHA ae551ffView commit details -
Add most of the rest of the job to the docker script
Used cd in a weird way but if it works it works
Configuration menu - View commit details
-
Copy full SHA for d19d06b - Browse repository at this point
Copy the full SHA d19d06bView commit details -
Configuration menu - View commit details
-
Copy full SHA for dcc7331 - Browse repository at this point
Copy the full SHA dcc7331View commit details -
Configuration menu - View commit details
-
Copy full SHA for f00b905 - Browse repository at this point
Copy the full SHA f00b905View commit details -
Read and re-add gradle build action
Need it for the snapshot and publish outside the docker container
Configuration menu - View commit details
-
Copy full SHA for 882b29b - Browse repository at this point
Copy the full SHA 882b29bView commit details -
Fix gradle permission denied error in setup gradle setup once docker …
…build finishes Caused by gradle files being left behind by the docker container. Having to install gradle two times for the linux job is a bit unclean, though. Also added no-daemon to the gradle task used because only one gradle command is being executed in the docker container.
Configuration menu - View commit details
-
Copy full SHA for 132db5b - Browse repository at this point
Copy the full SHA 132db5bView commit details -
Exit if cd fails in docker script
See https://github.com/koalaman/shellcheck/wiki/SC2164 for why this is good practice.
Configuration menu - View commit details
-
Copy full SHA for 8f7ebcf - Browse repository at this point
Copy the full SHA 8f7ebcfView commit details -
Use apt-get and sudo consistently
Using apt-get because apparently apt does not have a stable CLI interface. While apt install is probably safe, using apt-get will prevent the warnings in the log at least. See https://askubuntu.com/a/990838 As for sudo, while it's not needed sudo also doesn't cause any harm and those commands technically do need root permissions and using sudo makes that clear.
Configuration menu - View commit details
-
Copy full SHA for 1447c42 - Browse repository at this point
Copy the full SHA 1447c42View commit details -
Use headless zulu and remove unnecessary apt install line
Seems the zulu package I'm adding pulls in x11 which is unnecessary as we are running this in a headless setting.
Configuration menu - View commit details
-
Copy full SHA for fa7772d - Browse repository at this point
Copy the full SHA fa7772dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 698ce1e - Browse repository at this point
Copy the full SHA 698ce1eView commit details -
Remove usages of sudo in entrypoint.sh
Can't use sudo as the start as it needs to be installed first... so I just decided to not use sudo at all if it's not needed. But I'll keep the package install of sudo in case some other command needs it
Configuration menu - View commit details
-
Copy full SHA for 062ca39 - Browse repository at this point
Copy the full SHA 062ca39View commit details -
Remove openjdk-11-jdk-headless install
We're installing zulu, so I don't think this is needed.
Configuration menu - View commit details
-
Copy full SHA for 9eb4517 - Browse repository at this point
Copy the full SHA 9eb4517View commit details -
Move snapshot build inside docker script
Hopefully this fixes the "Unable to delete directory build/generated/sources/annotationProcessor/java/main" error Not using a daemon still because it's only two tasks.
Configuration menu - View commit details
-
Copy full SHA for a748272 - Browse repository at this point
Copy the full SHA a748272View commit details -
Probably needed for the deploy to work properly. Honestly maybe I could move the deploy into the docker container but thing is it'd require passing in the secrets
Configuration menu - View commit details
-
Copy full SHA for ffe9562 - Browse repository at this point
Copy the full SHA ffe9562View commit details -
Remove template inputs /outputs from action
I used https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action#creating-an-action-metadata-file as a starting point, but don't need these inputs or outputs.
Configuration menu - View commit details
-
Copy full SHA for d559e8a - Browse repository at this point
Copy the full SHA d559e8aView commit details -
Export language environment variables properly
No longer doing it in multiple steps, so adding it to GITHUB_ENV won't really do anything, if it even works in the docker container right now which it probably doesn't.
Configuration menu - View commit details
-
Copy full SHA for 65089f7 - Browse repository at this point
Copy the full SHA 65089f7View commit details -
Move maven and ant installation until when zulu is installed
Hopefully should prevent java 11 JRE from being installed, as zulu should provide what maven and ant needs. Also specified default find path as recommended by https://github.com/koalaman/shellcheck/wiki/SC2185
Configuration menu - View commit details
-
Copy full SHA for d43b263 - Browse repository at this point
Copy the full SHA d43b263View commit details -
Add --quiet to the other apt-get installs
The log seems to be massive for the docker step so hopefully this reduces it a bit.
Configuration menu - View commit details
-
Copy full SHA for 7f31c70 - Browse repository at this point
Copy the full SHA 7f31c70View commit details -
Use latest versions of actions
Strangely I got an error while trying to download an artifact for no reason. So maybe updating actions could help? Either way we should be good to do this now that the job is no longer being run in a docker container with glibc 2.17 May need to audit these actions though.
Configuration menu - View commit details
-
Copy full SHA for 629c351 - Browse repository at this point
Copy the full SHA 629c351View commit details -
Revert update of gradle-build-action
The new setup-gradle seems to validate the wrappers, but strangely the wrappers from the sdl submodule fail to verify for some reason.
Configuration menu - View commit details
-
Copy full SHA for e828bb2 - Browse repository at this point
Copy the full SHA e828bb2View commit details
Commits on Nov 28, 2024
-
Add comments explaining the sources.list edits
From TheOfficialGman's response to my questions here: libgdx#23 (comment)
Configuration menu - View commit details
-
Copy full SHA for aaa90ea - Browse repository at this point
Copy the full SHA aaa90eaView commit details
Commits on Dec 3, 2024
-
Use docker script for release action as well
I think the main issue is still just verifying that publish works properly. Unfortunately publish still seems to build stuff in the runner even when the build command was run inside the container. Hopefully it doesn't cause any issues though. Also added some comments I missed when porting the action steps to the script
Configuration menu - View commit details
-
Copy full SHA for 5904816 - Browse repository at this point
Copy the full SHA 5904816View commit details -
Use -quiet for all apt-get update usages and use consistent option or…
…dering for apt-get apt-get update is pretty noisy by default as there are a lot of lines for it reading the database. This should make it a bit quieter I also noticed in the later part of the script -yq was before the install/update command so I made that consistent as well.
Configuration menu - View commit details
-
Copy full SHA for c553462 - Browse repository at this point
Copy the full SHA c553462View commit details -
Use if condition for setting up JDK and Gradle in push action
If not deploying the snapshot, there is no benefit to setting up JDK or Gradle, so we might as well skip those steps too to save a bit of time.
Configuration menu - View commit details
-
Copy full SHA for 02e82bf - Browse repository at this point
Copy the full SHA 02e82bfView commit details -
Build snapshot/release in runner instead of in container
When I inspected the natives of a build from my branch and compared it to master, I noticed that while the master output-libs artifact only had one jar file in it (jamepad-2.30.0.0-SNAPSHOT-natives-desktop.jar) mine had 4 files in them (jamepad-2.30.0.0-SNAPSHOT.jar alongside other files with "workspace" at the start instead of jamepad for some reason, including the one with natives-desktop at the end). I figure this is because the build was being done before the deploy. As for the workspace name, it may be to do with how the container is configured...
Configuration menu - View commit details
-
Copy full SHA for 768cf30 - Browse repository at this point
Copy the full SHA 768cf30View commit details -
Disable daemon for macos build as well
It's only one gradle command being run in the job, so the daemon probably isn't needed.
Configuration menu - View commit details
-
Copy full SHA for 6e9c836 - Browse repository at this point
Copy the full SHA 6e9c836View commit details