Skip to content

CMake tested on Mac OSX, Windows, and Linux; Build automation - #90

Merged
GitMensch merged 1 commit into
Bill-Gray:masterfrom
jwinarske:cmake
Oct 27, 2018
Merged

GitMensch merged 1 commit into
Bill-Gray:masterfrom
jwinarske:cmake

Conversation

@jwinarske

@jwinarske jwinarske commented Oct 12, 2018 •

Copy link
Copy Markdown
Contributor

Cleanup from PR #52

CMake support

Host dos16 dos32 os/2 wincon wingui sdl2 x11 ncurses vt
Apple OSX -> GNU gcc/Clang x x x
Linux -> GNU gcc/Clang x x x
Open Watcom 1.9 x x
Open Watcom 2.0 x x x
Windows MSVC ARM x x x
Windows MSVC ARM64 x x x
Windows MSVC 32 x x x
Windows MSVC 64 x x x

Windows/DOS builds Appveyor
Linux builds Travis-CI

A later PR will have x11 building on Linux. There are a few more planned changes in the C code.

Wayland support, and a few select RTOS's might be an interesting addition.

Cheers,
Joel

@GitMensch

Copy link
Copy Markdown
Collaborator

The current appveyor builds fail because of missing DESTDIR setting. Please fix and drop a note, thank you.
I'm very interested in including TravisCI, to - do you want to include this in this PR or do you see a need to create an additional one?

@GitMensch GitMensch changed the title CMake tested on Windows, and Linux CMake tested on Windows, and Linux; Build automation Oct 12, 2018
@jwinarske

Copy link
Copy Markdown
Contributor Author

This Travis-CI job is good, Appveyor is still cooking.

Tavis-CI Build
Appveyor Build

I think once the Windows support (just announced) for Travis-CI has been flushed out, I would move it all over to Travis-CI, and remove the Appveyor config. Travis-CI seems a bit more responsive.

I'll add the CMake x11 support in another PR. It's currently building without CMake in the Travis-CI config.

@GitMensch

Copy link
Copy Markdown
Collaborator

I think once the Windows support (just announced) for Travis-CI has been flushed out, I would move it all over to Travis-CI, and remove the Appveyor config. Travis-CI seems a bit more responsive.

Currently only VS2017 is part of Travis-CI for Windows, therefore Appveyor will likely stay for quite a long time. A "thing" may also be: Travis-CI uses Google Compute Engine, I think Appveyor uses their own infrastructure. But as far as I've understood this you should be able to include Windows build (VS2017) for PDCurses now, if you like to.

I'll add the CMake x11 support in another PR. It's currently building without CMake in the Travis-CI config.

Sounds good (both the "builds without CMake" and the "will be integrated later".

Something that seems to be missing in the travis script are the artifacts, can you add these / point me to them, please?

@jwinarske

Copy link
Copy Markdown
Contributor Author

For Travis-CI the build artifacts go to the bit bucket, unless you implement a deploy step.
Supported interfaces here: https://docs.travis-ci.com/user/deployment/

Appveyor stores build artifacts for six months, and supports VS2015, and VS2017. Preferably it would go back to VS2008 (WinCE6).

We need to determine the CI release process, and determine what the plan is for storing artifacts.

@jwinarske jwinarske changed the title CMake tested on Windows, and Linux; Build automation CMake tested on Mac OSX, Windows, and Linux; Build automation Oct 16, 2018
@GitMensch

Copy link
Copy Markdown
Collaborator

Hm, I'm personally not that impressed by the "setup extra steps and upload something" in Travis. This is nice for a release but temporary artifacts for PR like Appveyor has are quite nice - and a reason to keep Appveyor ;-)

Do you see anything missing here? If not I'll merge this PR after we can see the build variant in Travis (seeing it easier in Appveyor would be nice, too - I suggest to use the same definition that will be shown in front of the build job name).

@jwinarske

jwinarske commented Oct 16, 2018 •

Copy link
Copy Markdown
Contributor Author

There are a ton of options regarding CI; AWS, Google, Azure, etc. I just picked these two because they seem the most popular in the Open Source community. Yes the artifact storage is handy, and can be utilized for reproduction of a reported issue. If they can't repro their problem with the Windows CI bits, then it's a configuration problem on their end ;)

Outstanding items for this PR:

  1. Squash cmake branch commits to 1
  2. A Bill-Gray/PDCurses Admin needs to create a project on Travis-CI.com, and ci.appveyor.com.

I'm not clear on what you mean by "after we can see the build variant". This is the build overview:

image

Cheers

@GitMensch

Copy link
Copy Markdown
Collaborator

I'm not clear on what you mean by "after we can see the build variant"

I fail to see which of these builds are for SDL2, x11, there (similar on Appveyor)...
To "solve" this I suggest to add a define as very first position, so "BUILD_TYPE=DEBUG CMAKE_ARGS...." would change to something like "BUILD=SDL2 BUILD_TYPE=DEBUG...".

A Bill-Gray/PDCurses Admin needs to create a project on Travis-CI.com, and ci.appveyor.com.

You mean https://ci.appveyor.com/project/GitMensch/pdcurses (this builds the master branch and any pull requests)? For Travis we'd need @Bill-Gray to do so, the "free subscription" only allows to select repositories from the user's own repositories and if you work around this get an error message "Repositories must be owned by GitMensch" (=>admin is not enough for Travis).

@jwinarske

Copy link
Copy Markdown
Contributor Author

I see. Yeah we can add a variable that starts with a value less than "A", like "_". I'll test it. What would be easiest to understand given the real estate?

So each build job contains whatever is supported by the host type. In the case is Linux, it had the sdl2 stack, VT, and ncurses. Same for OSX. For Appveyor (windows flavor) it has sdl2 stack, wincon, wingui, os2, dos16, and dos32. Easiest to refer to the support matrix on the top of the PR.

At some point I can add Android sdl2 to the Travis job list. Not sure that's of any interest though.

Yeah the CI isn't mandatory, but it's there and it works for those who like to use it.

@GitMensch

Copy link
Copy Markdown
Collaborator

To get out as most as possible you could also add a mingw build to Travis-CI (at least wincon/wingui), see sample travis change.
Adding ARM would be a nice thing, too, but why limit this to SDL2 and not compiling all ports for GNU/Linux?

Is there any problem in the source that prevents Open Watcom to compile the Windows and/or GNU/Linux ports?

In general I'm perfectly fine to postpone this to another PR :-)

Actually one port is currently missing and even when I don't use it myself it would be nice to include it to provide a more complete build matrix. Can you add SDL1?

Defining a variable for the port that starts with "_" (or with "a") sounds reasonable.

@Bill-Gray

Copy link
Copy Markdown
Owner

@jwinarske @GitMensch Thanks for tackling this. I've been asked about both CMake and Travis-CI from time to time, but it's not been on my priority list. I've also been busy with a few other projects; as you've seen, aside from a few fixes to the VT flavor, I've done virtually nothing on PDCurses for months.
I've just enabled the "free subscription" for Travis-CI. I'm totally new to it, but it appears to be ready to go.

@jwinarske

Copy link
Copy Markdown
Contributor Author

To get out as most as possible you could also add a mingw build to Travis-CI (at least wincon/wingui), see sample travis change.
Adding ARM would be a nice thing, too, but why limit this to SDL2 and not compiling all ports for GNU/Linux?

Yes I would say someone would eventually want to add all variations to the build matrices... For now I just have CMake, as it's validation for my work.

Is there any problem in the source that prevents Open Watcom to compile the Windows and/or GNU/Linux ports?

For now I'm only using OpenWatcom v1/2 for DOS/OS2, it was just a logical conclusion. If you can provide the current supported (less-CMake) build matrix for all the projects, and can try to reach parity with CMake.

In general I'm perfectly fine to postpone this to another PR :-)

Actually one port is currently missing and even when I don't use it myself it would be nice to include it to provide a more complete build matrix. Can you add SDL1?

SDL1 dependency building is a bit tricky when it's not CMake based, as SDL1 is. It would be the only exception. Once SDL1 as CMake support, it would be a breeze to drop it in. That would be my preference. I may implement SDL1 CMake support this winter.

Defining a variable for the port that starts with "_" (or with "a") sounds reasonable.

Okay. Will pick this up again Monday evening.

@jwinarske

Copy link
Copy Markdown
Contributor Author

@Bill-Gray Thanks Bill!

@GitMensch

Copy link
Copy Markdown
Collaborator

@Bill-Gray What do you think about registering with Appveyor, too and include this repo "hooked"? As soon as the appveyor.yml is online the build process should start.

@jwinarske Any updates to the travis/appveyor port definition? As far as I'm concerned this PR is otherwise ready to be merged, with the option for more PR (ports, compilers, artifacts [on travis], ...) later. Is there anything other "open" that you want to integrate before?

Appveyor and Travis matrices running

add vt, missing tuidemo, remove sdl1_ext

CMake - support to build SDL2 stack, vt, and ncurses on Mac OSX.  Travis-ci building osx/linux

missing travis config

Adds PDC_OS2_BUILD option, Appveyor building DOS and OS/2 with Open Watcom 2.0
@jwinarske

Copy link
Copy Markdown
Contributor Author

@GitMensch Sounds good, I agree. Nothing is open.

@GitMensch
GitMensch merged commit 0d2fc67 into Bill-Gray:master Oct 27, 2018
@GitMensch

Copy link
Copy Markdown
Collaborator

Sounds good, I agree. Nothing is open.

@jwinarske I actually would prefer if we'd be able to see the port with a define, too, I'm looking forward to more PR - thank you for your CMake work.

@GitMensch

Copy link
Copy Markdown
Collaborator

@jwinarske it is the time to ask again - can you check the cmake, the watcom builds are all broken in the linking phase:

C:\projects\pdcurses\demos\ptest.c: 309 lines, included 5643, 0 warnings, 0 errors
cd C:\projects\pdcurses\build
[ 75%] Linking C executable ptest.exe
cd C:\projects\pdcurses\build\os2
wlink system os2v2 name ptest.exe debug watcom all file {'CMakeFiles\os2_ptest.dir__\demos\ptest.c.obj' } librarypdcursesstatic.lib
Open Watcom Linker Version 2.0 beta May 15 2020 00:41:14 (64-bit)
Copyright (c) 2002-2020 The Open Watcom Contributors. All Rights Reserved.
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
Error! E3033: directive error near 'librarypdcursesstatic.lib'
Error(E42): Last command making (os2\ptest.exe) returned a bad status

As you see the options should be adjusted to include -q, from the toolset manual:

4.11.11 Operate Quietly - "q" Option
The "q" option suppressing the banner and copyright notice that is normally displayed when the OpenWatcom Library Manager is invoked
Example: wlib -q -l mylib

Do you think you could try to fix the cmake setup for os2 again?

@jwinarske

Copy link
Copy Markdown
Contributor Author

@GitMensch make a new ticket and assign it to me. Thanks.

@GitMensch GitMensch mentioned this pull request May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants