4 Commits

Author SHA1 Message Date
Tom Finegan
b7655f7391
Replace the existing test workflow with draco-ci from ci.yml. (#806)
This replaces test.yml with ci.yml and renames the test to draco-ci.

A Github PR with this all put together exists at the following link:
https://github.com/google/draco/pull/806

An example draco-ci test summary exists at this link:
https://github.com/google/draco/actions/runs/1789061363

- Add the following test configurations in a job named
  draco-tests.

  test-macos-make-release-shared
  test-macos-make-release-static
  test-macos-xcode-release-shared
  test-macos-xcode-release-static
  test-ubuntu-make-release-shared
  test-ubuntu-make-release-static
  test-windows-msvc-release-shared
  test-windows-msvc-release-static
  test-windows-make-release-shared
  test-windows-make-release-static

  Each configuration name is intended to be self documenting.
  All configurations build Draco with tests enabled, and then
  run the tests.

- Add the following test configurations in a job named
  draco-install-tests:

  install-test-ubuntu-make
  install-test-macos-make
  install-test-macos-xcode
  install-test-windows-make
  install-test-windows-msvc

  Each configuration runs test.py in verbose mode to allow for
  failure diagnostics.

Some additional changes to make all this work (and improve usability):
- draco-config.cmake now defines DRACO_LIBRARY_DLL and DRACO_FOUND.
  - DRACO_LIBRARY_DLL will contain the full path to the Draco DLL on systems that
     produce DLL files (aka Windows).
- test.py now streams output in verbose mode
2022-02-03 13:05:31 -08:00
Tom Finegan
9fd0a50a6f
Add install target testing. (#796)
Add a script that builds and installs Draco in shared and static configurations,
and confirms that a simple test application can compile, link and run 
successfully using the CMake configuration provided by each Draco installation.

To run the test script:

cd draco/src/draco/tools/install_test
python3 test.py

By default the script runs silently using the default generator for the CMake 
executable in the user's path. Verbose output is behind the usual flags (`-v`).
The CMake generator can be specified using the `-G` argument.

The script is known to work with the following generators:
- Unix Makefiles
- MSVC (Visual Studio 16 2019)
- Xcode
2022-02-02 16:05:53 -08:00
Tom Finegan
931bafe578
draco: Improve installation and packaging support.
- Fixed omission of draco_version.h when installed in static
  configurations.
- Remove DracoConfig.cmake: it was broken and we actually use
  draco-config.cmake.
- Update FindDraco.cmake so it actually has a chance of working
  properly. Fixed usage of find_path() and subsequent related errors.
- Correct the usage of CMakePackageConfigHelpers in installation target setup
  and the config template.
- Add a CMake version file.
- Normalize the Draco variables exposed in CMake.
  - draco_FOUND -> DRACO_FOUND
  - DRACO_INCLUDE_DIRS, draco_INCLUDE_DIRS -> DRACO_INCLUDE_DIR
  - DRACO_LIBRARIES, draco_LIBRARIES -> DRACO_LIBRARY
  - DRACO_LIBRARY_DIRS, draco_LIBRARY_DIRS -> DRACO_LIBRARY_DIR
  - draco_VERSION_STRING -> DRACO_VERSION
- Use full path variants of GNUInstallDirs variables to init our
  install paths.

Fixes https://github.com/google/draco/issues/764

* Add install() for draco-version.cmake.
2021-12-06 09:58:05 -08:00
Tom Finegan
8a979f79a5 Draco v1.4.0 2020-12-01 13:01:33 -08:00