-
Notifications
You must be signed in to change notification settings - Fork 24
123 lines (103 loc) · 3.52 KB
/
Copy pathbuild.yml
File metadata and controls
123 lines (103 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build
on:
push:
branches:
- main
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'
################### Deps/Configure/Build (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 ../../
################### Configure/Build 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
####### Python config / install gomy / test gompy (Linux/MacOS) ##############
- name: Python config (Linux/MacOS)
if: runner.os != 'Windows'
run: |
echo PYTHONPATH=$HOME/etc/python >> $GITHUB_ENV
mkdir -p $HOME/etc/python
- name: Install gompy (Linux/MacOS)
if: runner.os != 'Windows'
run: |
build/${{ env.platform }}/bin/graphite batch=true \
lib/programming_examples/Python/install_gompy.lua
- name: Test gompy (Linux/MacOS)
if: runner.os != 'Windows'
run: python3 lib/programming_examples/Python/gompy_example.py
####### Python config / install gompy / test gompy (Windows) #################
- name: Python config (Windows)
if: runner.os == 'Windows'
run: |
mkdir $HOME/etc/python
echo "PYTHONPATH=$HOME/etc/python" | Out-File -FilePath `
$env:GITHUB_ENV -Append
- name: Install gompy (Windows)
if: runner.os == 'Windows'
run: |
build/Windows/bin/${{ matrix.config }}/graphite.exe batch=true `
lib/programming_examples/Python/install_gompy.lua
type $HOME/etc/python/gompy.py
dir build/Windows/bin/${{ matrix.config }}
- name: Test gompy (Windows)
if: runner.os == 'Windows'
run: |
python3.exe lib/programming_examples/Python/gompy_example.py & 0
- name: List files (Windows)
if: runner.os == 'Windows'
run: |
dir