Skip to content
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

Add build system and continuous integration (Windows, macOS, Linux) #14

Merged
merged 102 commits into from
Jul 21, 2019

Conversation

kevinlul
Copy link

Tested on 18.04 Bionic; explanation on wiki
fmt no longer needs to be cloned locally; install via apt-get. Moved in premake5.lua so Windows keeps working for now.
Added .gitignore for premake5 binary since this script drops it right in the working directory for convenience.

@DyXel
Copy link
Collaborator

DyXel commented Jun 17, 2019

I cannot test this script, and im unwilling to merge without testing. When someone test it we should be able to merge without issues!

@kevinlul
Copy link
Author

kevinlul commented Jun 18, 2019

Proof of success: https://travis-ci.org/kevinlul/ygopro/builds/547454936

Can also confirm by testing on fresh Ubuntu VM image and following wiki instructions. (This is pretty much Travis though.)

Confirmed as working on fresh Windows Subsystem for Linux Ubuntu 18.04

@kevinlul kevinlul changed the title Add prebuild script for Ubuntu Add prebuild and deploy scripts for Windows, macOS, Linux and set up Travis CI with the same Jun 20, 2019
@kevinlul
Copy link
Author

At this point, the Linux scripts and CI are working well. I will focus on the remaining platforms and patch the Linux scripts as needed. Platform scripts will be merged into this branch when they are confirmed working well.

@kevinlul
Copy link
Author

kevinlul commented Jun 20, 2019

Merged prebuild and deploy system for macOS and updated Travis to match.

  • On macOS, Lua installs from source
  • Enabled caching fmt and nlohmann-json on Linux. Caching not enabled for macOS because Lua builds quickly enough
  • Do not build nlohmann-json and run tests; just download raw from GitHub

Issues:

  • only builds on Mojave with Xcode; doesn't build with GCC9 on Mojave either
  • *dll configurations don't work

Possibly remedy for Sierra/High Sierra situation: https://github.com/phracker/MacOSX-SDKs/releases

Tested on 18.04 Bionic; explanation on wiki
fmt no longer needs to be cloned locally; install via apt-get. Moved in premake5.lua so Windows keeps working for now.
Added .gitignore for premake5 binary since this script drops it right in the working directory for convenience.
- only ignore build/
- all scripts must be run from repo root, see wiki for details
- install-ubuntu-apt.sh gets everything you can get from apt
- install-ubuntu-src.sh builds fmt and nlohmann-json from source and installs to /usr/local instead of doing some sketchy apt repo shuffling
- install-ubuntu-bin.sh downloads premake5 and irrKlang binaries into the working directory
- By default moves the release binaries, set BUILD_CONFIG=debug to choose debug
- Only strips the release binary of debug symbols
- Does not retrieve FONTS since we can't decide! To do later.
build-essential, cmake, curl are not needed since they are preinstalled

TODO: possibly test on other GCC and Clang versions
Corresponding update for ocgcore

Current build fails on linking irrlicht: https://pastebin.com/KVL2DTwu
@kevinlul kevinlul force-pushed the prebuild-ubuntu branch 2 times, most recently from 26ef111 to 1c67135 Compare July 12, 2019 12:42
@DyXel DyXel requested a review from edo9300 July 19, 2019 01:50
@kevinlul kevinlul force-pushed the prebuild-ubuntu branch 2 times, most recently from babcb75 to 0182f62 Compare July 19, 2019 13:12
@kevinlul
Copy link
Author

Pending change: revert freetype to system freetype on macOS, test behaviour on Linux and update accordingly.

@kevinlul
Copy link
Author

Also requires edo9300/ygopro-core#48

@kevinlul
Copy link
Author

kevinlul commented Jul 20, 2019

Changes:

  • Update gitignore to ignore downloaded prerequisities, dependencies, and deploy directory
  • Add scripts in build-support to obtain prerequisites, dependencies, build needed dependencies from source, and quickly deploy a usable version. Usage is explained on wiki
    • Obtain most dependencies on Windows from vcpkg, except for freetype (2.6.5) and irrlicht (patched)
    • Build irrlicht (patched) and lua from source on macOS
    • Default Ubuntu scripts are meant for 16.04 Xenial Xerus and 18.04 Bionic Beaver, building missing ones from source. Other distributions and versions will probably need to obtain dependencies manually, following the list on the wiki. (This may be better organized in the future.)
  • Add Travis configuration to make use of these build scripts on a cross-platform build matrix, complete with force-push deploying to the specified repository branches
  • Fix compilation and linking issues on tested platforms and toolchains
  • Reorganized build configuration files, removed unneeded ones
  • Added premake option to specify image URLs
  • Update font to OFL-licensed Noto Sans JP Regular

To do when or after merging @edo9300 :

  • Set submodule configuration back to edo9300/ygopro-core
  • Update ocgcore pointer appropriately

@edo9300 edo9300 merged commit 5a25063 into edo9300:master Jul 21, 2019
@kevinlul kevinlul deleted the prebuild-ubuntu branch August 18, 2019 14:44
@kevinlul kevinlul added the enhancement Internal implementation improvements label Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Internal implementation improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants