lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.13k stars 356 forks source link

Producing binaries #235

Closed WhoAteDaCake closed 3 years ago

WhoAteDaCake commented 3 years ago

Is your feature request related to a problem? Please describe. It's more of a question. I've noticed that the last release was in 5 Jul 2020 even though there has been way more recent commits. Is it possible that you do have to do it manually ? If so I could try and help setting up github actions to automate this.

Describe the solution you'd like I could try and implement it via github actions.

lc-soft commented 3 years ago

Is it possible that you do have to do it manually ?

Yes it is. I will manually download binary files from AppVeyor CI and GitHub Actions every time I create a release and upload them as release assets.

If so I could try and help setting up github actions to automate this.

Does this mean you are interested in updating the configuration file of GitHub actions so that it can build binary packages for Linux and Windows?

WhoAteDaCake commented 3 years ago

Yes, i'll give it a shot later today and possibly tomorrow, se where I get to

WhoAteDaCake commented 3 years ago

So I've been taking a look at it, but it keeps hitting the issue of :

error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found.

I have been trying to fix it with multiple approaches, but it's taking it's time. I feel like if I keep using Visual studio I'll keep hitting these issues Is there a way of building this on windows without a visual studio?

lc-soft commented 3 years ago

error MSB8020: The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found.

What is your build environment? This error message seems to be because you are using another version of Visual Studio to build.

Is there a way of building this on windows without a visual studio?

I don't think Visual Studio is necessary. If you can pass the correct parameters to the compiler and linker like Visual Studio, then you can successfully build LCUI.

But adding other build methods will increase maintenance costs, so I suggest you use Visual Studio to build.

WhoAteDaCake commented 3 years ago

Fair point, it would be more costly. I was using windows-2019 build environment

https://github.com/WhoAteDaCake/LCUI/runs/2645699958?check_suite_focus=true

After switching to windows-2016, I encountered another issue

https://github.com/WhoAteDaCake/LCUI/runs/2645744382?check_suite_focus=true

I'll investigate further later

WhoAteDaCake commented 3 years ago

I think I've managed to build, will try tp finish it off. Unfortunately I do not have windows laptop, so I can't test.

On another note, what's the prefered way of sharing release notes ? I've seen other people create docs/release-notes/$VERSION.md. This way github actions can release that content together fill official release

EDIT: I've managed to get a build on windows, is there a way for you to verify it works ? https://github.com/WhoAteDaCake/LCUI/actions/runs/867342321 (Look at artifacts)

lc-soft commented 3 years ago

I was using windows-2019 build environment

Maybe you can use the devenv LCUI.sln /upgrade command to upgrade the platform toolset of the solution file from 2017 to 2019.

https://docs.microsoft.com/en-us/visualstudio/ide/reference/upgrade-devenv-exe?view=vs-2019

Unfortunately I do not have windows laptop, so I can't test.

You can add a job to GitHub Actions, let it build build\windows\LCUI-Demo.sln, and then run LCUITest.exe to test whether LCUI is working properly.

The path of the LCUITest.exe file is: bin\x64-windows\Debug\LCUITest.exe, Its working directory should be set to: test\.

On another note, what's the preferred way of sharing release notes?

Run npm run update-changelog command to generate a change log. It collects the commits from the previous version to the current version, and then generates a change log and outputs it to the CHANGELOG.md file.

I've managed to get a build on windows, is there a way for you to verify it works ?

image

This file is too big, we should upload each file as shown below instead of packaging them into one file.

image

WhoAteDaCake commented 3 years ago

Thanks, I'll try to test that. I'll take a look at update-changelog to see if I can pull the changeling notes to push with the release.

This file is too big, we should upload each file as shown below instead of packaging them into one file.

Yes the files will be added as separate entries, this is just a build artifact, to be downloaded and extracted before release

WhoAteDaCake commented 3 years ago

I've ran the test, but it seems to be failing, could you let me know what i did wrong? https://github.com/WhoAteDaCake/LCUI/runs/2668570266?check_suite_focus=true#step:13:469

Note: on ubuntu, would you want me to build using lcpkg or make and what command did you use to package ubuntu dependencies ?

lc-soft commented 3 years ago

I've ran the test, but it seems to be failing, could you let me know what i did wrong?

I will fix the test failure. You can let GitHub actions ignore the error of this step and continue with the next step.

on ubuntu, would you want me to build using lcpkg or make and what command did you use to package ubuntu dependencies ?

Using make.

The existing Ubuntu build script works well, and I think it can continue to be used.

https://github.com/lc-soft/LCUI/blob/38d44608ba0cca660a2f928420df09af57fe7836/.github/workflows/ccpp.yml#L5-L31

lc-soft commented 3 years ago

I found that the is displayed as ?. Is this problem easy to fix?

image

image

WhoAteDaCake commented 3 years ago

I tried replacing it with other characters, but it seems that github actions terminal dislikes ut8 characters. Seems in ubuntu it displays correctly

WhoAteDaCake commented 3 years ago

One more question, in regards of versioning, do you want the versioning to be more automated? At the moment, they are all hardcoded in config files, we could use an environment variable, to make that configurable.

If it's not too important right now, I can get the build working first and change it once it's merged Side note: I can't build debian distribution because tests keep failing ? https://github.com/WhoAteDaCake/LCUI/runs/2688256196?check_suite_focus=true#step:6:1547

lc-soft commented 3 years ago

One more question, in regards of versioning, do you want the versioning to be more automated?

Yes, I want, I often forget to change the version in some files when I release a new version,, so I want to have the script automatically update the version.

But it's not too important right now, You can get the build working first and change it once it's merged.

Side note: I can't build debian distribution because tests keep failing ?

image

This problem has been solved recently. You can pull the latest code from the develop branch.

WhoAteDaCake commented 3 years ago

Finally got a release working https://github.com/WhoAteDaCake/LCUI/releases Does that look ok ?

WhoAteDaCake commented 3 years ago

If that's fine, I'll branch from develop, to clean up the comits and create a pull request

lc-soft commented 3 years ago

Nice.

WhoAteDaCake commented 3 years ago

Open in https://github.com/lc-soft/LCUI/pull/237