Skip to content

Commit

Permalink
use github-actions for automated builds (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Postremus authored Mar 24, 2024
1 parent e6fba16 commit 71f605f
Show file tree
Hide file tree
Showing 10 changed files with 585 additions and 66 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

on:
push:
branches:
- 'main'
- 'release/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven build
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_SIGNING_KEY: ${{ secrets.MAVEN_SIGNING_KEY }}
run: |
echo "$MAVEN_SIGNING_KEY" > MAVEN_SIGNING_KEY_FILE.base64
base64 --decode MAVEN_SIGNING_KEY_FILE.base64 > MAVEN_SIGNING_KEY_FILE.bin
gpg --batch --fast-import MAVEN_SIGNING_KEY_FILE.bin
./mvnw deploy -s cd/settings.xml -P sign
- name: Sonar
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent org.apache.maven.plugins:maven-surefire-plugin:test org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
30 changes: 30 additions & 0 deletions .github/workflows/matrix-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Matrix Testing

on:
push:
branches:
- '**'

jobs:
matrix-testing:
strategy:
fail-fast: false
matrix:
maven: [ 3.5.2, 3.9.6, 4.0.0-alpha-13]
os: [ ubuntu-latest, windows-latest ]
java: [11, 17, 21]
exclude:
- java: 11
maven: 4.0.0-alpha-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '${{ matrix.java }}'
- uses: stCarolas/[email protected]
with:
maven-version: '${{ matrix.maven }}'
- name: Maven verify
run: mvn -B verify
15 changes: 15 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pull Request CI

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven build
run: ./mvnw -B install
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
65 changes: 0 additions & 65 deletions Jenkinsfile

This file was deleted.

Loading

0 comments on commit 71f605f

Please sign in to comment.