Skip to content

Commit

Permalink
Merge branch 'release/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed Nov 28, 2021
2 parents 9b91593 + a72b853 commit e49d378
Show file tree
Hide file tree
Showing 21 changed files with 1,849 additions and 433 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[![Java CI with Maven](https://github.com/Minres/CoreDSL/actions/workflows/maven.yml/badge.svg)](https://github.com/Minres/CoreDSL/actions/workflows/maven.yml)

# CoreDSL

This repo contains the XText bundles/plugins for CoreDSL. The bundles can be installed from https://minres.com/download/repository/CoreDSL
This repo contains the XText bundles/plugins for [CoreDSL](https://minres.github.io/CoreDSL). The OSGI bundles can be installed from https://minres.github.io/CoreDSL/repository.

## Language documentation

[Programmer's manual](https://github.com/Minres/CoreDSL/wiki/CoreDSL-2-programmer's-manual)


## References

Expand All @@ -9,7 +16,3 @@ https://www.lysator.liu.se/c/ANSI-C-grammar-y.html
## EBNF

The generated ANTLR grammar (DebugInternalCoreDsl.g) can be converted into EBNF using https://bottlecaps.de/convert/ to create a formal specification of the language

## Language documentation

[Programmer's manual](https://github.com/Minres/CoreDSL/wiki/CoreDSL-2-programmer's-manual)
104 changes: 104 additions & 0 deletions com.minres.coredsl.repository/packaging-p2-composite.ant
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0"?>
<project name="project">

<target name="getMajorMinorVersion">
<script language="javascript">
<![CDATA[
// getting the value
buildnumber = project.getProperty("unqualifiedVersion");
index = buildnumber.lastIndexOf(".");
counter = buildnumber.substring(0, index);
project.setProperty("majorMinorVersion",counter);
]]>
</script>
</target>

<target name="test_getMajorMinor" depends="getMajorMinorVersion">
<echo message="majorMinorVersion: ${majorMinorVersion}"/>
</target>

<!--
site.label The name/title/label of the created composite site
unqualifiedVersion The version without any qualifier replacement
buildQualifier The build qualifier
-->
<target name="compute.child.repository.data" depends="getMajorMinorVersion">
<property name="full.version" value="${unqualifiedVersion}" />

<property name="software.download.area" location="${user.home}/p2.repositories" />
<property name="updates.dir" value="updates" />

<property name="site.composite.name" value="${site.label} ${majorMinorVersion}" />
<property name="main.site.composite.name" value="${site.label} All Versions" />

<!--
<property name="main.composite.repository.directory" location="${software.download.area}/${updates.dir}" />
-->
<property name="main.composite.repository.directory" location="${software.download.area}" />

<property name="composite.repository.directory" value="${main.composite.repository.directory}/${majorMinorVersion}" />
<property name="child.repository" value="${full.version}" />
<property name="child.repository.directory" value="${composite.repository.directory}/${child.repository}/" />
</target>

<target name="p2.composite.add" depends="compute.child.repository.data">
<property name="source.repository" location="${project.build.directory}/repository"/>

<echo message=" " />

<echo message="Source repository path: ${source.repository}" />

<echo message="Copying to ${child.repository.directory}..." />

<mkdir dir="${child.repository.directory}"/>
<copy todir="${child.repository.directory}" overwrite="true">
<fileset dir="${source.repository}" />
</copy>

<add.composite.repository.internal
composite.repository.location="${composite.repository.directory}"
composite.repository.name="${site.composite.name}"
composite.repository.child="${child.repository}"
/>

<add.composite.repository.internal
composite.repository.location="${main.composite.repository.directory}"
composite.repository.name="${main.site.composite.name}"
composite.repository.child="${majorMinorVersion}"
/>

</target>

<!-- = = = = = = = = = = = = = = = = =
macrodef: add.composite.repository.internal
= = = = = = = = = = = = = = = = = -->
<macrodef name="add.composite.repository.internal">
<attribute name="composite.repository.location" />
<attribute name="composite.repository.name" />
<attribute name="composite.repository.child" />
<sequential>

<echo message=" " />
<echo message="Composite repository : @{composite.repository.location}" />
<echo message="Composite name : @{composite.repository.name}" />
<echo message="Adding child repository : @{composite.repository.child}" />

<p2.composite.repository>
<repository compressed="false" location="@{composite.repository.location}" name="@{composite.repository.name}" />
<add>
<repository location="@{composite.repository.child}" />
</add>
</p2.composite.repository>

<echo file="@{composite.repository.location}/p2.index">version=1
metadata.repository.factory.order=compositeContent.xml,\!
artifact.repository.factory.order=compositeArtifacts.xml,\!
</echo>

</sequential>
</macrodef>


</project>
105 changes: 79 additions & 26 deletions com.minres.coredsl.repository/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Expand All @@ -6,11 +7,10 @@
<groupId>com.minres.coredsl</groupId>
<artifactId>com.minres.coredsl.parent</artifactId>
<version>2.0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
<relativePath>..</relativePath>
</parent>
<artifactId>com.minres.coredsl.repository</artifactId>
<packaging>eclipse-repository</packaging>

<build>
<pluginManagement>
<plugins>
Expand All @@ -37,7 +37,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
Expand All @@ -46,6 +46,15 @@
</plugin>
</plugins>
</pluginManagement>

<extensions>
<!-- Enabling the use of FTP -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
Expand All @@ -70,33 +79,77 @@
</executions>
</plugin>
<plugin>
<groupId>com.carrotgarden.maven</groupId>
<artifactId>bintray-maven-plugin</artifactId>
<version>1.5.20191113165555</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>false</skip>
<!-- Bintray organization name. -->
<subject>minres</subject>
<!-- Bintray target repository. -->
<repository>eclipse</repository>
<!-- Bintray package name. -->
<bintrayPackage>CoreDSL</bintrayPackage>
<bintrayVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</bintrayVersion>
<packageVcsUrl>https://github.com/Minres/CoreDSL.git</packageVcsUrl>
<!-- Local folder content to sync to the remote repo. -->
<sourceFolder>${project.build.directory}/repository</sourceFolder>
<!-- Remote folder for local content upload, relative path. -->
<targetFolder>CoreDSL/${parsedVersion.majorVersion}.${parsedVersion.minorVersion}</targetFolder>

<!-- Bintray credentials in settings.xml. -->
<serverId>bintray-minres-deploy</serverId>
<executable>bash</executable>
<!-- optional -->
<workingDirectory>${software.download.area}</workingDirectory>
<arguments>
<argument>-c</argument>
<argument>if [ -d CoreDSL-gh ]; then cd CoreDSL-gh; git pull; else git clone --branch gh-pages https://github.com/Minres/CoreDSL.git CoreDSL-gh; fi</argument>
</arguments>
<environmentVariables>
<LANG>en_US</LANG>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-eclipserun-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<!-- IMPORTANT: DO NOT split the arg line -->
<appArgLine>-application org.eclipse.ant.core.antRunner -buildfile packaging-p2-composite.ant p2.composite.add -Dsite.label="CoreDSL Software Repository" -Dproject.build.directory=${project.build.directory} -DunqualifiedVersion=${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} -Dsoftware.download.area="${software.download.area}/CoreDSL-gh/repository"</appArgLine>
<repositories>
<repository>
<id>2020-03</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/2020-03/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<artifactId>org.eclipse.ant.core</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.apache.ant</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.repository.tools</artifactId>
<type>eclipse-plugin</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.p2.extras.feature</artifactId>
<type>eclipse-feature</type>
</dependency>
<dependency>
<artifactId>org.eclipse.equinox.ds</artifactId>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
</configuration>
<executions>
<!-- Activate "bintray:upload" during "package" -->
<execution>
<id>add-p2-composite-repository</id>
<phase>package</phase>
<goals>
<goal>upload</goal>
<goal>eclipse-run</goal>
</goals>
</execution>
</executions>
Expand All @@ -106,6 +159,6 @@
</profile>
</profiles>

<dependencies>
</dependencies>
<dependencies />

</project>
29 changes: 29 additions & 0 deletions com.minres.coredsl.repository/upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
##

[ -f $HOME/.upload.sh.cfg ] && . $HOME/.upload.sh.cfg


cd target/repository
artifactory_url='https://artifactory.minres.com/artifactory'
repo_module='eclipse/CoreDSL'
baseurls="h/test-repo/CoreDSL/$1 https://artifactory.minres.com/artifactory/test-repo/CoreDSL/latest"
file_list=`find . -type f | grep -v p2.index`

echo Uploading P2 artifacts to ${artifactory_url}/${repo_module}/${1}

for artifact_name in $file_list; do
echo Processing $artifact_name
for version in $1 latest; do
sha256=$(openssl dgst -sha256 ${artifact_name}|sed 's/^SHA256.*= //')
sha1=$(openssl dgst -sha1 ${artifact_name}|sed 's/^SHA.*= //')
md5=$(openssl dgst -md5 ${artifact_name}|sed 's/^MD5.*= //')
# Upload artifact to artifactory
curl -sSf -u${USERNAME}:${PASSWORD} -T ${artifact_name} \
-H "X-Checksum-Sha256:${sha256}" \
-H "X-Checksum-Sha1:${sha1}" \
-H "X-Checksum-md5:${md5}" \
${artifactory_url}/${repo_module}/${version}/$artifact_name > /dev/null
done
done

2 changes: 1 addition & 1 deletion com.minres.coredsl.tests/inputs/sqrt.core_desc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ InstructionSet Vec2D {
} ISAXRegFile[32];
struct simd{
unsigned a1;
unsigned a1;
unsigned a2;
unsigned a3;
unsigned a4;
};
Expand Down
Loading

0 comments on commit e49d378

Please sign in to comment.