Skip to content

Commit b6f0e89

Browse files
Merge branch 'develop' into add-zoned-date-time-generic-impl
# Conflicts: # test/python_unit_tests/semantics/test_to_zoned_date_time.py
2 parents 5f40562 + 523db63 commit b6f0e89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1030
-2675
lines changed

.github/renovate.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base"],
4+
"prConcurrentLimit": 10,
5+
"prHourlyLimit": 20,
6+
"packageRules": [
7+
{
8+
"description": "Update the Maven property rosetta.dsl.version when com.regnosys.rosetta releases a new version",
9+
"matchManagers": ["maven"],
10+
"matchPackageNames": [
11+
"com.regnosys.rosetta:com.regnosys.rosetta",
12+
"rosetta.dsl.version"
13+
],
14+
"enabled": true
15+
},
16+
{
17+
"description": "Disable all that are not maven AND not those names",
18+
"matchManagers": ["maven"],
19+
"excludePackageNames": [
20+
"com.regnosys.rosetta:com.regnosys.rosetta",
21+
"rosetta.dsl.version"
22+
],
23+
"enabled": false
24+
}
25+
]
26+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build and Test (Reusable)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build_and_test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Clean up stale submodule config
12+
run: git config --file .git/config --remove-section submodule.build/common-domain-model || true
13+
- name: Set up JDK 21
14+
uses: actions/setup-java@v4
15+
with:
16+
java-version: '21'
17+
distribution: 'temurin'
18+
cache: maven
19+
- name: Set up Python 3.11
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.11'
23+
- name: Build with Maven
24+
run: mvn -B package -Psign-artifacts --file pom.xml
25+
- name: Run Python Unit Tests
26+
run: |
27+
chmod +x test/python_setup/setup_python_env.sh
28+
chmod +x test/python_setup/cleanup_python_env.sh
29+
chmod +x test/python_unit_tests/setup_unit_test_env.sh
30+
chmod +x test/python_unit_tests/run_python_unit_tests.sh
31+
test/python_unit_tests/run_python_unit_tests.sh
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build and Test JAR
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
jobs:
10+
build_and_test:
11+
uses: ./.github/workflows/build-and-test-core.yml
Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: Build and Test JAR
1+
name: Build and Test JAR on Main Branch
102

113
on:
124
push:
@@ -16,26 +8,4 @@ on:
168

179
jobs:
1810
build_and_test:
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Set up JDK 21
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: '21'
28-
distribution: 'temurin'
29-
cache: maven
30-
- name: Set up Python 3.11
31-
uses: actions/setup-python@v4
32-
with:
33-
python-version: '3.11'
34-
- name: Build with Maven
35-
run: mvn -B package --file pom.xml
36-
- name: Run Python Unit Tests
37-
run: |
38-
chmod +x build/setup_python_env.sh
39-
chmod +x test/python_unit_tests/setup_unit_test_env.sh
40-
chmod +x test/python_unit_tests/run_python_unit_tests.sh
41-
test/python_unit_tests/run_python_unit_tests.sh
11+
uses: ./.github/workflows/build-and-test-core.yml

.github/workflows/create-tagged-release.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/cve-scanning.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
20+
- name: Clean up stale submodule config
21+
run: git config --file .git/config --remove-section submodule.build/common-domain-model || true
2022
- name: Setup JDK 21
2123
uses: actions/setup-java@v4
2224
with:

.github/workflows/license-scanning-maven.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
runs-on: ubuntu-latest
5353
steps:
5454
- uses: actions/checkout@v4
55+
- name: Clean up stale submodule config
56+
run: git config --file .git/config --remove-section submodule.build/common-domain-model || true
5557
- name: Set up JDK 21
5658
uses: actions/setup-java@v4
5759
with:

.github/workflows/release-core.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# .github/workflows/release-core.yml
2+
name: Core Release Workflow
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
release_version:
8+
required: true
9+
type: string
10+
11+
jobs:
12+
build_and_release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
- name: Clean up stale submodule config
18+
run: git config --file .git/config --remove-section submodule.build/common-domain-model || true
19+
20+
- name: Set up JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: '21'
25+
cache: maven
26+
27+
- name: Get artifactId
28+
id: get_artifact_id
29+
run: |
30+
ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)
31+
echo "artifact_id=$ARTIFACT_ID" >> $GITHUB_OUTPUT
32+
33+
- name: Set POM version to release version and build
34+
run: |
35+
echo "Updating POM version to ${{ inputs.release_version }}"
36+
mvn -B versions:set -DnewVersion=${{ inputs.release_version }}
37+
mvn -B package -Psign-artifacts
38+
39+
- name: Revert POM changes
40+
run: git checkout -- pom.xml
41+
42+
- name: Check if tag already exists and create if not
43+
id: create_tag
44+
env:
45+
RELEASE_TAG: "rosetta-dsl-v${{ inputs.release_version }}"
46+
run: |
47+
# Fetch all tags to check for existence
48+
git fetch --tags
49+
if git tag | grep -q "${{ env.RELEASE_TAG }}"; then
50+
echo "Tag ${{ env.RELEASE_TAG }} already exists, skipping tag creation."
51+
else
52+
echo "Creating and pushing tag ${{ env.RELEASE_TAG }}"
53+
git config user.name "github-actions[bot]"
54+
git config user.email "github-actions[bot]@users.noreply.github.com"
55+
git tag "${{ env.RELEASE_TAG }}"
56+
git push origin "${{ env.RELEASE_TAG }}"
57+
fi
58+
echo "TAG_NAME=${{ env.RELEASE_TAG }}" >> $GITHUB_ENV
59+
60+
- name: Create GitHub Release
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
tag_name: ${{ env.TAG_NAME }}
64+
name: Release ${{ env.TAG_NAME }}
65+
files: |
66+
target/${{ steps.get_artifact_id.outputs.artifact_id }}-${{ inputs.release_version }}.jar
67+
target/${{ steps.get_artifact_id.outputs.artifact_id }}-${{ inputs.release_version }}-javadoc.jar
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# .github/workflows/release-on-dsl-version-change.yml
2+
3+
name: Release on DSL Version Change
4+
5+
on:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
check-dsl-version:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
dsl_version_changed: ${{ steps.check_dsl.outputs.dsl_version_changed }}
15+
current: ${{ steps.get_version.outputs.current }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0 # Fetch all tags
21+
22+
- name: Clean up stale submodule config
23+
run: git config --file .git/config --remove-section submodule.build/common-domain-model || true
24+
25+
- name: Set up JDK
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: 'temurin'
29+
java-version: '21'
30+
cache: maven
31+
32+
- name: Get current DSL version from POM
33+
id: get_version
34+
run: |
35+
CURRENT=$(mvn help:evaluate -Dexpression=rosetta.dsl.version -q -DforceStdout)
36+
echo "Current DSL version: $CURRENT"
37+
echo "current=$CURRENT" >> $GITHUB_OUTPUT
38+
39+
- name: Get latest rosetta-dsl-v* tag
40+
id: get_tag
41+
run: |
42+
TAG=$(git tag --list 'rosetta-dsl-v*' --sort=-v:refname | head -n 1)
43+
if [ -z "$TAG" ]; then
44+
TAG_VERSION=""
45+
else
46+
TAG_VERSION="${TAG#rosetta-dsl-v}"
47+
fi
48+
echo "Latest tag: $TAG"
49+
echo "Latest tag version: $TAG_VERSION"
50+
echo "tag=$TAG" >> $GITHUB_OUTPUT
51+
echo "tag_version=$TAG_VERSION" >> $GITHUB_OUTPUT
52+
53+
- name: Check if DSL version is different from latest tag
54+
id: check_dsl
55+
run: |
56+
CURRENT="${{ steps.get_version.outputs.current }}"
57+
TAG_VERSION="${{ steps.get_tag.outputs.tag_version }}"
58+
if [ -z "$TAG_VERSION" ]; then
59+
echo "No previous tag found. Proceeding with release."
60+
echo "dsl_version_changed=true" >> $GITHUB_OUTPUT
61+
elif [ "$CURRENT" != "$TAG_VERSION" ]; then
62+
echo "DSL version ($CURRENT) is different from latest tag ($TAG_VERSION). Proceeding with release."
63+
echo "dsl_version_changed=true" >> $GITHUB_OUTPUT
64+
else
65+
echo "DSL version ($CURRENT) matches latest tag ($TAG_VERSION). Skipping release."
66+
echo "dsl_version_changed=false" >> $GITHUB_OUTPUT
67+
fi
68+
69+
release:
70+
needs: check-dsl-version
71+
if: needs.check-dsl-version.outputs.dsl_version_changed == 'true'
72+
uses: ./.github/workflows/release-core.yml
73+
with:
74+
release_version: ${{ needs.check-dsl-version.outputs.current }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .github/workflows/release-on-tag.yml
2+
3+
name: Release on tag
4+
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get tag name
15+
id: get_tag
16+
run: |
17+
TAG_NAME=${GITHUB_REF#refs/tags/}
18+
# Extract version from tag name (e.g., 'rosetta-dsl-v1.2.3' -> '1.2.3')
19+
RELEASE_VERSION=${TAG_NAME#rosetta-dsl-v}
20+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
21+
echo "release_version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
22+
23+
- name: Call core release workflow
24+
uses: ./.github/workflows/release-core.yml
25+
with:
26+
release_version: ${{ steps.get_tag.outputs.release_version }}

0 commit comments

Comments
 (0)