44 push :
55 branches :
66 - ' main'
7+ - ' multi-os'
78 paths-ignore :
89 - ' .github/**/*.md'
910 pull_request :
@@ -19,21 +20,20 @@ jobs:
1920 fail-fast : false
2021 matrix :
2122 java : [ '21', '25' ]
22- os : [ 'ubuntu-24.04' ]
23+ os : [ 'macos-12', ' ubuntu-24.04', 'windows-2022 ' ]
2324 name : Build (Java ${{ matrix.java }}, ${{ matrix.os }})
2425 runs-on : ${{ matrix.os }}
2526 # typical duration is ~15min, set twice the amount as limit (default is 6h)
2627 timeout-minutes : 30
2728 steps :
28- - name : Checkout
29- if : github.head_ref == ''
30- uses : actions/checkout@v7
29+ - name : Set up line endings
30+ if : ${{ matrix.os == 'windows-2022' }}
31+ run : |
32+ git config --global core.autocrlf false
33+ git config --global core.eol crlf
3134
32- - name : Checkout merge
33- if : github.head_ref != ''
35+ - name : Checkout
3436 uses : actions/checkout@v7
35- with :
36- ref : refs/pull/${{github.event.pull_request.number}}/merge
3737
3838 - name : Set up Cache
3939 uses : actions/cache@v6
5252 java-version : ${{ matrix.java }}
5353
5454 - name : Register Problem Matchers
55- if : ${{ matrix.java == '21' }}
55+ if : ${{ matrix.java == '21' && matrix.os == 'ubuntu-22.04' }}
5656 id : problem_matchers
5757 run : |
5858 echo "::add-matcher::.github/openhab-compile-problems.json"
@@ -112,15 +112,8 @@ jobs:
112112 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
113113 steps :
114114 - name : Checkout
115- if : github.head_ref == ''
116115 uses : actions/checkout@v7
117116
118- - name : Checkout merge
119- if : github.head_ref != ''
120- uses : actions/checkout@v7
121- with :
122- ref : refs/pull/${{github.event.pull_request.number}}/merge
123-
124117 - name : Set up Cache
125118 uses : actions/cache@v6
126119 with :
@@ -162,15 +155,15 @@ jobs:
162155 path : target/summary_report.html
163156
164157 - name : Report SAT Errors as Annotations
165- if : ${{ matrix.java == '21' && always() && ((steps.sat .outcome == 'success') || (steps.sat .outcome == 'failure')) }}
158+ if : ${{ always() && ((steps.build .outcome == 'success') || (steps.build .outcome == 'failure')) }}
166159 uses : ghys/checkstyle-github-action@main
167160 with :
168161 title : CheckStyle Violations
169162 path : ' **/checkstyle-result.xml'
170163 mode : inline
171164
172165 - name : Remove Label
173- if : ${{ matrix.java == '21' && always() && github.event.label.name == 'rebuild' }}
166+ if : ${{ always() && github.event.label.name == 'rebuild' }}
174167 env :
175168 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
176169 PR : ${{ github.event.number }}
0 commit comments