Commits


Kevin Gurney authored and Sutou Kouhei committed 72552be99f4
ARROW-13202: [MATLAB] Enable GitHub Actions CI for MATLAB Interface on Linux ## Overview This Pull Request: 1. Enables building of the MATLAB Interface C++ code, running of the C++ tests, and running of the MATLAB tests using GitHub Actions on an `ubuntu-latest` VM. ## Implementation This implementation uses [`matlab-actions`](https://github.com/matlab-actions) to automatically install MATLAB into a GitHub Actions Linux VM. We used the other `ci/scripts/<lang>_build.sh` scripts as inspiration for `matlab_build.sh`. Essentially, `matlab_build.sh` just invokes CMake, followed by CTest, to build and run the MATLAB Interface C++ source and tests. It also automatically builds the C++ Arrow libraries (i.e. `libarrow.so`) in the process. Support for automatically building `libarrow.so` as part of the MATLAB CMake build was added in https://github.com/apache/arrow/pull/10614. We realize that many of the other Arrow language bindings use Docker for their CI workflows on Linux. However, [`matlab-actions/setup-matlab`](https://github.com/matlab-actions/setup-matlab) does not currently support installing MATLAB into Docker containers in GitHub Actions, so we used a "bare" Linux VM-based approach. ## Testing 1. The GitHub Actions workflows pass successfully with no errors. 2. All C++ test results and MATLAB test results can be viewed in the the workflow logs. 3. We made code changes that caused C++ and MATLAB test failures and were able to verify that the GitHub Actions workflow failed as a result. ## Future Directions 1. Enable support for macOS and Windows. [`matlab-actions/setup-matlab`](https://github.com/matlab-actions/setup-matlab) only supports Linux-based VMs in GitHub Actions right now. However, we have a strong desire to support all major platforms for CI in the future. Hopefully, Linux CI support should hold us over until we can add support for other platforms. 2. Enable Docker-based builds for greater control over dependencies and build environment. We also recognize the benefits of developers being able to run CI workflows in local Docker containers for pre-qualification. [`matlab-actions/setup-matlab`](https://github.com/matlab-actions/setup-matlab) does not currently support installing MATLAB into GitHub Actions hosted Docker containers. 3. Reduce overall build time by separating out building of the Arrow C++ libraries from building of the MATLAB interface. This would also enable us to avoid running all of the C++ library tests unnecessarily during the MATLAB build by building GoogleTest separately. ## Notes This was a Team effort! Several MathWorkers played important roles in getting this working! 1. @sreeharihegden did the **vast majority** of the groundwork to get this working! He's away for a while, so @sgilmore10 and I took over in his absence. Thank you for all of your hard work, Sreehari! **I think @sreeharihegden's commits are not getting properly associated with his GitHub account. I would greatly appreciate it if whoever ends up integrating these changes after review can ensure that his name is properly added as a Co-author for this pull request. Thank you!** 2. @sgilmore10 worked directly with me to get this working! Thank you, Sarah! 3. @lafiona also helped me out a great deal to understand GitHub Actions and nail down the exact source of the build issues we were encountering. Thank you, Fiona! Closes #10932 from kevingurney/ARROW-13202 Lead-authored-by: Kevin Gurney <kgurney@mathworks.com> Co-authored-by: sgilmore <sgilmore@mathworks.com> Co-authored-by: Kevin Gurney <5904145+kevingurney@users.noreply.github.com> Co-authored-by: shegden <shegden@mathworks.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>