write the dependencies into a file #579
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# GitHub Actions Workflow to test building Easy3D on Windows, Ubuntu, and macOS. | |
# | |
# Copyright (C) 2022 Liangliang Nan <[email protected]> | |
# | |
# Licensed under GNU LGPL.3, see LICENCE file | |
############################################################################## | |
name: Test Build Easy3D | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: "Build on ${{ matrix.platform }} - ${{ matrix.build_type }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest, ubuntu-latest, macos-latest] | |
build_type: [Debug, Release] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
# Checkout the code | |
- uses: actions/checkout@v3 | |
# Install dependencies for each platform | |
- name: Install Dependencies (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update || true | |
sudo apt-get install -y cmake build-essential libgl1-mesa-dev \ | |
mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev \ | |
libcgal-dev qt6-base-dev \ | |
libavcodec-dev libavformat-dev libswscale-dev libavutil-dev | |
- name: Install Dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew update || true | |
brew install cmake cgal qt ffmpeg wxwidgets | |
# Set up Conda on Windows | |
- name: Set up Conda (Windows) | |
if: runner.os == 'Windows' | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
architecture: x64 | |
activate-environment: Easy3DDev | |
auto-activate-base: false | |
channels: conda-forge,defaults | |
# Install Conda packages on Windows | |
- name: Install Dependencies via Conda (Windows) | |
if: runner.os == 'Windows' | |
shell: bash -l {0} | |
run: | | |
conda install -y \ | |
ninja \ | |
conda-forge::qt6-main \ | |
conda-forge::wxwidgets \ | |
conda-forge::cgal \ | |
conda-forge::ffmpeg || exit 1 | |
# Configure the project | |
- name: Configure (Linux & macOS) | |
if: runner.os != 'Windows' | |
run: | | |
cmake -S . -B build/${{ matrix.build_type }} \ | |
-G "Unix Makefiles" \ | |
-DEasy3D_BUILD_PYTHON_BINDINGS=ON \ | |
-DEasy3D_BUILD_TUTORIALS=ON \ | |
-DEasy3D_BUILD_TESTS=ON \ | |
-DEasy3D_ENABLE_CGAL=ON \ | |
-DEasy3D_ENABLE_QT=ON \ | |
-DEasy3D_ENABLE_FFMPEG=ON | |
- name: Configure (Windows) | |
if: runner.os == 'Windows' | |
shell: bash -l {0} | |
run: | | |
cmake -S . -B build/${{ matrix.build_type }} \ | |
-G "Visual Studio 17 2022" \ | |
-A x64 \ | |
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX/Library" \ | |
-DwxWidgets_ROOT_DIR="$CONDA_PREFIX/Library" \ | |
-DEasy3D_BUILD_PYTHON_BINDINGS=ON \ | |
-DEasy3D_BUILD_TUTORIALS=ON \ | |
-DEasy3D_BUILD_TESTS=ON \ | |
-DEasy3D_ENABLE_CGAL=ON \ | |
-DEasy3D_ENABLE_QT=ON \ | |
-DEasy3D_ENABLE_FFMPEG=ON | |
# Build the project | |
- name: Build (Linux & macOS) | |
if: runner.os != 'Windows' | |
run: cmake --build build/${{ matrix.build_type }} | |
- name: Build (Windows) | |
if: runner.os == 'Windows' | |
shell: bash -l {0} | |
run: cmake --build build/${{ matrix.build_type }} --config ${{ matrix.build_type }} |