Skip to content

build: Add CMake build #3621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 270 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
270 commits
Select commit Hold shift + click to select a range
3f11960
fix path to grass/script/setup.py
neteler Jan 2, 2023
0081ec1
remove files deleted in PR #1400
neteler Jan 2, 2023
39ac99f
Fix missing EOL
neteler Jan 2, 2023
41498f0
just peek in the folder (by @echoix)
neteler Jan 3, 2023
b5adab3
sync clang-format changes from main
neteler Jan 4, 2023
2697c9e
apply clang-format
nilason Jan 4, 2023
11eefd9
cmake_minimum_required version 3.11
neteler Jan 4, 2023
1065835
update to CMake 3.11.4
neteler Jan 4, 2023
3d2b8b2
add VERBATIM
neteler Jan 4, 2023
6aaa922
homogenize ubuntu image name
neteler Jan 4, 2023
5faf3e4
use of INFINITY and NAN
lbartoletti Jun 5, 2023
bc882ce
Simplify and use PROJ_H_
lbartoletti Jun 3, 2023
fbb18a8
CMakeLists.txt: add include_irectories to grass
lbartoletti Jun 3, 2023
07d7eef
raster/CMakeLists.txt: fix GDAL_VERSION
lbartoletti Jun 3, 2023
60f3894
add aprintf.c
lbartoletti Jun 4, 2023
c45e157
v.neighbors requires grass_stats
lbartoletti Jun 4, 2023
501bf70
ctypesgen.py: main module is not ctypesgen.py but run.py. fix it.
lbartoletti Jun 4, 2023
7751d33
lib/rst: fix build. Remove DEFS POINT2D_C
lbartoletti Jun 5, 2023
d3ac69a
python: copy grassdb
lbartoletti Jun 5, 2023
8c70cde
propose ccache to speedup build
lbartoletti Jun 5, 2023
7d2d4ef
mkhtml.py depends on a sibling python script
aaronsms Jun 5, 2023
29fa95c
make libraster libvector link with lapack when it is available
aaronsms Jun 5, 2023
0999184
add the 3 missing raster modules
aaronsms Jun 5, 2023
9b92c9a
display: add d.rgb, d.rhumbline, d.text, d.title, d.vect.*
lbartoletti Jun 5, 2023
80c090d
raster: enable r3.mapcalc
lbartoletti Jun 5, 2023
362f81a
raster: enable r.object.geometry
lbartoletti Jun 6, 2023
625181f
ps: enable ps.map
lbartoletti Jun 6, 2023
b1ad3a9
python/grass: add utils (will be used by g.download.location scripts)
lbartoletti Jun 6, 2023
b4144e5
scripts: add d.background, g.download.location, i.band.library, r.sem…
lbartoletti Jun 6, 2023
e7f94a7
temporal: add t.copy and t.upgrade
lbartoletti Jun 6, 2023
073bed8
add an optional cmake to use alternate linker
lbartoletti Jun 6, 2023
3793f5b
gui/wxpython: copy main_window dir
lbartoletti Jun 6, 2023
03ca9ae
init: copy lock, echo, run, clean_temp and winlocale
lbartoletti Jun 6, 2023
af00fab
minor fixes just to move forward
nilason Aug 14, 2023
94a6b32
apply cmake-format
nilason Aug 14, 2023
69392ec
Very WIP commit, various changes
nilason Mar 3, 2024
fa702a9
Define global PYTHON_EXECUTABLE
HuidaeCho Apr 18, 2024
1be74e3
Shared library versioning and symlinks
HuidaeCho Apr 18, 2024
7186e9c
Rename grass.sh to grass and set 755 permissions
HuidaeCho Apr 18, 2024
61cd5fc
Rename project to GRASS
HuidaeCho Apr 18, 2024
edc25ba
Define PYTHON_EXECUTABLE from CheckDependentLibraries.cmake
HuidaeCho Apr 18, 2024
ca13896
Add dependency properties
HuidaeCho Apr 18, 2024
cc8bfdf
libjpeg not required anymore?
HuidaeCho Apr 18, 2024
4a92f5c
cmake-format
HuidaeCho Apr 19, 2024
cf9db5c
Honor WITH_LIBLAS
HuidaeCho Apr 19, 2024
ab9de1e
Indentation
HuidaeCho Apr 19, 2024
7d40ac7
Fix Python_EXECUTABLE to PYTHON_EXECUTABLE
HuidaeCho Apr 19, 2024
2d09ff0
Do not overwrite BINARY_DIR cmake property
HuidaeCho Apr 19, 2024
1e2b717
Move directory settings
HuidaeCho Apr 19, 2024
1f20241
Build directly into GISBASE
HuidaeCho Apr 20, 2024
ee9b9b0
Rename tools directory to utils to be consistent
HuidaeCho Apr 20, 2024
952da36
No need to copy G_NAME to itself now
HuidaeCho Apr 20, 2024
496d82c
Rename G_SRCDIR to G_SRC_DIR for consistency; Do not create tmp.html …
HuidaeCho Apr 20, 2024
e234646
Do not touch empty files; Do not run html-description if G_RUNTIME_OU…
HuidaeCho Apr 20, 2024
7a0b99b
Don't chdir unnecessarily
HuidaeCho Apr 20, 2024
99a8f1e
Set GRASS_HEADERS_(VERSION|DATE) for g.version
HuidaeCho Apr 20, 2024
4d97f59
Remove JPEG
HuidaeCho Apr 20, 2024
f007776
Add MySQL support
HuidaeCho Apr 20, 2024
93987e2
Support MySQL
HuidaeCho Apr 20, 2024
e0feca0
Move mysql_SRCS to top
HuidaeCho Apr 20, 2024
accfc82
Mixed-case PostgreSQL_* variables
HuidaeCho Apr 20, 2024
cb7d540
Mixed-case MySQL_* variables
HuidaeCho Apr 20, 2024
184d8e3
Mixed-case LibLAS_FOUND
HuidaeCho Apr 20, 2024
347f6f3
Use original mixed-case *_FOUND
HuidaeCho Apr 20, 2024
b9ccfbe
Support readline
HuidaeCho Apr 20, 2024
0f5ef8f
Consistent help messages
HuidaeCho Apr 20, 2024
510ae70
Require WITH-libraries
HuidaeCho Apr 20, 2024
9537f73
Support zstd
HuidaeCho Apr 21, 2024
5a9604f
Support regex
HuidaeCho Apr 21, 2024
98718a0
Support OpenMP
HuidaeCho Apr 21, 2024
ba7440e
cmake-format
HuidaeCho Apr 21, 2024
15dd45a
Add -fopenmp only if OpenMP is requested and found
HuidaeCho Apr 21, 2024
05a907d
Reorder options by group; Clean up dependencies for libraries and mod…
HuidaeCho Apr 21, 2024
99659d5
Add missing dependencies to lidar
HuidaeCho Apr 21, 2024
d7a2596
Update lib/external/ccmath/ccmath.h
HuidaeCho Apr 21, 2024
4470c01
Update lib/external/ccmath/ccmath.h
HuidaeCho Apr 21, 2024
e65d616
Update lib/gis/user_config.c
HuidaeCho Apr 21, 2024
3d174f7
Update raster/r.terraflow/filldepr.cpp
HuidaeCho Apr 21, 2024
3442674
Update raster/r.terraflow/main.cpp
HuidaeCho Apr 21, 2024
c8b3470
Compile parson
HuidaeCho Apr 21, 2024
afd1421
Add parson dependency
HuidaeCho Apr 21, 2024
39216fd
Remove duplicate regex check
HuidaeCho Apr 21, 2024
e63162c
Add GUI history
HuidaeCho Apr 21, 2024
3d90f19
Copy install to GISBASE; Fix ctypesgen
HuidaeCho Apr 21, 2024
14ac436
Copy include to GISBASE
HuidaeCho Apr 21, 2024
7d1db08
Copy render_cmd.py to GISBASE/etc/d.mon
HuidaeCho Apr 21, 2024
f0717a6
Extend copy_python_files_in_subdir to copy on build event
HuidaeCho Apr 21, 2024
e71e808
Copy lib/symbol/symbol to GISBASE/etc/symbol
HuidaeCho Apr 21, 2024
be0ec4b
Copy symbol images to GISBASE/gui/images/symbols
HuidaeCho Apr 21, 2024
038e75d
Copy fonts and create fontcap
HuidaeCho Apr 22, 2024
f138526
Resolve a dependency loop
HuidaeCho Apr 22, 2024
b87c014
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
91b4830
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
8259dca
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
a8747d8
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
59699b4
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
8a2b92f
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
982194d
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
7397ab5
Add postgres versions 14-16
HuidaeCho Apr 22, 2024
8580f11
Add Findzstd.cmake
HuidaeCho Apr 22, 2024
76b99ab
Add grass_gis dependency to symbol (G_malloc)
HuidaeCho Apr 22, 2024
cb3b4eb
Address an issue with excluding PNG files
HuidaeCho Apr 22, 2024
fbc51ae
Revert pngdriver.h; if we need it, should be done in a new PR
HuidaeCho Apr 22, 2024
aa4cffd
Require CMake 3.16.0; format to yamllint *manually* (do we have a for…
HuidaeCho Apr 22, 2024
89ae499
CHMOD (cmake 3.19) workaround for 3.16
HuidaeCho Apr 22, 2024
a6bc894
Use full path to /bin/chmod for security
HuidaeCho Apr 22, 2024
838effa
chmod 755 instead of chmod a+x
HuidaeCho Apr 22, 2024
3fab740
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
733553a
Update gui/images/CMakeLists.txt
HuidaeCho Apr 22, 2024
8cdcca8
Use CMAKE_VERSION VERSION_* instead of comments for CHMOD
HuidaeCho Apr 22, 2024
6bef1cd
Update .github/workflows/cmake.yml
HuidaeCho Apr 22, 2024
454a38f
Let's try g.mkfontcap -s
HuidaeCho Apr 23, 2024
98b624a
Tell me where please...
HuidaeCho Apr 23, 2024
82bc972
Add more print lines to g.mkfontcap
HuidaeCho Apr 23, 2024
b14e5d2
Is it G_asprintf?
HuidaeCho Apr 23, 2024
c533696
Memory address seems too high
HuidaeCho Apr 23, 2024
21d6cab
Try allocating memory to fontcap.path
HuidaeCho Apr 23, 2024
8819cfb
Do you HAVE_ASPRINTF?
HuidaeCho Apr 23, 2024
b20d5a7
We hit the bug in G_asprintf; ap is undefined as the first call
HuidaeCho Apr 23, 2024
9a465ca
OK, G_vasprintf without HAVE_ASPRINTF is buggy
HuidaeCho Apr 23, 2024
d4bc714
Let's try this fix for G_vasprintf
HuidaeCho Apr 23, 2024
515b6a1
Update .github/workflows/cmake.yml
HuidaeCho Apr 23, 2024
50a967d
Fix check for HAVE_ASPRINTF
HuidaeCho Apr 23, 2024
c8de3a3
Fix diglib compile
HuidaeCho Apr 23, 2024
0c0a7c4
Update CMakeLists.txt
HuidaeCho Apr 23, 2024
7e6a101
Update CMakeLists.txt
HuidaeCho Apr 23, 2024
5c16a52
Update CMakeLists.txt
HuidaeCho Apr 23, 2024
683c1ad
CI(cmake): Use ninja generator
echoix May 2, 2024
7a3b557
source changes (address separately)
nilason May 24, 2024
c2e2ebb
cmake: major update, FHS, dependencies, tests added
nilason May 24, 2024
dc0ef09
CI: restore original state
nilason May 24, 2024
4bfea82
Added parson to r.info, r.profile, v.info
Mahesh1998 Jul 15, 2024
9135c6b
Fixed Building grass with Ubuntu System Libraries and cmake
Mahesh1998 Jul 17, 2024
fc321cb
Added parson to r.univar, r3.univar, v.univar
Mahesh1998 Jul 29, 2024
a07ca35
Fixed LIBM target issue and added the missing file gettimeoftheday c …
Mahesh1998 Sep 6, 2024
e4e78da
Fixed Windows Environment Path Issue and Relocated all msvc files fro…
Mahesh1998 Sep 12, 2024
9711c1f
msvc/gettimeofday.c: clang-formatted
HuidaeCho Sep 15, 2024
b58ffe1
Include all C files for lib/gis
HuidaeCho Sep 15, 2024
c236dc6
Use bracket arguments for REGEX
HuidaeCho Sep 15, 2024
7f96e5e
Add more parson dependency
HuidaeCho Sep 15, 2024
5db6d60
ctypegen: Do not link against versioned libs because lib names are no…
HuidaeCho Sep 15, 2024
0afe106
libgrass_interface_generator depends on grass_ogsf; build libs first
HuidaeCho Sep 15, 2024
38f4967
msvc/gettimeofday.c: Add the original URL
HuidaeCho Sep 15, 2024
3f5df0f
Use the SDRangel version of gettimeofday.c because c.h is postgres-only
HuidaeCho Sep 18, 2024
4685571
gettimeofday.c: comment
HuidaeCho Sep 18, 2024
9b53e79
Added --openmp:llvm flag to utilize latest version for min/max reduct…
Mahesh1998 Sep 19, 2024
dda0b0b
Fixed Error: Unresolved External Symbol opendir, closedir, readdir in…
Mahesh1998 Sep 23, 2024
7985073
Replace LIBM with ${LIBM} for MSVC where math library is not needed
Mahesh1998 Sep 23, 2024
953bf9b
Fixed Environment Path Separator issue in windows by replacing ; with \;
Mahesh1998 Sep 26, 2024
4878066
Added Grass GIS dependency to wxpython docs
Mahesh1998 Oct 1, 2024
eaf0a9b
Added grep alternative findstr to windows and replaced /dev/null with…
Mahesh1998 Oct 1, 2024
a12643f
Fixed Unresolved external symbol G__ due to export issue in windows
Mahesh1998 Oct 3, 2024
7b5e0fe
Fixed export issue of global variables in driver module. These variab…
Mahesh1998 Oct 9, 2024
5cf5741
Fixed db link issue
Mahesh1998 Oct 14, 2024
e16a65a
Removed TODO comments as it is required to add all dependencies while…
Mahesh1998 Oct 14, 2024
abaa8cd
Added Default Build Type as DEBUG for Windows and Removed find_librar…
Mahesh1998 Oct 22, 2024
c3d0774
Included LD Library PATH for windows in PATH
Mahesh1998 Oct 22, 2024
ad92759
ctime is used for Windows. So replaced mingw32 with win32
Mahesh1998 Oct 23, 2024
e73bbb7
Iterator should be declared outside pragma block
Mahesh1998 Oct 23, 2024
6fd4297
Removed extra build mode directory for windows due to multiple issues
Mahesh1998 Oct 31, 2024
531d277
Multiple instructions in single line created access violation, so sep…
Mahesh1998 Oct 31, 2024
489e07a
Removed message statement
Mahesh1998 Oct 31, 2024
309440c
Windows equivalent of strtok_r is strtok_s. So, replaced it
Mahesh1998 Oct 31, 2024
16e30a9
Fixed Python variable typo
Mahesh1998 Nov 7, 2024
9820712
changes mixed case python variables in cmake to uppercase to maintain…
Mahesh1998 Nov 11, 2024
8b1e824
isolated chmod only for UNIX and replaced /dev/null, grep with nul, f…
Mahesh1998 Nov 12, 2024
1cf4c1b
Updated grep with findstr for windows compatibility
Mahesh1998 Nov 13, 2024
26e9372
Resolved external variable link issue in windows for v.surf.rst using…
Mahesh1998 Nov 13, 2024
f3bb469
Optimized NULL device Path, SEARCH command, HTML search string in Cma…
Mahesh1998 Nov 25, 2024
340cc5d
Prepended "g.gui." to all gui output bat files
Mahesh1998 Nov 25, 2024
f4c5b54
Fixed Target Level Dependency for build modules items xml
Mahesh1998 Nov 25, 2024
4069654
FIXED GRASS_PYTHON env value empty issue in bat files. FIXED TARGET N…
Mahesh1998 Dec 3, 2024
b793d10
Fix unistd indentifiers by including unistd header
KandelN Dec 3, 2024
e598b03
Fixed V.Profile issue of unresolved external symbol for db methods
Mahesh1998 Dec 5, 2024
987746b
Fixed r3.mapcalc unresolved external symbol columns
Mahesh1998 Dec 5, 2024
cabbbfa
Fixed BuildPSO parameters parsing in windows
KandelN Dec 6, 2024
a6f16e1
Support for conda install openblas on Windows
HuidaeCho Feb 16, 2025
8659d2e
Add grass_parson dependency to r.colors.out
HuidaeCho Feb 16, 2025
f25279d
Add grass_raster dependency for Rast_mask_is_present
HuidaeCho Feb 16, 2025
d26b3c7
Add find scripts for BLAS and LAPACK to support pkg-config openblas o…
HuidaeCho Feb 16, 2025
bb64610
Workaround (to be removed later once the MSVC NAN bugfix is released)…
HuidaeCho Feb 16, 2025
7ef9235
Workaround (to be removed later once the MSVC NAN bugfix is released)…
HuidaeCho Feb 16, 2025
adebaed
Workaround (to be removed later once the MSVC NAN bugfix is released)…
HuidaeCho Feb 16, 2025
16e367f
get rid of D9025 warning: overriding /openmp with /openmp:llvm on Win…
HuidaeCho Feb 16, 2025
1976a58
Add missing HAVE_PCRE_H to config.h
HuidaeCho Feb 16, 2025
7d862f0
Remove duplicate PCRE code
HuidaeCho Feb 16, 2025
27e5a44
Remove unnecessary SOURCES cmake arguments; Add wrapper functions for…
HuidaeCho Feb 16, 2025
dc58fa4
Remove unnecessary SOURCES cmake arguments; Add wrapper functions for…
HuidaeCho Feb 16, 2025
5dc0feb
Do not double free ls filter regex
HuidaeCho Feb 16, 2025
d7d0ead
Generate htmls after Python lib
HuidaeCho Feb 17, 2025
d2a58df
Fix large file support option; Support LFS for MSVC
HuidaeCho Feb 17, 2025
724efad
Binary mode for file I/O on Windows
HuidaeCho Feb 17, 2025
ae76a10
Fix off_t error
HuidaeCho Feb 17, 2025
2927cec
Remove non-existing files from r.colors.out
HuidaeCho Feb 17, 2025
506d8fc
Add gjson.h
HuidaeCho Feb 17, 2025
4b2574e
Move grass_parson above grass_raster (dependency)
HuidaeCho Feb 17, 2025
ca70035
Add grass_parson to r.describe
HuidaeCho Feb 17, 2025
9f0fa23
Add LIBM to r.path
HuidaeCho Feb 17, 2025
57081ea
if WITH_DOCS for r.li html
HuidaeCho Feb 17, 2025
a865adc
Add grass_parson to v.distance
HuidaeCho Feb 17, 2025
47f707c
Add output directory to thumbnails.py
HuidaeCho Feb 17, 2025
57787b1
Document generation
HuidaeCho Feb 18, 2025
8b0d278
Update man/build_*.py arguments
HuidaeCho Feb 18, 2025
1dbb915
Merge branch 'main' into cmake_build_work
HuidaeCho Feb 18, 2025
a18be5b
Restore lib/gis/asprintf.c
HuidaeCho Feb 18, 2025
c051ce7
Redefine lseek for MSVC from config.h only
HuidaeCho Feb 18, 2025
f82d596
Merge branch 'main' into cmake_build_work
HuidaeCho Feb 18, 2025
804e0d5
Copyright block with author list (CMakeLists.txt and *.cmake only) in…
HuidaeCho Feb 18, 2025
5174435
Restore ssize_t for raster/r.coin/format.c
HuidaeCho Feb 18, 2025
e56dfc1
Add newline at the end of msvc/strings.h
HuidaeCho Feb 18, 2025
f05e438
Remove #if 0 block from raster/r.sun/main.c; min()/max() not used at all
HuidaeCho Feb 18, 2025
61a526f
r.mapcalc: Move columns to evaluate.c
HuidaeCho Feb 18, 2025
8be66ad
Remove test for GDAL<2.3 (not supported now)
HuidaeCho Feb 18, 2025
310c7e5
CI: update actions/cache to 4.2.1
nilason Feb 19, 2025
c63eb25
Apply clang-format
nilason Feb 19, 2025
5a8f4ac
CI: update ubuntu and python; drop ccache
nilason Feb 19, 2025
f166534
CI: use dependencies from ubuntu workflow
nilason Feb 19, 2025
0be5f83
use cblas and lapacke
nilason Feb 19, 2025
2e2fc61
remove out-commented code
nilason Feb 19, 2025
8525f5f
CI: some workflow file clean up, use Python 3.12 [skip ci]
nilason Feb 19, 2025
94673f5
CI: avoid hardcoded arch version for cmake [skip ci]
nilason Feb 19, 2025
c3022d8
CI: fix typo [skip ci]
nilason Feb 19, 2025
d803b44
Rename SET_GISBASE to GISBASE
HuidaeCho Feb 20, 2025
e704ce2
Revert "Rename SET_GISBASE to GISBASE"
nilason Feb 20, 2025
6171042
lib/ogsf: remove unchecked, unused OPENGL_GLU_FOUND and OpenGL_GLX_FOUND
nilason Feb 20, 2025
ddf59c7
HAVE_PQCMDTUPLES is not used in code
nilason Feb 20, 2025
0e4f9e9
add INTERFACE_LINK_DIRECTORIES to CBLAS and LAPACKE targets [skip ci]
nilason Feb 20, 2025
b4da68b
rename SET_GISBASE to GISBASE_INSTALL_PATH [skip ci]
nilason Feb 20, 2025
93f9ac9
lib/iostream: clean up includes in rtimer.cpp [skip ci]
nilason Feb 20, 2025
154c187
back with HAVE_PNG_H [skip ci]
nilason Feb 20, 2025
ea0ebc4
lib/init: remove unused file env.sh and out-commented code [skip ci]
nilason Feb 20, 2025
8cd6bd9
revert code changes to lib/gis/ls_filter.c
nilason Feb 20, 2025
5760b07
use SPDX-License-Identifier [skip ci]
nilason Feb 20, 2025
dffd534
update authors [skip ci]
nilason Feb 20, 2025
f1be2fb
Replace GPL3 gettimeofday with MIT gettimeofday
HuidaeCho Feb 20, 2025
6b0b006
CI: install cmake with pip
nilason Feb 21, 2025
e8cdaf7
CI: configure with WITH_GUI=OFF and WITH_DOCS=OFF
nilason Feb 21, 2025
14f8c46
man: add TODO on target 'build_check' on wxPython dependency
nilason Feb 21, 2025
2697787
don't install CHANGES
nilason Feb 21, 2025
0d182ad
Initial attempt to replace msvc/unistd.h
HuidaeCho Feb 21, 2025
c8d6ab9
Clean up msvc/unistd.h
HuidaeCho Feb 21, 2025
4e5dffc
Add some definitions to msvc/unistd.h
HuidaeCho Feb 21, 2025
5ac7c02
add g.download.project module
nilason Feb 21, 2025
aa30773
Revert "CI: install cmake with pip"
nilason Feb 22, 2025
5a4da84
use ubuntu python, add testreport
nilason Feb 22, 2025
61581ad
add GDAL inc workaround
nilason Feb 22, 2025
8cc3dc8
chmod
nilason Feb 22, 2025
25a0759
Merge branch 'main' into cmake_build_work
HuidaeCho Feb 22, 2025
4a3e47c
Merge branch 'main' into cmake_build_work
HuidaeCho Feb 22, 2025
7d73112
Merge branch 'main' into cmake_build_work
HuidaeCho Feb 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
name: CMake

on:
push:
paths-ignore:
- 'doc/**'
branches:
- main
- releasebranch_*
pull_request:
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
CMAKE_UNITY_BUILD: OFF

permissions:
contents: read

jobs:

build-cmake:
runs-on: ubuntu-22.04
env:
CMakeVersion: "3.16.0"
steps:
- name: Checkout GRASS
uses: actions/[email protected]
- name: Install CMake
run: |
cd ${GITHUB_WORKSPACE}
arch=$(uname -s)-$(uname -m)
wget https://github.com/Kitware/CMake/releases/download/v3.16.0/cmake-3.16.0-${arch}.tar.gz
tar xzf cmake-${{ env.CMakeVersion }}-${arch}.tar.gz
echo "CMAKE_DIR=$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_ENV
echo "$GITHUB_WORKSPACE/cmake-${{ env.CMakeVersion }}-${arch}/bin" >> $GITHUB_PATH
- run: |
cmake --version
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget git gawk findutils ninja-build
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- name: Print build environment variables
shell: bash -el {0}
run: |
printenv | sort
gcc --version
ldd --version
- name: Create installation directory
run: |
mkdir $HOME/install
- name: Configure
run: |
cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -G Ninja \
-DCMAKE_C_FLAGS="-I/usr/include -I/usr/include/gdal" \
-DCMAKE_CXX_FLAGS="-I/usr/include -I/usr/include/gdal" \
-DCMAKE_INSTALL_PREFIX=$HOME/install -DWITH_NLS=OFF -DWITH_GUI=OFF -DWITH_DOCS=OFF
- name: Print CMakeCache.txt
shell: bash -el {0}
run: |
cat ${GITHUB_WORKSPACE}/build/CMakeCache.txt
- name: Build
run: |
cmake --build build --verbose -j$(nproc)
- name: Install
run: |
cmake --install $GITHUB_WORKSPACE/build --verbose
- name: Add the bin directory to PATH
run: |
echo "$HOME/install/bin" >> $GITHUB_PATH
- name: Print installed versions
if: always()
run: .github/workflows/print_versions.sh
- name: Test executing of the grass command
run: .github/workflows/test_simple.sh
- name: Run tests
run: .github/workflows/test_thorough.sh --config .gunittest.cfg --min-success 72
- name: Make HTML test report available
if: ${{ !cancelled() }}
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: testreport-CMake
path: testreport
retention-days: 3
Loading
Loading