Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI to openHAB 5 #371

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 68 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ jobs:
(bin/yard stats -c | grep "100.00% documented")
bin/validate_yard_links

openhab-matrix:
openhab-snapshot-date:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
outputs:
openhab_matrix: |
["3.4.5", "4.0.4", "4.1.3", "4.2.3", "4.3.0.M5", "4.3.0-SNAPSHOT"]
["3.4.5", "4.0.4", "4.1.3", "4.2.3", "4.3.0", "5.0.0-SNAPSHOT"]
snapshot_date: |
${{ steps.snapshot-date.outputs.SNAPSHOT_DATE }}
steps:
Expand All @@ -81,20 +81,34 @@ jobs:
echo SNAPSHOT_DATE=$(date -u +-%Y%m%d) >> $GITHUB_OUTPUT

openhab-setup:
needs: openhab-matrix
needs: openhab-snapshot-date
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
openhab_version: ${{ fromJson(needs.openhab-matrix.outputs.openhab_matrix) }}
include:
- java_version: 11
openhab_version: 3.4.5
- java_version: 17
openhab_version: 4.0.4
- java_version: 17
openhab_version: 4.1.3
- java_version: 17
openhab_version: 4.2.3
- java_version: 17
openhab_version: 4.3.0
- java_version: 21
openhab_version: 4.3.0
- java_version: 21
openhab_version: 5.0.0-SNAPSHOT
steps:
- uses: actions/checkout@v4
- name: Cache openHAB setup
id: cache
uses: actions/cache@v4
with:
path: tmp/
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-matrix.outputs.snapshot_date || '' }}
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-snapshot-date.outputs.snapshot_date || '' }}-java-${{ matrix.java_version }}
- uses: ruby/setup-ruby@v1
if: steps.cache.outputs.cache-hit != 'true'
with:
Expand All @@ -103,7 +117,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ startsWith(matrix.openhab_version, '4.') && '17' || '11' }}
java-version: ${{ matrix.java_version }}
java-package: jre
- name: Setup openHAB
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -121,40 +135,49 @@ jobs:
retention-days: 2

rspec:
needs: [openhab-matrix, openhab-setup]
needs: [openhab-snapshot-date, openhab-setup]
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
openhab_version: ${{ fromJson(needs.openhab-matrix.outputs.openhab_matrix) }}
jruby_version: ["jruby-9.3.10.0", "jruby-9.4.9.0"]
exclude:
- openhab_version: 4.0.4
jruby_version: jruby-9.3.10.0
- openhab_version: 4.1.3
jruby_version: jruby-9.3.10.0
- openhab_version: 4.2.3
jruby_version: jruby-9.3.10.0
- openhab_version: 4.3.0.M5
jruby_version: jruby-9.3.10.0
- openhab_version: 4.3.0-SNAPSHOT
include:
- java_version: 11
jruby_version: jruby-9.3.10.0
openhab_version: 3.4.5
- java_version: 17
jruby_version: jruby-9.4.2.0
openhab_version: 4.0.4
- java_version: 17
jruby_version: jruby-9.4.5.0
openhab_version: 4.1.3
- java_version: 17
jruby_version: jruby-9.4.6.0
openhab_version: 4.2.3
- java_version: 17
jruby_version: jruby-9.4.9.0
openhab_version: 4.3.0
- java_version: 21
jruby_version: jruby-9.4.9.0
openhab_version: 4.3.0
- java_version: 21
jruby_version: jruby-9.4.9.0
openhab_version: 5.0.0-SNAPSHOT
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.jruby_version }}
bundler-cache: true
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ startsWith(matrix.openhab_version, '4.') && '17' || '11' }}
java-version: ${{ matrix.java_version }}
java-package: jre
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.jruby_version }}
bundler-cache: true
- name: Restore openHAB setup
uses: actions/cache@v4
with:
path: tmp/
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-matrix.outputs.snapshot_date || '' }}
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-snapshot-date.outputs.snapshot_date || '' }}-java-${{ matrix.java_version }}
- name: RSpec
run: bin/rspec --format progress --format html --out rspec.html
timeout-minutes: 6
Expand All @@ -173,31 +196,41 @@ jobs:
path: rspec.html

cucumber:
needs: [openhab-matrix, openhab-setup]
needs: [openhab-snapshot-date, openhab-setup]
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
openhab_version: ${{ fromJson(needs.openhab-matrix.outputs.openhab_matrix) }}
exclude:
- openhab_version: 3.4.5
include:
- java_version: 17
openhab_version: 4.0.4
- java_version: 17
openhab_version: 4.1.3
- java_version: 17
openhab_version: 4.2.3
- java_version: 17
openhab_version: 4.3.0
- java_version: 21
openhab_version: 4.3.0
- java_version: 21
openhab_version: 5.0.0-SNAPSHOT
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ matrix.java_version }}
java-package: jre
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
rubygems: 3.4.22
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ startsWith(matrix.openhab_version, '4.') && '17' || '11' }}
java-package: jre
- name: Restore openHAB setup
uses: actions/cache@v4
with:
path: tmp/
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-matrix.outputs.snapshot_date || '' }}
key: openHAB-setup-${{ matrix.openhab_version }}${{ endsWith(matrix.openhab_version, 'SNAPSHOT') && needs.openhab-snapshot-date.outputs.snapshot_date || '' }}-java-${{ matrix.java_version }}
- name: Cucumber
run: bin/rake features
timeout-minutes: 4
Expand Down
Loading