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: rework #31
ci: rework #31
Conversation
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'm not really a fan of doing a package only approach here.
I originally designed this to be able to generate nightly build easily in the future for Windows.
I think it would be better to move this to another action.
Seems to fail on the install part |
I'm sorry, but I don't understand. The proposed solution is equivalent to the existing procedure. The only difference is the PREFIX. You can either ignore or extract the package and you get the same result. This provides nightly builds already. Ready to use tarballs are generated after each push or pull request. The only missing step is uploading the artifact. I would understand creating a diferent job if the existing one didn't use MSYS2, but that's not the case. However, I can keep both procedures in the matrix. |
As commented above, there is no |
Thanks for the PR! |
a334553
to
733a432
Compare
I updated the PR for running two jobs in parallel. One builds manually, the other one uses the PKGBUILD file.
Will you take care of that? For reference: https://github.com/trabucayre/openFPGALoader/blob/master/CMakeLists.txt#L174-L182 |
The GNU/Linux workflow contributed in the last hours is now merged with Windows jobs in a single workflow named 'Build'. A shield is added to the README. See: |
The PKGBUILD recipe needs to be enhanced, in order to declare runtime dependencies. Nonetheless, this PR can be merged as is, since it meets CI purposes. |
When I said doing a nightly system, I was meaning:
As a note, I also don't think that having a test job is useful right now. If tests need to be run, it must be part of the build job. |
As commented above, that is doable by taking the existing package/artifact as a base. Just need to add the extra DLLs which don't exist outside of MSYS2. In fact, I believe that is the natural procedure, given that the tool is built inside MSYS2 in any case.
There is no limit for free and open source projects, AFAIAA. Furthermore, artifacts of this project are really small. It is unlikely to hit the limit in the 90 day window. Nonetheless, the retention of artifacts can be configured. Artifacts can be pushed as assets of a (pre)release. See, for instance:
Build dependencies and runtime dependencies are different. If the artifacts are tested in the build environment, it is easy to overlook which are the runtime dependencies in practice. Testing the tool in a clean environment is the closest to what users of the tool will get when trying an artifact/release. The issue I found is that ImHex seems to ignore CLI arguments. That's why the current test is rather stupid. |
b190d69
to
1075017
Compare
To me, we shouldn't unpack a package and then repack it with the needed dependencies so this could be done in the
I think that could be a nice idea, we will need to have some action to do periodic artifacts cleanup (using https://github.com/c-hive/gha-remove-artifacts)
Testing a GUI based application is kind of hard, especially on CI (we cannot create an OpenGL context without a GPU) so I don't think it's quite possible to do it in a nice way. You can add to this that if we want to be closer to a regular user environment, we need to do it outside MSYS2 on Windows as we aren't expecting end user to have MSYS2 installed. One thing that we can probably do however is having a tool that parse the resulting PE and ensure that all libraries are present (by checking for existence of libraries in standard Windows paths and current directory of the PE) |
You don't need to unpack and repack the content, since it's already available for you in a subdir. Anyway, it is feasible to do it manually too, should you be willing to do so.
My experience is that there is no need for artifact cleanup. That's a requirement for users/projects with non-free repos or with a really heavy activity. Nevertheless, adding gha-remove-artifacts should be harmless.
The purpose of the Test step in this PR is not verifying the GUI features of the tool. Instead, it's for checking that the package/tarball which users download/install contains all the expected resources; plus, that executable files are actually executable. Since different build options are used, some binary might crash or some assets might be missing. That's what we want to check. For example, GTKWave is a GUI application, but
Maybe I didn't explain myself properly: my purpose is to package and upstream ImHex, so that MSYS2 users can install it through pacman. Therefore, I believe we want to have the package tested on MSYS2, independently of other manual procedures being supported/tested too. Incidentally, you are using MSYS2 for the manual build procedure, instead of a "more native" workflow, such as MSVC. As a result, you can reuse the existing package and just add the missing DLLs, which you can extract from the MSYS2 environment that you are already using. Nevertheless, if you want to do everything manually, that's up to you.
This is a rather common requirement: building packages on MSYS2 and then distributing them to be used outside of MSYS2. There are a few projects that try to get the list of DLLs/dependencies automatically:
Yet, the natural procedure is to build an MSYS2 package and then produce a larger zipfile. Should you want to skip the first step and do it manually, you might need to tweak some of those helpers. |
4522c04
to
7562e6c
Compare
GitHub Actions's web GUI was updated. Now the dependencies of the jobs are easily seen: https://github.com/WerWolv/ImHex/actions/runs/407237481 @Thog can we have this merged? |
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.
lgtm, thanks 👍
* add glm to arch deps After running got `None of the required 'glm' found`. This fixes that * dist/fedora: Include file magic headers Due to differences in package names between Deb based systems, Arch Linux, and RPM based systems the package containing the development headers for file were missing from the Fedora dependencies script. This includes the package `file-devel`, which is the package which resolves the issue. In Fedora, one can identify the package providing a specific file using the verb "whatprovides" with the command dnf, e.g.: [~]$ dnf whatprovides /usr/include/magic.h Last metadata expiration check: 4 days, 0:23:05 ago on Fri 04 Dec 2020 09:06:53 AM PST. file-devel-5.39-3.fc33.i686 : Libraries and header files for file development Repo : fedora Matched from: Filename : /usr/include/magic.h file-devel-5.39-3.fc33.x86_64 : Libraries and header files for file development Repo : @System Matched from: Filename : /usr/include/magic.h file-devel-5.39-3.fc33.x86_64 : Libraries and header files for file development Repo : fedora Matched from: Filename : /usr/include/magic.h If one is unsure of the specific path, globbing may be used (but must be quoted): dnf whatprovides "*/magic.h" Resolves #48 * dist: Prevent already installed packages in ArchLinux and MSYS2. Use --needed option with pacman to prevent it. * Add script to install dependencies on Debian/Ubuntu. Tested with Xubuntu 20.04 and Debian testing (in today's Docker image bitnami/minideb). Update README.md. * ci: rework (#31) * Support non standard LLVM library names (#86) This fix openSUSE and Gentoo issue mentioned in #37 (comment). (tested on openSUSE tumbleweed via Docker) I also took the liberty of renaming llvm_lib to llvm_demangle_lib to be more specific in the ``CMakeLists.txt``. * Implement proper DPI handling * Implement basic custom font support * Fix building on windows * Hopefully fix fonts on Windows * Fix several scaling issues * Replace font renderer with freetype * Updated CI and dependency scripts * Rebuild default font atlas * Correct platform detection macro for mingw * Fixed PKGBUILD Co-authored-by: brockelmore <31553173+brockelmore@users.noreply.github.com> Co-authored-by: Brian 'Redbeard' Harrington <redbeard@dead-city.org> Co-authored-by: Biswapriyo Nath <nathbappai@gmail.com> Co-authored-by: Stéphane Gourichon <stephane.gourichon@fidergo.fr> Co-authored-by: umarcor <38422348+umarcor@users.noreply.github.com> Co-authored-by: Mary <me@thog.eu> Co-authored-by: WerWolv <werwolv98@gmail.com>
Close #40
The main purpose of this PR is to switch from using a manual build procedure to a PKGBUILD recipe. Having a working PKGBUILD allows upstreaming this project to official MSYS2 repositories.
The proposed recipe fails because
install
is not a make target. @WerWolv what do you prefer, writing installation steps manually in the PKGBUILD file or adding them through cmake?NOTE: the resulting
*.zst
package can be extracted and distributed to be used outside of MSYS2, as long as the additional dependencies mentioned in the readme are added.