Skip to content

Commit

Permalink
Snapshot CI
Browse files Browse the repository at this point in the history
Signed-off-by: Leclerc Clement <clement.leclerc@rte-france.com>
  • Loading branch information
clementleclercRTE committed Sep 24, 2024
1 parent 651580e commit 2d6693a
Showing 1 changed file with 53 additions and 4 deletions.
57 changes: 53 additions & 4 deletions .github/workflows/dependencies-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,23 @@ jobs:
cat pom.xml || true
#BUILD LOADFLOW
- name: Check for SNAPSHOT branch
run: |
SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-open-loadflow | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///')
if [ -n "$SNAPSHOT_BRANCH" ]; then
echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH"
echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV
else
echo "No SNAPSHOT branch found"
echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV
fi
- name: Checkout loadflow-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-open-loadflow
ref: main
ref: ${{ env.SNAPSHOT_BRANCH }}
- name: Change core version
run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false
- name: Build with Maven
Expand All @@ -78,11 +90,24 @@ jobs:


#BUILD DIAGRAM
- name: Check for SNAPSHOT branch
run: |
SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-diagram | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///')
if [ -n "$SNAPSHOT_BRANCH" ]; then
echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH"
echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV
else
echo "No SNAPSHOT branch found"
echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV
fi
- name: Checkout diagram-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-diagram
ref: main
ref: ${{ env.SNAPSHOT_BRANCH }}
- name: Change core version
run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false
- name: Build with Maven
Expand All @@ -93,11 +118,23 @@ jobs:
run : echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

#BUILD ENTSOE
- name: Check for SNAPSHOT branch
run: |
SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-entsoe | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///')
if [ -n "$SNAPSHOT_BRANCH" ]; then
echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH"
echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV
else
echo "No SNAPSHOT branch found"
echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV
fi
- name: Checkout entsoe-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-entsoe
ref: main
ref: ${{ env.SNAPSHOT_BRANCH }}
- name: Change core version
run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false
- name: Change open-loadflow version
Expand All @@ -110,11 +147,23 @@ jobs:
run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

#BUILD DYNAWO
- name: Check for SNAPSHOT branch
run: |
SNAPSHOT_BRANCH=$(git ls-remote --heads powsybl/powsybl-dynawo | grep 'refs/heads/.*SNAPSHOT' | sed 's/.*refs\/heads\///')
if [ -n "$SNAPSHOT_BRANCH" ]; then
echo "SNAPSHOT VERSION EXIST: $SNAPSHOT_BRANCH"
echo "SNAPSHOT_EXIST=true" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> $GITHUB_ENV
else
echo "No SNAPSHOT branch found"
echo "SNAPSHOT_EXIST=false" >> $GITHUB_ENV
echo "SNAPSHOT_BRANCH=main" >> $GITHUB_ENV
fi
- name: Checkout dynawo-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-dynawo
ref: main
ref: ${{ env.SNAPSHOT_BRANCH }}
- name: Change core version
run : mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false
- name: Build with Maven
Expand Down

0 comments on commit 2d6693a

Please sign in to comment.