forked from MobilityDB/MobilityDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action to check MEOS compilation
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Test MEOS compilation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '.github/workflows/meos.yml' | ||
- 'cmake/**' | ||
- 'meos/**' | ||
- 'mobilitydb/**' | ||
- 'postgis/**' | ||
- 'CMakeLists.txt' | ||
branch_ignore: gh-pages | ||
pull_request: | ||
paths: | ||
- '.github/workflows/meos.yml' | ||
- 'cmake/**' | ||
- 'meos/**' | ||
- 'mobilitydb/**' | ||
- 'postgis/**' | ||
- 'CMakeLists.txt' | ||
branch_ignore: gh-pages | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libgeos-dev \ | ||
libproj-dev \ | ||
libjson-c-dev \ | ||
libgsl-dev | ||
- name: Configure for gcc | ||
run: | | ||
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_COVERAGE=${{ matrix.coverage }} .. | ||
- name: Build | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DMEOS=on .. | ||
make -j $(nproc) | ||
sudo make install | ||
- name: Compile and run 01_hello_world.c | ||
run: | | ||
cd meos/examples | ||
gcc -Wall -g -I/usr/local/include -o 01_hello_world 01_hello_world.c -L/usr/local/lib -lmeos | ||
./01_hello_world |