Skip to content

NOTE: Gotchas when building on GitHub Actions #1

@chase

Description

@chase
  • Fetching the external tarballs is dreadfully slow
    • Caching them based on the hash of download.lst and the hashes of the files in the external directory seems sufficient
  • Hosted runners effectively only have 13 GiB of working space
    • The volume mounted at C: has more space, this is used as a workaround in other large projects like Blender
    • Ideally, having something like sccache working reliably would make builds faster and use less space, but according to the LibreOffice wiki it isn't reliable
    • Alternatively, automatically calculating the dependency graph from the make file would mean:
      • We can split the build into multiple jobs, taking advantage of workflow concurrency to build faster
      • We can copy only the necessary target files and not the intermediate build objects, reducing the required space
      • Someone actually understands the custom build system created for OpenOffice/LibreOffice
  • The translations and dictionaries directories have many files and add up to ~1.75 GiB
    • Some languages take up much more space than others, and we currently only build for en, so
      • Dictionaries do not respect the configured language list, so we changed dictionaries/Module_dictionaries.mk to prevent building additional languages
      • We tried using a sparse checkout to avoid fetching the unused language files, but they caused some things to break
  • LibreOffice's makefiles assumes that core.git is the top-level git directory, not nested as a subtree
    • make fetch assumes the repo is an expanded tarball. Tarball release checks were removed
    • For a non-obvious reason, this broke the build for winaccessibility when compiling the IDL files
    • midl : error MIDL9008 : internal compiler problem, doesn't actually have a workaround in the MS documentation like the message suggests
    • The error midl: Assertion failed: hr == S_OK, file com\rpc\midl\front\filehndl.cxx, line 1023 seems specific to LibreOffice
      • Some others from LibreOfficeChina also encountered this, but it seems no one found a solution
    • Building it out of band with cd winaccessibility && make CustomTarget_winaccessibility/ia2/idl works 🤷

Cygwin Weirdness

There are not specific to GitHub Actions, but more along the lines of things we had to do in order to get a build going at all.

  • autogen.sh by default will not find the appropriate pieces of Visual Studio 2019 to necessary to build certain externals such as expat
  • vcvars64.bat needs to be run before the Cygwin environment is setup, then everything builds
  • Some externals mess up the environment variables after being built, and break further steps in the builds process
    • Manually building the externals' dependencies and then the externals themselves resolves this: make solenv zlib libpng freetype expat fontconfig cairo icu openssl libffi python3 nss boost

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions