Skip to content

Build

Build #39

Workflow file for this run

name: Build
on:
workflow_dispatch
jobs:
build:
name: ${{ matrix.name }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-2022]
config: [Debug, Release]
include:
- os: macos-14
name: macOS
- os: ubuntu-22.04
name: Linux
- os: windows-2022
name: Windows
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Checkout exploragram
uses: actions/checkout@v3
with:
repository: BrunoLevy/exploragram
path: geogram/src/lib/exploragram
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
################### Linux/MacOS ###############################################
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install xorg-dev
- name: Configure (Linux/MacOS)
if: runner.os != 'Windows'
run: |
cp cmake/default_plugins.txt plugins/OGF/Plugins.txt
./configure.sh
(cd geogram; ./configure.sh)
echo "platform="\
`./geogram/configure.sh --show-platform`-${{ matrix.config }} >> $GITHUB_ENV
- name: Build (Linux/MacOS)
if: runner.os != 'Windows'
run: |
cd build/${{ env.platform }};\
make -j2 2>&1 |tee ../../build_log.txt
cd ../../
################### Windows ##################################################
- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
copy cmake/default_plugins.txt plugins/OGF/Plugins.txt
./configure.bat
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
cmake --build build/Windows --config ${{ matrix.config }} `
| tee -filepath build_log.txt
###############################################################################
- name: Install gompy
if: runner.os != 'Windows'
run: |
export PYTHONPATH=$HOME/etc/python:$PYTHONPATH
mkdir -p $HOME/etc/python
build/${{ env.platform }}/bin/graphite batch=true lib/programming_examples/Python/install_gompy.lua
cat $HOME/etc/python/gompy.py
- name: Test gompy with a script
if: runner.os != 'Windows'
run: |
export PYTHONPATH=$HOME/etc/python:$PYTHONPATH
export DYLD_LIBRARY_PATH=`pwd`/build/${{ env.platform }}/lib
python3 --version
python3 lib/programming_examples/Python/gompy_example.py