-
Notifications
You must be signed in to change notification settings - Fork 13
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
ci: add action to upload built patch files #325
base: master
Are you sure you want to change the base?
Conversation
I like this but why is
|
@is-this-c Got it! I've applied the changes you asked for.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at my local build/Release/bin
directory and files there take 134.4 MB. Compressed it is 40.5 MB. From what I see in my account billing page only 500 MB of storage is free (Storage for Actions and Packages section). This means that for MinGW alone limit will be reached after 13 commits... Default retention is 3 months. 13 commits for 3 months is not a lot and this is only MinGW. We could filter out debug info (in Mingw build it is in .debug
files), then it would be just 14 MB, 5 MB compressed. That would be 100 commits for 3 months. But if MSVC is also stored that would be less (50?). Storing output from two compilers seems redundant, maybe MinGW only would be enough?
Also this storage is shared between projects so if I wanted to store artifacts in my other project that would conflict...
Do we really need this? I know there was no release for some time but I was thinking about one soon. Maybe that will "solve" the problem?
cmd is deprecated and pwsh is not needed so imo we should set defaults.run.shell to bash for simplicity and use a blank line for clarity between steps.
To be honest I prefer cmd
over pwsh
and I don't think it's officially "deprecated" even if Microsoft tries hard to force everyone to use PowerShell. Anyway I think it's best to stick to the defaults unless it makes things hard. Bash is not native on Windows but it is probably much easier to read last commit with it so it's okay to use it.
- name: Install packages | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends g++-mingw-w64-i686-posix ninja-build wine32 wine | ||
shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why set shell
everywhere? On Linux it is Bash by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I'll remove it from build-mingw
.
What about Windows? Do I keep it as an explicit value, as Git
provides a Bash
shell within Windows-based runners?
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Current Git Commit Head SHA | ||
run: echo "GIT_CURRENT_COMMIT_HEAD_SHA=$(git rev-parse --short=10 HEAD)" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--short
by default uses 8 characters, that's probably enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. In fact, I will remove this flag as it is optional.
@@ -6,50 +6,80 @@ on: | |||
|
|||
env: | |||
BUILD_TYPE: Release | |||
WORKING_DIRECTORY: ${{ github.workspace }}/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure we need that var. It is not a working dir in every step so its name may be confusing. Maybe it should be BUILD_DIR
?
But from docs I also see that they don't prefix it with ${{github.workspace}}
so it is pretty much BUILD_DIR: ./build
. With such a simple value I'm not convinced it actually brings much value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I introduced this global variable as this path is used in multiple places. This is only for consistency and to not repeat.
I agree that the name is not the best. Do you want me to revert this change or only change the variable's name?
No one is using What about build artifacts just for whatever commit is latest? |
What do you mean? AFAIK artifacts are linked to workflow runs and I don't know if there is a way to remove artifacts from older runs when a new one finishes. But if there was that would be a good option probably. |
Thank you for the reviews. Based on what you said, I would like to propose a couple of things here. As you mentioned, there are limitations with GitHub Actions regarding hosting artifacts, etc.
Now, I don't have enough experience with the low-coding ecosystem. I would appreciate your help in understanding.
Regarding the rest of the comments, I'll apply the changes you asked for. |
I changed my mind. PR artifacts are not a good idea.
I believe it is possible. What about this action?
Ensures compatibility. |
I am against publishing binary artifacts for PR that were not reviewed because they may contain security issues (e.g. a malicious person could upload a vulnerability and then ask people to test it for them). Instead I was thinking about publishing snapshots for code on master branch instead so people can use them before official release.
I want the project to be compatible with both MSVC and MinGW so people can use a compiler they prefer. Unfortunately there are some differences and a code that is successfully compiled by MSVC may fail to compile in MinGW (or the opposite). Having it compatible with two compilers increases the changes that it is standard-compliant. |
Got it. So, do I have to close this PR, or is there anything that you want me to do specifically? |
This PR aims to enhance the current
CI
workflow by uploading the built patch files toGitHub Actions
as artifacts so we can download them and test the changes locally.It also cleans up the
CI.yml
file for better readability and usability.The uploaded artifacts will have the following naming pattern:
dashfaction-<git-commit-head-sha>-<mingw|msvc>.zip