Skip to content

Commit

Permalink
Update CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Mar 7, 2023
1 parent 1e3f2ae commit 45223eb
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 29 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci-4.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI (4.x)
on:
schedule:
- cron: '0 4 * * *'
jobs:
CI:
strategy:
matrix:
include:
- os: ubuntu-latest
jdk: 8
profile: ''
- os: ubuntu-latest
jdk: 8
profile: '-PtestNativeTransport'
- os: ubuntu-latest
jdk: 8
profile: '-PtestDomainSockets'
- os: ubuntu-latest
jdk: 17
profile: ''
- os: windows-latest
jdk: 8
profile: ''
uses: ./.github/workflows/ci.yml
with:
branch: 4.x
jdk: ${{ matrix.jdk }}
os: ${{ matrix.os }}
profile: ${{ matrix.profile }}
deploy: ${{ matrix.jdk == '8' && matrix.os == 'ubuntu-latest' }}
secrets: inherit
38 changes: 38 additions & 0 deletions .github/workflows/ci-5.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI (5.x)
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 5 * * *'
jobs:
CI:
strategy:
matrix:
include:
- os: ubuntu-latest
jdk: 8
profile: ''
- os: ubuntu-latest
jdk: 8
profile: '-PtestNativeTransport'
- os: ubuntu-latest
jdk: 8
profile: '-PtestDomainSockets'
- os: ubuntu-latest
jdk: 17
profile: ''
- os: windows-latest
jdk: 8
profile: ''
uses: ./.github/workflows/ci.yml
with:
branch: ${{ github.head_ref || github.ref_name }}
jdk: ${{ matrix.jdk }}
os: ${{ matrix.os }}
profile: ${{ matrix.profile }}
deploy: ${{ matrix.jdk == '8' && matrix.os == 'ubuntu-latest' }}
secrets: inherit
49 changes: 20 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
name: CI
on:
push:
branches:
- master
- '[0-9]+.[0-9]+'
pull_request:
branches:
- master
- '[0-9]+.[0-9]+'
schedule:
- cron: '0 4 * * *'
workflow_call:
inputs:
branch:
required: true
type: string
jdk:
default: 8
type: string
os:
default: ubuntu-latest
type: string
deploy:
type: boolean
jobs:
Test:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
profile: [""]
jdk: [8]
include:
- os: ubuntu-latest
jdk: 17
- os: ubuntu-latest
jdk: 8
profile: '-PtestNativeTransport'
- os: ubuntu-latest
jdk: 8
profile: '-PtestDomainSockets'
runs-on: ${{ matrix.os }}
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Run tests
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B ${{ matrix.profile }}
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B ${{ inputs.profile }}
Deploy:
name: Deploy to OSSRH
if: ${{ github.repository_owner == 'eclipse-vertx' && (github.event_name == 'push' || github.event_name == 'schedule') }}
if: ${{ inputs.deploy && github.repository_owner == 'eclipse-vertx' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: Test
runs-on: ubuntu-latest
env:
Expand All @@ -52,7 +43,7 @@ jobs:
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: 8
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Get project version
run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -B | grep -v '\[')" >> $GITHUB_ENV
Expand Down

0 comments on commit 45223eb

Please sign in to comment.