matthiasblaesing commented on a change in pull request #3785:
URL: https://github.com/apache/netbeans/pull/3785#discussion_r834659454



##########
File path: .github/workflows/main.yml
##########
@@ -0,0 +1,342 @@
+# 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
+#
+#   http://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.
+
+name: NetBeans
+
+on:
+  push:
+  pull_request:
+
+jobs:
+    
+# primary build job, most other jobs use the artifact produced here
+# artifact is only produced once in the matrix
+  base-build:
+    name: Build Clusters on JDK ${{ matrix.java }} 
+    runs-on: ubuntu-latest
+    env:
+      ANT_OPTS: 
-Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
+    strategy:
+      matrix:
+        java: [ '11', '17' ]
+      fail-fast: false
+    steps:
+        
+      - name: Set up JDK ${{ matrix.java }} 
+        uses: actions/setup-java@v2
+        with:
+          java-version: ${{ matrix.java }} 
+          distribution: 'zulu'
+
+      - name: Caching dependencies
+        uses: actions/cache@v2
+        with:
+          path: ~/.hgexternalcache
+          key: ${{ runner.os }}-${{ hashFiles('*/external/binaries-list', 
'*/*/external/binaries-list') }}
+          restore-keys: ${{ runner.os }}-
+          
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Build NetBeans
+        run: ant -Dcluster.config=release build-nozip
+
+      - name: Archive Build
+        if: ${{ matrix.java == '11' }}
+        run: tar -czf /tmp/build.tar.gz --exclude ".git" .
+
+      - name: Upload Build
+        if: ${{ matrix.java == '11' }}
+        uses: actions/upload-artifact@v3
+        with:
+          name: build
+          path: /tmp/build.tar.gz
+          retention-days: 1
+          if-no-files-found: error
+
+
+# secondary jobs
+  linux-commit-validation:
+    needs: base-build
+    name: Commit Validation on Linux/JDK ${{ matrix.java }} 
+    runs-on: ubuntu-latest
+    env:
+      ANT_OPTS: 
-Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
+    strategy:
+      matrix:
+        java: [ '11' ]

Review comment:
       > @matthiasblaesing cv doesn't work on 15+ unfortunately (like a lot of 
other tests). Blocked by netbinox the last time i tried. If that is unblocked 
(and no other issue shows up) its likely that it would also require the 
`--add-opens` lists (which we [now 
have](https://github.com/apache/netbeans/tree/master/nbbuild/jms-config), so we 
made some progress in that area at least).
   
   I had a look at the output and this is the offender:
   
   ```
       [junit] März 24, 2022 8:33:03 PM 
org.netbeans.ProxyURLStreamHandlerFactory register
       [junit] SCHWERWIEGEND: No way to find original stream handler for jar 
protocol
       [junit] java.lang.reflect.InaccessibleObjectException: Unable to make 
field transient java.net.URLStreamHandler java.net.URL.handler accessible: 
module java.base does not "opens java.net" to unnamed module @15eb5ee5
       [junit]     at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
       [junit]     at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
       [junit]     at 
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:184)
       [junit]     at 
java.base/java.lang.reflect.Field.setAccessible(Field.java:178)
       [junit]     at 
org.netbeans.ProxyURLStreamHandlerFactory.register(ProxyURLStreamHandlerFactory.java:59)
       [junit]     at 
org.netbeans.JarClassLoader.<clinit>(JarClassLoader.java:117)
       [junit]     at org.netbeans.MainImpl.execute(MainImpl.java:153)
       [junit]     at org.netbeans.MainImpl.main(MainImpl.java:60)
       [junit]     at org.netbeans.Main.main(Main.java:58)
       [junit]     at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]     at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
       [junit]     at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:51)
   ```
   
   and indeed `commit-validation`  succeeds if you run:
   
   ```bash
   export JAVA_TOOL_OPTIONS='--add-opens=java.base/java.net=ALL-UNNAMED
   ```
   
   before. I tested with a jdk-18-ea version.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to