Skip to content

Commit

Permalink
Cleanup CDT repo related to the docker + Java 21 updates
Browse files Browse the repository at this point in the history
- Fix links for cdt-infra
- The cdt-infra git repo is now archived, so this commit updates
the links to the current values.
- Add new Docker related files to the gitattributes as text files
- Update DEFAULT_BUFFER_SIZE for Java 21's value when building JNI,
this also means the dll/exe need a rebuild
- add a toolchains.xml since we use Java 21 toolchain, but most bundles
are Java 17 still
  • Loading branch information
jonahgraham committed Apr 27, 2024
1 parent 9fb6260 commit cc66780
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ Makefile text
# Build files
*.Jenkinsfile text
Jenkinsfile text
Dockerfile text
*.yaml text
*.yml text
.dockerignore text
uid_entrypoint text

# Qt
*.pro text
Expand Down
14 changes: 11 additions & 3 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ mvn package

and the resulting p2 repository will be in `releng/org.eclipse.cdt.repo/target/repository`

The current set of options to Maven used for building on the CI can be seen in the Jenkinsfiles on [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt)
The current set of options to Maven used for building on the CI can be seen in the [Jenkinsfile](https://github.com/eclipse-cdt/cdt/blob/main/Jenkinsfile) and GitHub actions [workflows](https://github.com/eclipse-cdt/cdt/tree/main/.github/workflows)

To build CDT plug-ins you need a standard Maven & Java developement environment. The Dockerfiles used for CDT's images are published in [cdt-infra](https://github.com/eclipse-cdt/cdt-infra/tree/master/docker). The requirements for running all tests successfully and for rebuilding non-Java parts of CDT are much more extensive than standard Maven & Java and include items such as GCC, GDB, yarn, Node, etc. Refer to the Dockerfiles for the current versions of those dependencies.
To build CDT plug-ins you need a standard Maven & Java development environment. The Dockerfiles used for CDT's images are published in [docker](https://github.com/eclipse-cdt/cdt/tree/main/docker). The requirements for running all tests successfully and for rebuilding non-Java parts of CDT are much more extensive than standard Maven & Java and include items such as GCC, GDB, yarn, Node, etc. Refer to the Dockerfiles for the current versions of those dependencies.

### Checking code cleanliness

The CI build automatically run code cleanliness checks. To run them on your computer it is recommended to use the Docker image, for example like this from the root of the checked out CDT repo:

```sh
docker run --rm -it -v $(git rev-parse --show-toplevel):/work -w /work/$(git rev-parse --show-prefix) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined quay.io/eclipse-cdt/cdt-infra-plus-eclipse-install:latest releng/scripts/check_code_cleanliness.sh
```

### Profiles

Expand Down Expand Up @@ -123,7 +131,7 @@ There are a few special values that can be specified (see BaseParametrizedTestCa
The default, defined in the root pom.xml, it is blank, which uses `gdb` and `gdbserver`.
See BaseParametrizedTestCase for more info.

To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh)
To build all gdb versions for testing CDT see [download-build-gdb.sh](https://github.com/eclipse-cdt/cdt/blob/main/docker/scripts/download-build-gdb.sh)

#### native

Expand Down
4 changes: 2 additions & 2 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ SPDX-License-Identifier: EPL-2.0

The project maintains the following source code repositories:

* https://github.com/eclipse-cdt/.github
* https://github.com/eclipse-cdt/cdt
* https://github.com/eclipse-cdt/cdt-infra
* https://github.com/eclipse-cdt/cdt-lsp
* https://github.com/eclipse-cdt/.eclipsefdn
* https://github.com/eclipse-cdt/.github

## Cryptography

Expand Down
4 changes: 2 additions & 2 deletions POLICY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Code Formatting

These are the coding style recommendations that are in place with project setting. They are enforced by the [build process](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt/verify#cdt-verify-code-cleanliness) and auto-save actions in Eclipse.
These are the coding style recommendations that are in place with project setting. They are enforced by the build process (as defined in [Jenkinsfile](https://github.com/eclipse-cdt/cdt/blob/main/Jenkinsfile) and GitHub actions [workflows](https://github.com/eclipse-cdt/cdt/tree/main/.github/workflows)) and auto-save actions in Eclipse.

* Preserve formatting and style of old code when making patches
* Use default "Eclipse" code formatting for Java for new code
Expand All @@ -13,7 +13,7 @@ Externalize strings (excluding exception arguments, tests and special identifier

## Eclipse Java Errors/Warnings

All CDT plugins override default compiler error/warning and use project specific errors/warnings. This enforced by the [build process](https://github.com/eclipse-cdt/cdt-infra/tree/master/jenkins/pipelines/cdt/verify#cdt-verify-code-cleanliness).
All CDT plugins override default compiler error/warning and use project specific errors/warnings. This enforced by the build process (as defined in [Jenkinsfile](https://github.com/eclipse-cdt/cdt/blob/main/Jenkinsfile) and GitHub actions [workflows](https://github.com/eclipse-cdt/cdt/tree/main/.github/workflows)).

All committers and contributors submitting patches should enable [API tooling](http://wiki.eclipse.org/PDE/API_Tools/User_Guide#API_Tooling_Setup) by setting target baseline platform. Do not commit code with API errors.

Expand Down
2 changes: 1 addition & 1 deletion core/org.eclipse.cdt.core.native/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.core.native;singleton:=true
Bundle-Version: 6.3.300.qualifier
Bundle-Version: 6.3.400.qualifier
Bundle-Activator: org.eclipse.cdt.internal.core.natives.CNativePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/org.eclipse.cdt.core.native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<version>6.3.300-SNAPSHOT</version>
<version>6.3.400-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.core.native</artifactId>
<packaging>eclipse-plugin</packaging>

Expand Down
Binary file modified core/org.eclipse.cdt.core.win32.x86_64/os/win32/x86_64/pty.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion docker/cdt-infra-base/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ RUN export JVERSION=${JDK17_VERSION} \
&& find $JHOME/include \
&& rm -rf /tmp/x


# Default to JAVA21 being in use
ENV PATH="${JAVA21_HOME}/bin:${PATH}"
ENV JAVA_HOME ${JAVA21_HOME}
Expand All @@ -129,6 +128,8 @@ RUN curl -fsSL https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/bina
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven

RUN mkdir -p ${HOME}/.m2
COPY toolchains.xml ${HOME}/.m2

#Fix permissions for OpenShift & standard k8s
RUN chown -R 1000:0 ${HOME} \
Expand Down
3 changes: 2 additions & 1 deletion docker/cdt-infra-eclipse-full/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN pip3 install meson

# GDB pre-built in a different image
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all /shared/common/gdb/gdb-all
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/bin /shared/common/gdb/gdb-all/bin
COPY --from=cdt-infra-all-gdbs:ubuntu-18.04 /shared/common/gdb/gdb-all/install /shared/common/gdb/gdb-all/install
ENV PATH="/shared/common/gdb/gdb-all/bin:${PATH}"

# Get pre-built MacOSX toolchain from other image (this also
Expand Down
Empty file modified docker/scripts/xstartup_icewm.sh
100644 → 100755
Empty file.
Empty file modified docker/scripts/xstartup_metacity.sh
100644 → 100755
Empty file.
Empty file modified docker/scripts/xstartup_mutter.sh
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions docker/toolchains.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-21</id>
<version>21</version>
<vendor>default</vendor>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/jdk-21.0.3+9</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<id>JavaSE-17</id>
<version>17</version>
<vendor>default</vendor>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/jdk-17.0.11+9</jdkHome>
</configuration>
</toolchain>
</toolchains>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

echo "This script, part of CDT's infrastructure, has been moved to https://github.com/eclipse-cdt/cdt-infra/blob/master/docker/scripts/download-build-gdb.sh"
echo "This script, part of CDT's infrastructure, has been moved to https://github.com/eclipse-cdt/cdt/blob/main/docker/scripts/download-build-gdb.sh"
2 changes: 1 addition & 1 deletion dsf/org.eclipse.cdt.examples.dsf/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.cdt.examples.dsf;singleton:=true
Bundle-Version: 2.4.200.qualifier
Bundle-Version: 2.4.300.qualifier
Bundle-Activator: org.eclipse.cdt.examples.dsf.DsfExamplesPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
Expand Down
Binary file modified native/org.eclipse.cdt.native.serial/os/win32/x86_64/serial.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions releng/scripts/do_format_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ CDTDIR=${DIR}/../..
##
# Format code
##
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.23/eclipse}
: ${ECLIPSE:=~/buildtools/eclipse-SDK-4.31/eclipse}

if test ! -e "$ECLIPSE" ; then
echo "The Eclipse binary was not found at \"$ECLIPSE\"!"
echo "You can download it to and pass it via environment variable:"
echo " curl -L http://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/eclipse-SDK-4.23-linux-gtk-x86_64.tar.gz | tar xzC /tmp"
echo " curl -L https://download.eclipse.org/eclipse/downloads/drops4/R-4.31-202402290520/eclipse-SDK-4.31-linux-gtk-x86_64.tar.gz | tar xzC /tmp"
echo " ECLIPSE=/tmp/eclipse/eclipse ./releng/scripts/check_code_cleanliness.sh"
exit 1
fi
Expand Down

0 comments on commit cc66780

Please sign in to comment.