Skip to content

Introduce Maven wrapper #17

Introduce Maven wrapper

Introduce Maven wrapper #17

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- run: sudo apt-get install build-essential
- run: sudo apt-get install pkg-config
- run: sudo apt-get install ncurses-dev
- run: sudo apt-get install libreadline-dev
- run: sudo apt-get install libedit-dev
- run: sudo apt-get install libgmp-dev
- run: sudo apt-get install libssl-dev
- run: sudo apt-get install unixodbc-dev
- run: sudo apt-get install zlib1g-dev
- run: sudo apt-get install libarchive-dev
- run: sudo apt-get install libossp-uuid-dev
- run: sudo apt-get install libxext-dev
- run: sudo apt-get install libice-dev
- run: sudo apt-get install libjpeg-dev
- run: sudo apt-get install libxinerama-dev
- run: sudo apt-get install libxft-dev
- run: sudo apt-get install libxpm-dev
- run: sudo apt-get install libxt-dev
- run: sudo apt-get install libdb-dev
- run: sudo apt-get install libpcre3-dev
- run: sudo apt-get install libyaml-dev
# - run: apt-get install openjdk-8-jdk
- run: sudo apt-get install junit
- run: sudo apt-get install ninja-build
- run: sudo apt-get install cmake
# - run: sudo apt-get install ninja
# - run: sudo apt-get install gmp
# - run: sudo apt-get install libarchive
# - run: sudo apt-get install readline
# - run: sudo apt-get install ossp-uuid
# - run: sudo apt-get install openssl
# - run: sudo apt-get install libyaml
# - run: sudo apt-get install unixodbc
# - run: sudo apt-get install berkeley-db
# - run: sudo apt-get install pcre
# - run: sudo apt-get install jpeg
- run: wget https://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.zip
- run: unzip -qq apache-maven-3.5.0-bin.zip
- run: export M2_HOME=$PWD/apache-maven-3.5.0
- run: export PATH=$M2_HOME/bin:$PATH
- run: echo "MAVEN_OPTS='-Dmaven.repo.local=$HOME/.m2/repository -Xmx1g -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS'" > ~/.mavenrc
- run: export JAVA_HOME=/usr/lib/jvm/java-8-oracle
- run: echo $JAVA_HOME
- run: sudo touch /etc/ld.so.conf.d/java.conf
- run: echo $JAVA_HOME/jre/lib/amd64 | sudo tee -a /etc/ld.so.conf.d/java.conf
- run: echo $JAVA_HOME/jre/lib/amd64/server | sudo tee -a /etc/ld.so.conf.d/java.conf
- run: sudo ldconfig
- run: export PATH=$PATH:$JAVA_HOME/bin
- run: export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
- run: export CLASSPATH=$CLASSPATH:$JAVA_HOME/jre/lib/rt.jar
- run: wget https://www.swi-prolog.org/download/stable/src/pl-6.6.6.tar.gz
- run: tar -xzvf pl-6.6.6.tar.gz
- run: cd pl-6.6.6
- run: ./configure --with-world
- run: make
- run: sudo make install
- run: cd packages/jpl
- run: ./configure
- run: make
- run: echo pwd
- run: export SWI_HOME=/home/travis/build/prolobjectlink/prolobjectlink-jpi-jpl-swi/pl-6.6.6
- run: export PATH=$PATH:$SWI_HOME/bin
- run: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/travis/build/prolobjectlink/prolobjectlink-jpi-jpl-swi/pl-6.6.6/packages/jpl
- run: export CLASSPATH=$CLASSPATH:/home/travis/build/prolobjectlink/prolobjectlink-jpi-jpl-swi/pl-6.6.6/packages/jpl/jpl.jar
- run: cd ..
- run: cd ..
- run: cd ..
- run: mvn dependency:go-offline # gets the project dependencies
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml