added logging #2
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
name: Downstream integration build (GeoWebCache and GeoServer) | ||
on: | ||
# trigger on PR, but only on main branch, the checkouts of the downstream projects are also targeting main (default branch) | ||
pull_request: | ||
branches: | ||
- main | ||
- remove-opengis | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'temurin' | ||
- uses: actions/checkout@v2 | ||
- name: Maven repository caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: gt-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
gt-maven- | ||
- name: Disable checksum offloading | ||
# See: https://github.com/actions/virtual-environments/issues/1187#issuecomment-686735760 | ||
run: sudo ethtool -K eth0 tx off rx off | ||
- name: Build GeoTools (no tests, prepare fresh artifacts) | ||
run: mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean install -T2 -Dall --file pom.xml -DskipTests | ||
- name: Checkout GeoWebCache, GeoServer and ... | ||
run: | | ||
cd ~ | ||
echo "Preparing git ssh checkouts" | ||
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config | ||
echo "Checking out GeoWebCache" | ||
mkdir geowebcache | ||
git clone https://github.com/GeoWebCache/geowebcache.git geowebcache | ||
echo "Checking out GeoServer" | ||
mkdir geoserver | ||
git clone https://github.com/geoserver/geoserver.git geoserver | ||
# uncomment when geofence is building against geotools snapshot | ||
# echo "Checking out GeoFence" | ||
# mkdir geofence | ||
# git clone https://github.com/geoserver/geofence.git geofence | ||
echo "Checking out mapfish-print-v2" | ||
mkdir mapfish-print-v2 | ||
git clone https://github.com/mapfish/mapfish-print-v2.git mapfish-print-v2 | ||
# additional check during remove-opengis activity | ||
# echo "Checking out mapfish-print-v3" | ||
# mkdir mapfish-print-v3 | ||
# git clone -b opengis-migration https://github.com/mapfish/mapfish-print.git mapfish-print-v3 | ||
# additional check during remove-opengis activity | ||
# - name: Apply org.opengis removal scripts | ||
# run: | | ||
# cd ~ | ||
# find . -name "remove-opengis.xml" | ||
# cd ~/geowebcache/geowebcache | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/geoserver/src | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/geofence | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/mapfish-print-v2 | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/mapfish-print-v3/core/src | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/mapfish-print-v3/docs/src | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
# cd ~/mapfish-print-v3/examples/src | ||
# cp ~/work/geotools/geotools/docs/user/welcome/files/remove-opengis.xml . | ||
# ant -noinput -buildfile remove-opengis.xml | ||
- name: Build Mapfish-print v2 with tests | ||
run: | | ||
cd ~ | ||
mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -f mapfish-print-v2/pom.xml install -nsu -DskipTests -T2 | ||
mvn -B -f mapfish-print-v2/pom.xml test -fae -nsu -T2 | ||
- name: Build GeoWebCache with tests | ||
run: | | ||
export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10" | ||
export MAVEN_OPTS="-Xmx1024m $TEST_OPTS" | ||
cd ~ | ||
mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -f geowebcache/geowebcache/pom.xml install -nsu -Dspotless.apply.skip=true -DskipTests -T2 | ||
mvn -B -f geowebcache/geowebcache/pom.xml test -fae -nsu -T2 -Dspotless.apply.skip=true | ||
# uncomment when geofence is building against geotools snapshot | ||
# - name: Build GeoFence with tests | ||
# run: | | ||
# export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10" | ||
# export MAVEN_OPTS="-Xmx1024m $TEST_OPTS" | ||
# cd ~ | ||
# sed -i "s/<gt-version>29.2<\/gt-version>/<gt-version>30-SNAPSHOT<\/gt-version>/g" geofence/src/services/pom.xml | ||
# mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -f geofence/src/pom.xml install -nsu -T2 | ||
- name: Build GeoServer with tests | ||
run: | | ||
echo "Building GeoServer" | ||
export TEST_OPTS="-XX:+UseStringDeduplication -XX:+UseG1GC -XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=10" | ||
export MAVEN_OPTS="-Xmx512m $TEST_OPTS" | ||
cd ~ | ||
sed -i "s/<mf.version>2.2.0<\/mf.version>/<mf.version>2.3-SNAPSHOT<\/mf.version>/g" geoserver/src/pom.xml | ||
sed -i "s/<gf.version>3.6.0<\/gf.version>/<gf.version>3.6-SNAPSHOT<\/gf.version>/g" geoserver/src/pom.xml | ||
mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -f geoserver/src/pom.xml install -nsu -Prelease -Dspotless.apply.skip=true -DskipTests -T2 | ||
mvn -B -f geoserver/src/community/pom.xml install -nsu -DcommunityRelease -Dspotless.apply.skip=true -DskipTests -T2 | ||
mvn -B -f geoserver/src/pom.xml test -fae -T2 -nsu -Dtest.maxHeapSize=512m -Djvm.opts="$TEST_OPTS" -Prelease -Dspotless.apply.skip=true | ||
# additional check during remove-opengis activity | ||
# - name: Build Mapfish-print v3 with tests | ||
# run: | | ||
# cd ~/mapfish-print-v3/ | ||
# touch CI.asc | ||
# echo "staging ~/.m2/repository folder" | ||
# mkdir -p m2/repository/org | ||
# cp -r ~/.m2/repository/org/geotools m2/repository/org/geotools | ||
# make build | ||
# # make acceptance-tests-up | ||
# # make acceptance-tests-run | ||
# # make acceptance-tests-down | ||
- name: Remove SNAPSHOT jars from repository | ||
run: | | ||
find ~/.m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {} |