forked from postgis/postgis-java
-
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.
- Disable Travis-CI - Update testcontainers to v1.15.3 - Update checkstyle to v8.42 - Update postgis/postgis test container from v12-3.0-alpine to v13-3.1-alpine - Added windows-javadoc maven profile - Move sonatype distro management bock to dedicated profile and replace with local staging distro spec - Initial Github Actions setup (cherry picked from commit a2b7329)
- Loading branch information
1 parent
eacc2f8
commit 0e2ef90
Showing
8 changed files
with
261 additions
and
16 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,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euf | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y gnupg haveged | ||
|
||
rm -rf ~/.gnupg | ||
gpg --list-keys | ||
|
||
cat >key-info <<EOF | ||
%echo Generating a key | ||
Key-Type: RSA | ||
Key-Length: 4096 | ||
Subkey-Type: RSA | ||
Subkey-Length: 4096 | ||
Name-Real: PostGIS Development Team | ||
Name-Comment: PostGIS Development Team | ||
Name-Email: test-key@postgis.net | ||
Expire-Date: 0 | ||
%no-ask-passphrase | ||
%no-protection | ||
%commit | ||
%echo done | ||
EOF | ||
|
||
gpg --verbose --batch --gen-key key-info | ||
|
||
echo -e "5\ny\n" | gpg --no-tty --command-fd 0 --expert --edit-key test-key@postgis.net trust; | ||
|
||
# test | ||
gpg --list-keys | ||
gpg -e -a -r test-key@postgis.net key-info | ||
rm key-info | ||
gpg -d key-info.asc | ||
rm key-info.asc | ||
|
||
set +euf |
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euf | ||
|
||
MAVEN_BASE_URL=https://archive.apache.org/dist/maven/maven-3/ | ||
MAVEN_VERSION=3.8.1 | ||
MAVEN_SHA=b98a1905eb554d07427b2e5509ff09bd53e2f1dd7a0afa38384968b113abef02 | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y curl | ||
sudo mkdir -p /usr/share/maven /usr/share/maven/ref | ||
sudo curl -fsSL -o /tmp/apache-maven.tar.gz ${MAVEN_BASE_URL}/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
echo "${MAVEN_SHA} /tmp/apache-maven.tar.gz" | sha256sum -c - | ||
sudo tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 | ||
sudo rm -f /tmp/apache-maven.tar.gz | ||
sudo ln -fs /usr/share/maven/bin/mvn /usr/bin/mvn | ||
mvn -version | ||
|
||
set +euf | ||
|
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euf | ||
|
||
AZUL_GPG_KEY=0xB1998361219BD9C9 | ||
ZULU_VERSION=11 | ||
ZULU_RELEASE=11.0.11-1 | ||
|
||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ${AZUL_GPG_KEY} | ||
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main' | ||
sudo apt-get update | ||
sudo apt-get install -y zulu-repo | ||
sudo apt-get update | ||
sudo apt-get install -y zulu${ZULU_VERSION}=${ZULU_RELEASE} | ||
sudo sed -i.orig -e "s/^hl /jre /g" -e "s/^jdkhl /jdk /g" /usr/lib/jvm/.zulu${ZULU_VERSION}-ca-amd64.jinfo | ||
sudo update-java-alternatives --set zulu${ZULU_VERSION}-ca-amd64 | ||
export ALTERNATIVES_JAVAC=$(realpath /etc/alternatives/javac) | ||
export JAVA_HOME=${ALTERNATIVES_JAVAC%/bin/javac} | ||
export PATH=$JAVA_HOME/bin:$PATH | ||
java -version | ||
|
||
set +euf | ||
|
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euf | ||
|
||
AZUL_GPG_KEY=0xB1998361219BD9C9 | ||
ZULU_VERSION=8 | ||
ZULU_RELEASE=8.0.292-1 | ||
|
||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ${AZUL_GPG_KEY} | ||
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main' | ||
sudo apt-get update | ||
sudo apt-get install -y zulu-repo | ||
sudo apt-get update | ||
sudo apt-get install -y zulu${ZULU_VERSION}=${ZULU_RELEASE} | ||
sudo sed -i.orig -e "s/^hl /jre /g" -e "s/^jdkhl /jdk /g" /usr/lib/jvm/.zulu${ZULU_VERSION}-ca-amd64.jinfo | ||
sudo update-java-alternatives --set zulu${ZULU_VERSION}-ca-amd64 | ||
export ALTERNATIVES_JAVAC=$(realpath /etc/alternatives/javac) | ||
export JAVA_HOME=${ALTERNATIVES_JAVAC%/bin/javac} | ||
export PATH=$JAVA_HOME/bin:$PATH | ||
java -version | ||
|
||
set +euf | ||
|
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,59 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${env.OSSRHU}</username> | ||
<password>${env.OSSRHT}</password> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>gpg</id> | ||
<properties> | ||
<gpg.keyname>test-key@postgis.net</gpg.keyname> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>sonatype-snapshots</id> | ||
<repositories> | ||
<repository> | ||
<id>sonatype-snapshots</id> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<name>sonatype-snapshots</name> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
<profile> | ||
<id>sonatype-staging</id> | ||
<repositories> | ||
<repository> | ||
<id>sonatype-staging</id> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<name>sonatype-staging</name> | ||
<url>https://oss.sonatype.org/content/groups/staging/</url> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
<profile> | ||
<id>sonatype-releases</id> | ||
<repositories> | ||
<repository> | ||
<id>sonatype-releases</id> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
<name>sonatype-releases</name> | ||
<url>https://oss.sonatype.org/content/groups/public/</url> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
</profiles> | ||
|
||
</settings> |
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,61 @@ | ||
name: PostGIS Java CI | ||
|
||
on: [push, pull_request] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-codebase: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
java_version: [8] | ||
maven_version: [3.8.1] | ||
name: Build on OS ${{ matrix.os }} with Maven ${{ matrix.maven_version }} using Zulu ${{ matrix.java_version }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
JAVA_HOME: /usr/lib/jvm/zulu${{ matrix.java_version }}-ca-amd64 | ||
MAVEN_HOME: /usr/share/maven | ||
MAVEN_PROPS: -Djavadoc.path=`which javadoc` | ||
PROFILES: gpg,release-sign-artifacts,sonatype-deployment,sonatype-snapshots,sonatype-staging,sonatype-releases | ||
SETTINGS: .github/settings.xml | ||
|
||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install GPG and generate test key | ||
run: .github/install-gpg.sh | ||
|
||
- name: Install Zulu OpenJDK | ||
run: .github/install-zulu${{ matrix.java_version }}.sh | ||
|
||
- name: Install Maven | ||
run: .github/install-maven.sh | ||
|
||
- name: Setup Maven repository cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: m2repo | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ env.cache-name }}- | ||
- name: Log github.ref | ||
run: echo "${{ github.ref }}" | ||
|
||
- name: Show Maven dependency tree | ||
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} dependency:tree | ||
|
||
- name: Show Maven active profiles | ||
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:active-profiles | ||
|
||
- name: Show Maven effective POM | ||
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} help:effective-pom | ||
|
||
- name: Maven build/test | ||
run: mvn -U -V -s ${{ env.SETTINGS }} -P${{ env.PROFILES }} ${{ env.MAVEN_PROPS }} clean install |
File renamed without changes.
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