From 7311d87fffcef937d71ae6abfb82a65fdcc5103f Mon Sep 17 00:00:00 2001 From: Etienne LESOT Date: Mon, 23 Oct 2023 09:29:25 +0200 Subject: [PATCH 1/2] set compatibility mode for native image build option Signed-off-by: Etienne LESOT --- .github/workflows/dev-ci.yml | 17 +++++++++++++++++ cpp/CMakeLists.txt | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 2566eb762f..2a16837112 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -20,6 +20,11 @@ jobs: abi: cp38, version: '3.8', } + - { + name: cp310, + abi: cp310, + version: '3.10', + } steps: - name: Install Linux packages @@ -85,6 +90,12 @@ jobs: working-directory: ./docs run: make doctest + - name: Upload wheel + uses: actions/upload-artifact@v3 + with: + name: pypowsybl-wheel-linux-${{ matrix.python.name }} + path: wheelhouse/*.whl + macos_windows_build: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} @@ -147,3 +158,9 @@ jobs: - name: Run doc examples working-directory: ./docs run: make doctest + + - name: Upload wheel + uses: actions/upload-artifact@v3 + with: + name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} + path: dist/*.whl diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d2a26e2e6d..335fd067f4 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -76,7 +76,7 @@ ExternalProject_Add(native-image DEPENDS mvn SOURCE_DIR ${PYPOWSYBL_JAVA_BIN_DIR} DOWNLOAD_COMMAND "" - PATCH_COMMAND $ENV{JAVA_HOME}/bin/native-image ${NATIVE_IMAGE_BUILD_OPTIONS} --class-path ${PYPOWSYBL_JAVA_SRC_DIR}/target/pypowsybl-java.jar${EXTRA_JARS} --no-fallback --shared --gc=${NATIVE_IMAGE_GC} -H:Name=pypowsybl-java -H:CLibraryPath=${CMAKE_CURRENT_SOURCE_DIR}/src + PATCH_COMMAND $ENV{JAVA_HOME}/bin/native-image ${NATIVE_IMAGE_BUILD_OPTIONS} -march=compatibility --class-path ${PYPOWSYBL_JAVA_SRC_DIR}/target/pypowsybl-java.jar${EXTRA_JARS} --no-fallback --shared --gc=${NATIVE_IMAGE_GC} -H:Name=pypowsybl-java -H:CLibraryPath=${CMAKE_CURRENT_SOURCE_DIR}/src CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${PYPOWSYBL_JAVA_BIN_DIR}/${PYPOWSYBL_JAVA_OLD_LIB} ${PYPOWSYBL_JAVA_BIN_DIR}/${PYPOWSYBL_JAVA_LIB} ${NATIVE_IMAGE_INSTALL_EXTRA_COMMAND} From 17a1c53b60ed6aead6312404e8ba848e1ad622d0 Mon Sep 17 00:00:00 2001 From: Geoffroy Jamgotchian Date: Mon, 23 Oct 2023 22:26:33 +0200 Subject: [PATCH 2/2] Revert CI Signed-off-by: Geoffroy Jamgotchian --- .github/workflows/dev-ci.yml | 17 ----------------- cpp/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 2a16837112..2566eb762f 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -20,11 +20,6 @@ jobs: abi: cp38, version: '3.8', } - - { - name: cp310, - abi: cp310, - version: '3.10', - } steps: - name: Install Linux packages @@ -90,12 +85,6 @@ jobs: working-directory: ./docs run: make doctest - - name: Upload wheel - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheel-linux-${{ matrix.python.name }} - path: wheelhouse/*.whl - macos_windows_build: name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel runs-on: ${{ matrix.config.os }} @@ -158,9 +147,3 @@ jobs: - name: Run doc examples working-directory: ./docs run: make doctest - - - name: Upload wheel - uses: actions/upload-artifact@v3 - with: - name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }} - path: dist/*.whl diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 335fd067f4..948448fcec 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -76,7 +76,7 @@ ExternalProject_Add(native-image DEPENDS mvn SOURCE_DIR ${PYPOWSYBL_JAVA_BIN_DIR} DOWNLOAD_COMMAND "" - PATCH_COMMAND $ENV{JAVA_HOME}/bin/native-image ${NATIVE_IMAGE_BUILD_OPTIONS} -march=compatibility --class-path ${PYPOWSYBL_JAVA_SRC_DIR}/target/pypowsybl-java.jar${EXTRA_JARS} --no-fallback --shared --gc=${NATIVE_IMAGE_GC} -H:Name=pypowsybl-java -H:CLibraryPath=${CMAKE_CURRENT_SOURCE_DIR}/src + PATCH_COMMAND $ENV{JAVA_HOME}/bin/native-image ${NATIVE_IMAGE_BUILD_OPTIONS} --class-path ${PYPOWSYBL_JAVA_SRC_DIR}/target/pypowsybl-java.jar${EXTRA_JARS} -march=compatibility --no-fallback --shared --gc=${NATIVE_IMAGE_GC} -H:Name=pypowsybl-java -H:CLibraryPath=${CMAKE_CURRENT_SOURCE_DIR}/src CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${PYPOWSYBL_JAVA_BIN_DIR}/${PYPOWSYBL_JAVA_OLD_LIB} ${PYPOWSYBL_JAVA_BIN_DIR}/${PYPOWSYBL_JAVA_LIB} ${NATIVE_IMAGE_INSTALL_EXTRA_COMMAND}