Skip to content

Commit

Permalink
Merge pull request #5568 from mbien/switch-to-full
Browse files Browse the repository at this point in the history
switch CI from release to full cluster config.
  • Loading branch information
mbien authored Feb 27, 2023
2 parents c097693 + 63e6894 commit df0c22a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 363 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ env:
-Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
-Dtest-unit-sys-prop.ignore.random.failures=true
# what to build and test, see nbbuild/cluster.properties
CLUSTER_CONFIG: 'full'

# flags for conditional, long running steps or jobs configurable with labels. If this is not a PR, everything will run.
# 'Java' label
test_java: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
echo "org.gradle.java.home=$JAVA_HOME_11_X64" >> ~/.gradle/gradle.properties
- name: Build NetBeans
run: ant -quiet -Dcluster.config=release build-nozip
run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG build-nozip

- name: Prepare Artifact
if: ${{ matrix.java == '11' }}
Expand All @@ -139,7 +142,7 @@ jobs:

- name: Create Dev Build
if: ${{ matrix.java == '11' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
run: ant -quiet zip-cluster-config -Dcluster.config=release
run: ant -quiet zip-cluster-config -Dcluster.config=$CLUSTER_CONFIG

- name: Upload Dev Build
if: ${{ matrix.java == '11' && contains(github.event.pull_request.labels.*.name, 'ci:dev-build') && success() }}
Expand Down Expand Up @@ -183,7 +186,7 @@ jobs:
run: tar --zstd -xf build.tar.zst

- name: Commit Validation tests
run: ant $OPTS -Dcluster.config=release commit-validation
run: ant $OPTS -Dcluster.config=$CLUSTER_CONFIG commit-validation

- name: Create Test Summary
uses: test-summary/action@v2
Expand Down Expand Up @@ -285,12 +288,12 @@ jobs:
run: tar --zstd -xf build.tar.zst

- name: Test Netbeans Build System
run: ant $OPTS -Dcluster.config=release localtest
run: ant $OPTS -Dcluster.config=$CLUSTER_CONFIG localtest

- name: Build all Tests
# runs only in PRs if requested, nowhere else (~18 min)
if: env.test_tests == 'true' && github.event_name == 'pull_request' && success()
run: ant -quiet -Dcluster.config=release test -Dtest.includes=NoTestsJustBuild
run: ant -quiet -Dcluster.config=$CLUSTER_CONFIG test -Dtest.includes=NoTestsJustBuild


build-nbms:
Expand Down Expand Up @@ -1719,7 +1722,7 @@ jobs:
run: ant $OPTS -f platform/core.network test

- name: Commit Validation tests
run: ant $OPTS -Dcluster.config=release commit-validation
run: ant $OPTS -Dcluster.config=$CLUSTER_CONFIG commit-validation

- name: Create Test Summary
uses: test-summary/action@v2
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ Apache NetBeans is an open source development environment, tooling platform, and

### Building NetBeans

Build with the default config (See the [cluster.config](https://github.com/apache/netbeans/blob/ab66c7fdfdcbf0bde67b96ddb075c83451cdd1a6/nbbuild/cluster.properties#L19) property.)
Build the default `release` config (See the [cluster.config](https://github.com/apache/netbeans/blob/ab66c7fdfdcbf0bde67b96ddb075c83451cdd1a6/nbbuild/cluster.properties#L19) property.)
```
$ ant
$ ant build
```
Build the basic project (mainly Java features):
```
$ ant -Dcluster.config=basic
$ ant -Dcluster.config=basic build
```
Build the full project (including Groovy, PHP, JavaEE/JakartaEE and JavaScript features):
Build the full project (may include clusters which are not be in the release):
```
$ ant -Dcluster.config=full
$ ant -Dcluster.config=full build
```
Build the NetBeans Platform:
```
$ ant -Dcluster.config=platform
$ ant -Dcluster.config=platform build
```
Cleanup:
```
Expand Down
8 changes: 2 additions & 6 deletions nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public void setNbroot(File f) {
File clusterPropertiesFile = new File(nbroot, "nbbuild" + File.separatorChar + "cluster.properties");
Map<String,Object> properties = getProject().getProperties();
Map<String,Set<String>> clusters = loadModuleClusters(properties, clusterPropertiesFile);
Set<String> allClusterModules = new TreeSet<>();
for (Set<String> s : clusters.values()) {
allClusterModules.addAll(s);
}

// Check that javadoc <= full cluster config:
Set<String> javadoc = splitToSet(getProject().getProperty("config.javadoc.all"), "config.javadoc.all");
for (Set<String> modules : clusters.values()) {
Expand All @@ -80,8 +77,7 @@ public void setNbroot(File f) {
}
allClusters.put(m.group(1), splitToList((String) clusterDef.getValue(), clusterDef.getKey()));
}
allClusters.get("experimental").removeAll(allClusters.get("betauc")); // intentionally a superset
allClusters.get("betauc").removeAll(allClusters.get("stableuc")); // ditto

for (Map.Entry<String,List<String>> entry : allClusters.entrySet()) {
String name = entry.getKey();
List<String> modules = entry.getValue();
Expand Down
Loading

0 comments on commit df0c22a

Please sign in to comment.