Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to OLF v1.14.0 and password protect Knitro download #3

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,25 @@ jobs:
- name: Install Knitro (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
wget -nv -O knitro.tar.gz "$KNITRO_LINUX_URL"
wget -nv -O knitro.tar.gz --user "$KNITRO_DOWNLOAD_USER" --password "$KNITRO_DOWNLOAD_PASSWORD" "$KNITRO_LINUX_URL"
mkdir -p $RUNNER_TEMP/knitro
tar xzf knitro.tar.gz -C $RUNNER_TEMP/knitro
echo "KNITRODIR=$RUNNER_TEMP/knitro/knitro-14.1.0-Linux64" >> "$GITHUB_ENV"
env:
KNITRO_DOWNLOAD_USER: ${{ secrets.KNITRO_DOWNLOAD_USER }}
KNITRO_DOWNLOAD_PASSWORD: ${{ secrets.KNITRO_DOWNLOAD_PASSWORD }}
KNITRO_LINUX_URL: ${{ secrets.KNITRO_LINUX_URL }}

# Knitro does not yet support Java API on macOS, to be tried later on
# - name: Install Knitro (macOS)
# if: matrix.os == 'macos-latest'
# run: |
# wget -nv -O knitro.tar.gz "$KNITRO_MACOS_URL"
# mkdir -p $RUNNER_TEMP/knitro
# tar xzf knitro.tar.gz -C $RUNNER_TEMP/knitro
# echo "KNITRODIR=$RUNNER_TEMP/knitro/knitro-14.1.0-ARM-MacOS" >> "$GITHUB_ENV"
# env:
# KNITRO_MACOS_URL: ${{ secrets.KNITRO_MACOS_URL }}

- name: Install Knitro (Windows)
if: matrix.os == 'windows-latest'
shell: powershell
run: |
C:\msys64\usr\bin\wget.exe -nv -O knitro.zip "$env:KNITRO_WINDOWS_URL"
C:\msys64\usr\bin\wget.exe -nv -O knitro.zip --user "$env:KNITRO_DOWNLOAD_USER" --password "$env:KNITRO_DOWNLOAD_PASSWORD" "$env:KNITRO_WINDOWS_URL"
7z x -y knitro.zip -oC:\knitro
echo "KNITRODIR=C:\knitro\knitro-14.1.0-Win64" >> "$env:GITHUB_ENV"
env:
KNITRO_DOWNLOAD_USER: ${{ secrets.KNITRO_DOWNLOAD_USER }}
KNITRO_DOWNLOAD_PASSWORD: ${{ secrets.KNITRO_DOWNLOAD_PASSWORD }}
KNITRO_WINDOWS_URL: ${{ secrets.KNITRO_WINDOWS_URL }}

- name: Checkout sources
Expand All @@ -57,18 +50,7 @@ jobs:
distribution: 'temurin'
java-version: '17'

# temp until next OLF release
- name: Checkout powsybl-open-loadflow sources
uses: actions/checkout@v4
with:
repository: powsybl/powsybl-open-loadflow
ref: main
path: powsybl-open-loadflow
- name: Build powsybl-open-loadflow
run: mvn -batch-mode --no-transfer-progress clean install -DskipTests
working-directory: ./powsybl-open-loadflow

- name: Build with Maven (Ubuntu) # later: (Ubuntu / MacOS)
- name: Build with Maven (Ubuntu)
if: matrix.os != 'windows-latest'
run: |
./mvnw install:install-file -Dfile="$KNITRODIR/examples/Java/lib/bridj-0.7.0.jar" -DgroupId=com.artelys -DartifactId=bridj -Dversion=0.7.0 -Dpackaging=jar -DgeneratePom=true
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

<properties>
<java.version>17</java.version>
<powsybl-core.version>6.6.0-RC1</powsybl-core.version>
<powsybl-open-loadflow.version>1.14.0-SNAPSHOT</powsybl-open-loadflow.version>
<powsybl-core.version>6.6.0</powsybl-core.version>
<powsybl-open-loadflow.version>1.14.0</powsybl-open-loadflow.version>
<knitro-interfaces.version>14.1.0</knitro-interfaces.version>
<bridj.version>0.7.0</bridj.version>
</properties>
Expand Down
Loading