-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.85 KB
/
build_exe.yml
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
name: Build executables
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.7'
- name: Install dependencies (Linux)
run: |
python -m pip install --upgrade pip
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
python -m pip install GDAL numpy pyinstaller wheel
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
if: ${{ runner.os == 'Linux' }}
- name: Install conda (Windows)
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.7
channels: conda-forge
channel-priority: strict
if: ${{ runner.os == 'Windows' }}
- name: Install dependencies (Windows)
run: |
conda install gdal pyinstaller
if: ${{ runner.os == 'Windows' }}
- name: Install CTB (Linux)
run: |
mkdir cesium-terrain-builder/build
cmake -DCMAKE_BUILD_TYPE=Release -S cesium-terrain-builder -B cesium-terrain-builder/build && cmake --build cesium-terrain-builder/build
if: ${{ runner.os == 'Linux' }}
- uses: ilammy/msvc-dev-cmd@v1
- name: Install CTB (Windows)
run: |
mkdir cesium-terrain-builder\build
cmake -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" -S cesium-terrain-builder -B cesium-terrain-builder\build && cmake --build cesium-terrain-builder\build
if: ${{ runner.os == 'Windows' }}
- name: Build distribution (Linux)
run: |
export PROJ_LIB=/usr/share/proj
pyinstaller --clean --onedir geoconverter/app.py --add-data "cesium-terrain-builder/build/tools/ctb-tile:." --add-data "$PROJ_LIB:proj" --add-binary "cesium-terrain-builder/build/src/libctb.so:."
if: ${{ runner.os == 'Linux' }}
- name: Build distribution (Windows)
run: |
$env:PROJ_LIB="$env:CONDA_PREFIX\Library\share\proj"
pyinstaller --clean --onedir geoconverter/app.py --add-data "cesium-terrain-builder\build\tools\ctb-tile.exe;." --add-data "$env:PROJ_LIB;proj" --add-binary "cesium-terrain-builder\build\src\ctb.dll;."
if: ${{ runner.os == 'Windows' }}
# For debugging
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Upload artifact (Linux)
uses: actions/upload-artifact@v3
with:
name: gdal_converter_linux
path: dist/app
if: ${{ runner.os == 'Linux' }}
- name: Upload artifact (Windows)
uses: actions/upload-artifact@v3
with:
name: gdal_converter_win64
path: dist\app
if: ${{ runner.os == 'Windows' }}