Skip to content

Snapshot CI

Snapshot CI #5

Workflow file for this run

name: Snapshot CI
env :
CORE_VERSION : ""
LOADFLOW_VERSION : ""
DIAGRAM_VERSION : ""
ENTSOE_VERSION : ""
DYNAFLOW_VERSION: ""
on:
push:
branches:
# on all branches except main where full build will be run
- '*'
- '!main'
jobs:
build_dependencies:
name: Build OS ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
#SETUP JDK
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
#SETUP PYTHON
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Python dependencies
run: python -m pip install --upgrade pip
#SETUP GRAALVM
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1.1.5
with:
java-version: '17'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
#BUILD CORE
- name: Checkout core-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-core
ref: main
- name: Build with Maven
run: mvn --batch-mode clean install -DskipTests
- name : Get core version
run : echo "CORE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
#BUILD LOADFLOW
- name: Checkout loadflow-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-open-loadflow
ref: main
- name: Build with Maven
run: |
mvn --batch-mode clean install -DskipTests
- name: Get loadflow version
run : echo "LOADFLOW_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
#BUILD DIAGRAM
- name: Checkout diagram-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-diagram
ref: main
- name: Build with Maven
run: |
mvn --batch-mode clean install -DskipTests
- name: Get diagram version
run : echo "DIAGRAM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
#BUILD ENTSOE
- name: Checkout entsoe-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-entsoe
ref: main
- name: Build with Maven
run: |
mvn clean --batch-mode clean install -DskipTests
- name: Get entsoe version
run : echo "ENTSOE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
#BUILD DYNAWO
- name: Checkout dynawo-sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-dynawo
ref: main
- name: Build with Maven
run: |
mvn --batch-mode clean install -DskipTests
- name: Get diagram version
run : echo "DINAWO_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
#CHECKOUT_PYPOWSYBL_DEPENCIES
- name: Checkout powsybl-depencies
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-dependencies
ref: main
#UPDATE/INSTALL_PYPOWSYBL_DEPENCIES
- name: Update dependencies versions
run: |
mvn versions:set-property -Dproperty=powsybl-core.version -DnewVersion=$CORE_VERSION -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=powsybl-open-loadflow.version -DnewVersion=$LOADFLOW_VERSION -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=powsybl-diagram.version -DnewVersion=$DIAGRAM_VERSION -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=powsybl-dynawo.version -DnewVersion=$DYNAWO_VERSION -DgenerateBackupPoms=false
mvn versions:set-property -Dproperty=powsybl-entsoe.version -DnewVersion=$ENTSOE_VERSION -DgenerateBackupPoms=false
- name: Install powsybl-dependencies
run: mvn clean install
#BUILD PYPOWSYBL
- name: Checkout pypowsybl-sources
uses: actions/checkout@v4
with:
repository: powsybl/pypowsybl
ref: main
- name: Install and build
run: |
pip install --upgrade setuptools pip
pip install -r requirements.txt
pip install .
- name: Run test
run: pytest tests