From d88b31a342156300a101800874657b0c7dc61970 Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:35:17 +0100 Subject: [PATCH 1/4] Path to container image must be lowercase GitHub workflow syntax does not provide a means of inlining string manipulations. Hence: - when needed in a job step, a step has been added for generating environment variable which lowercases the path to the repository - when needed in a job specification, the path has been reverted to its hard-coded lowercased version. --- .github/workflows/build-linux-pack-containers.yml | 4 +++- .github/workflows/pack-debian.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-linux-pack-containers.yml b/.github/workflows/build-linux-pack-containers.yml index fe7e9d0b8..36fb593d4 100644 --- a/.github/workflows/build-linux-pack-containers.yml +++ b/.github/workflows/build-linux-pack-containers.yml @@ -30,12 +30,14 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Downcase GitHub repository + run: echo "GH_REPOSITORY=${GITHUB_REPOSITORY,,}" >> "${GITHUB_ENV}" - name: Build the image and push it to the registry id: docker-build uses: docker/build-push-action@v2 with: file: ./packaging/dockerfiles/Dockerfile.${{ matrix.os }} - tags: ghcr.io/${{ github.repository }}/khiopsdev-${{ matrix.os }}:latest + tags: ghcr.io/${{ env.GH_REPOSITORY }}/khiopsdev-${{ matrix.os }}:latest push: true - name: Display the image digest run: echo ${{ steps.docker-build.outputs.digest }} diff --git a/.github/workflows/pack-debian.yml b/.github/workflows/pack-debian.yml index c5756cb36..aa71d7151 100644 --- a/.github/workflows/pack-debian.yml +++ b/.github/workflows/pack-debian.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [debian10, debian11, ubuntu22.04, ubuntu20.04] container: - image: ghcr.io/${{ github.repository }}/khiopsdev-${{ matrix.os }}:latest + image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest steps: - name: Checkout sources uses: actions/checkout@v3 @@ -106,7 +106,7 @@ jobs: matrix: os: [debian10, debian11, ubuntu22.04, ubuntu20.04] container: - image: ghcr.io/${{ github.repository }}/khiopsdev-${{ matrix.os }}:latest + image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest steps: - name: Put OS info on the environment run: | From a473f2fee17acf33faca3ba32ceced6b2922bad5 Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:55:29 +0100 Subject: [PATCH 2/4] Do not build Debian 11 package, as MPI support is broken --- .github/workflows/pack-debian.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pack-debian.yml b/.github/workflows/pack-debian.yml index aa71d7151..980f8ddaf 100644 --- a/.github/workflows/pack-debian.yml +++ b/.github/workflows/pack-debian.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [debian10, debian11, ubuntu22.04, ubuntu20.04] + os: [debian10, ubuntu22.04, ubuntu20.04] container: image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest steps: @@ -59,7 +59,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['debian:10', 'debian:11', 'ubuntu:22.04', 'ubuntu:20.04'] + os: ['debian:10', 'ubuntu:22.04', 'ubuntu:20.04'] container: image: ${{ matrix.os }} steps: @@ -104,7 +104,7 @@ jobs: strategy: fail-fast: false matrix: - os: [debian10, debian11, ubuntu22.04, ubuntu20.04] + os: [debian10, ubuntu22.04, ubuntu20.04] container: image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest steps: From 65705ed620c4c7032945c0b829152538a061e871 Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:05:58 +0100 Subject: [PATCH 3/4] Add Khiops JAR files to the Khiops desktop Linux packages. related_to #120 --- packaging/install.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packaging/install.cmake b/packaging/install.cmake index bf5983a20..f247e9425 100644 --- a/packaging/install.cmake +++ b/packaging/install.cmake @@ -31,8 +31,8 @@ install( install( FILES ${TMP_DIR}/kni.README.txt DESTINATION ${DOC_DIR} - RENAME README.txt - COMPONENT KNI) + COMPONENT KNI + RENAME README.txt) # Copy KNI c++ files to temporary directory before to add main functions configure_file(${PROJECT_SOURCE_DIR}/src/Learning/KNITransfer/KNIRecodeFile.cpp ${TMP_DIR}/KNIRecodeFile.c COPYONLY) @@ -115,3 +115,8 @@ install( ${PROJECT_SOURCE_DIR}/packaging/linux/common/khiops-coclustering.desktop DESTINATION usr/share/applications COMPONENT KHIOPS) + +install( + FILES ${CMAKE_BINARY_DIR}/jars/norm.jar ${CMAKE_BINARY_DIR}/jars/khiops.jar + DESTINATION usr/share/khiops + COMPONENT KHIOPS) From 586fc948c7999f4da4a3f9513d05c32dec9f58d3 Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:11:49 +0100 Subject: [PATCH 4/4] Exclude Unspecified component package from being built related_to #120 --- packaging/packaging.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/packaging.cmake b/packaging/packaging.cmake index 2ffa8830a..831e41dde 100644 --- a/packaging/packaging.cmake +++ b/packaging/packaging.cmake @@ -146,6 +146,9 @@ set(CPACK_RPM_KHIOPS_POST_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/packaging/l set(CPACK_RPM_KNI_POST_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/packaging/linux/redhat/kni.post") set(CPACK_RPM_KNI_POSTUN_INSTALL_SCRIPT_FILE "${PROJECT_SOURCE_DIR}/packaging/linux/redhat/kni.postun") +get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS) +list(REMOVE_ITEM CPACK_COMPONENTS_ALL "Unspecified") + include(CPack) # Check if all files are installed within a component. If not, these files will be in the package