Skip to content

Commit

Permalink
Updated code, workflow and API doc added (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
1-ARIjitS authored Aug 30, 2024
1 parent 48f68cd commit 672def1
Show file tree
Hide file tree
Showing 379 changed files with 7,447 additions and 122,296 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy_javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Javadoc to GitHub Pages

on:
push:
branches:
- JMEOS-working

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'

- name: Set up Maven
run: mvn -B wrapper:wrapper

- name: Generate Javadoc
run: mvn -B javadoc:javadoc
# By default, this generates Javadoc in the target/site/apidocs/ directory

- name: Verify Javadoc Directory
run: |
if [ -d "target/site/apidocs" ]; then
echo "Javadoc generated successfully";
ls -la target/site/apidocs;
else
echo "Javadoc directory not found!";
exit 1;
fi
- name: Deploy Javadoc to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/site/apidocs
109 changes: 109 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Java CI with Maven

on:
push:
branches:
- main
- JMEOS-working
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'

- name: Uninstall any pre-installed Maven
run: |
sudo apt-get remove --purge -y maven
sudo rm -f /usr/bin/mvn
sudo rm -rf /usr/share/maven /etc/maven /usr/local/maven /opt/apache-maven*
- name: Install Maven 3.9.6
run: |
wget https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar -xzf apache-maven-3.9.6-bin.tar.gz
sudo mv apache-maven-3.9.6 /opt/
sudo ln -s /opt/apache-maven-3.9.6/bin/mvn /usr/bin/mvn
mvn -version
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Print current working directory
run: pwd

# Install GEOS library
- name: Install GEOS
run: sudo apt-get install -y libgeos-dev

# Install PROJ library
- name: Install PROJ
run: sudo apt-get install proj-bin libproj-dev proj-data

# Install JSON-C library
- name: Install JSON-C
run: sudo apt install libjson-c-dev

# Fetch and install MEOS library
- name: Fetch MEOS sources
run: git clone https://github.com/MobilityDB/MobilityDB.git

# install MObilityDB
- name: Install MobilityDB
run: |
mkdir MobilityDB/build
cd MobilityDB/build
cmake .. -DMEOS=on
make -j
sudo make install
# Copy the installed library to your project's src/lib directory
- name: Copy MEOS library to JMEOS/src/lib
run: |
cp /usr/local/lib/libmeos.so $GITHUB_WORKSPACE/src/lib/
# Check for the library in the src/lib directory
- name: Check for the library
run: ls -la $GITHUB_WORKSPACE/src/lib

# Set up the environment variable LD_LIBRARY_PATH
- name: Set up LD_LIBRARY_PATH
run: echo "LD_LIBRARY_PATH=$(pwd)/src/lib" >> $GITHUB_ENV

# Check if libmeos.so exists in the target directory
- name: Check if libmeos.so exists
run: ls -l $LD_LIBRARY_PATH/libmeos.so

# Verify the architecture compatibility of the library
- name: Verify architecture compatibility
run: file $LD_LIBRARY_PATH/libmeos.so

# Test the MEOS library loading using ldd and nm
- name: Test libmeos.so loading
run: |
ldd $LD_LIBRARY_PATH/libmeos.so
nm -D $LD_LIBRARY_PATH/libmeos.so
# Ensure that the library has the correct execution permissions
- name: Ensure correct permissions
run: chmod +x $LD_LIBRARY_PATH/libmeos.so

# Build Maven project
- name: Build with Maven
run: mvn clean install
File renamed without changes.
Loading

0 comments on commit 672def1

Please sign in to comment.