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

7 build nsis khiops nocode installer in the ci #74

Merged
merged 11 commits into from
Nov 23, 2023

Conversation

folmos-at-orange
Copy link
Member

This PR implements the NSIS installer creation with Github workflow. The workflow is set to be executed manually at the moment and can generate an installer from any branch or tag.

I also added two minor fixes:

  • The khiops JAR generated with CMake did not include properly images and icons
    • This made make minor changes within src (@marcboulle could check those)
  • Minor improvements for the unit test workflow.

Also @marcboulle if you could test the installer generated (https://github.com/KhiopsML/khiops/suites/15487352576/artifacts/884460194)

@folmos-at-orange folmos-at-orange linked an issue Aug 25, 2023 that may be closed by this pull request
Copy link
Collaborator

@marcboulle marcboulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remarques sur le test de l'installeur:

  • j'ai downloadé un fichier zip (khiops-installer.zip), et non un exe d'installeur
  • une fois dézippé, j'ai obtenu un exe au nom tres "technique": khiops-10.1.5-SNAPSHOT-c184f8b-setup.exe, avec ensuite des messages d'installation bases sur ce nom (pas vraiment user friendly)
  • lors de l'installation, j'ai eu "editeur inconnu": l'exe ne semble pas signe
  • le message concernant l'installation de MPI donne une version tres detaillee de la version

Remarques sur l'installation:

  • j'ai un fichier LICENCE (et non LICENCE.txt): on ne peut inspecter son contenu par un simple clic sur le fichier
  • disparition des fichiers et repertoires suivants:
    • README.txt
    • install.txt
    • whatsnewV10.1.txt
    • doc
    • samples

Remarques sur l'executable:

  • le panneau d'aide (Help/Documentation), pour Khiops et Khiops coclustering référence toujours la doc et les samples

Remarque sur la procédure d'installation

  • le README.md ne semble pas suffisant pour reproduire l'installation: l'objectif est que n'importe qui soit autonome pour pouvoir maintenir l'installeur, en maintenance corrective ou évolutives
    • prérequis: l'outil NSIS doit etre installe
    • ou se trouve les installeurs prerequis (java, MPI, visu): "somewhere in your system"???
      • poser les installeurs java et MPI sur un file system partage?
      • référencer les repos des outils de visualisation?
    • comment gerer la signature de l'installeur (a automatiser a terme)
    • comment gerer efficacement le cycle de developpement/test de l'installeur sur sa machine locale, avant de passer via un docker pour le CI/CD?

@folmos-at-orange
Copy link
Member Author

folmos-at-orange commented Aug 28, 2023

Thanks for the feedback @marcboulle below my answers.

Remarques sur le test de l'installeur:

  • j'ai downloadé un fichier zip (khiops-installer.zip), et non un exe d'installeur

This is normal as you downloaded an "artifact". When we will orchestrate the CICD process to make a release there will be no zip file. This was just to test.

  • une fois dézippé, j'ai obtenu un exe au nom tres "technique": khiops-10.1.5-SNAPSHOT-c184f8b-setup.exe, avec ensuite des messages d'installation bases sur ce nom (pas vraiment user friendly)

This is done on purpose. When we release a true version there will be no SNAPSHOT-hash suffix. This allow us create an installer in any branch without tagging for testing purposes.

  • lors de l'installation, j'ai eu "editeur inconnu": l'exe ne semble pas signe

Yes, we still don't have signatures in the CICD.

  • le message concernant l'installation de MPI donne une version tres detaillee de la version

Ok, I will simplify the version.
*In the end, the MPI version in the system is complex, I just left it as it is (implementing a string routine to extract the major seems complicated in NSIS)

Remarques sur l'installation:

  • j'ai un fichier LICENCE (et non LICENCE.txt): on ne peut inspecter son contenu par un simple clic sur le fichier

Ok, I will fix it
Done

  • disparition des fichiers et repertoires suivants:
  • README.txt

Ok, I will fix it.
Done

  • install.txt

This is very redundant with the contents of the web page. And if the user already installed it why he would care about install. I think just point to the website is enough. People rarely go see the documentation in the folder.

  • whatsnewV10.1.txt

Ok, I will add it
Done

  • doc
    The documentation will be in the website.
    Ok I will add it
  • samples

I was under the impression that we will ask the user to download the samples ?
Ok I will ad it
Done

Remarques sur l'executable:

  • le panneau d'aide (Help/Documentation), pour Khiops et Khiops coclustering référence toujours la doc et les samples

Ok, I will fix it, but I need an answer for the samples.

Remarque sur la procédure d'installation

  • le README.md ne semble pas suffisant pour reproduire l'installation: l'objectif est que n'importe qui soit autonome pour pouvoir maintenir l'installeur, en maintenance corrective ou évolutives

    • prérequis: l'outil NSIS doit etre installe

    • ou se trouve les installeurs prerequis (java, MPI, visu): "somewhere in your system"???

      • poser les installeurs java et MPI sur un file system partage?
      • référencer les repos des outils de visualisation?
    • comment gerer la signature de l'installeur (a automatiser a terme)

    • comment gerer efficacement le cycle de developpement/test de l'installeur sur sa machine locale, avant de passer via un docker pour le CI/CD?

Ok I will detail better the procedure.

Copy link
Contributor

@bruno-at-orange bruno-at-orange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few things to update, and things to discuss

CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
packaging/dockerfiles/windows/nsis-requirements/Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLSample is a lib not a binary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will fix it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, but I find useful to have the parallel-samples target. It helped me to find the source of problems of MPI in Mac. I would keep the new target.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is PLTest for this...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the test job, it would be good to run Standard/Adult like it is done on Linux Cf. test-khiops action

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will add it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, we should discuss this, SNAPSHOT is a maven/java thing (as far as I know). Here this is not the version of khiops but the name of the installer. It is a big difference and we should discuss it : what about linux packages ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Member Author

@folmos-at-orange folmos-at-orange Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed SNAPSHOT to preview. The preview particle appears when there is no tag or when the a tag is not coherent with the version in the sources.

@marcboulle
Copy link
Collaborator

marcboulle commented Aug 30, 2023

Je viens de voir Nicolas.
Comme je te l'ai dit, Nicolas a spécialisé un installeur pour Patatext, qui gère spécifique les installation "for all users" ou "just for me" explicitement: On pourra voir ça pour la V11.

Pour la V10, les répertoire suivants peuvent être traités pour être au plus proche du comportement actuel (suite à discussion avec Nicolas), en évitant d'avoir des des répertoires en écritures dans ProgramFiles:

  • doc
    • continuer à l'installer, comme actuellement
    • ce n'est pas grave si c'est redondant avec la doc sur le site web
    • ce la permet d'y accéder même sans connexion internet (en train...)
    • c'est plus "green" si on y accède souvent, plutôt que de se connecter à un site distant
    • c'est forcément en phase avec la version installée, alors que sur un site web, il faut trouver la doc de la bonne version, et cela peut dépendre de l'ergonomie su site...
  • lastrun: on peut le mettre dans %userprofile%
    • quel sous-répertoire? à spécifier (khiops_lastrun?)
  • samples
    • en mode user, on peut le mettre dans %userprofile% (sous-répertoire khiops_data?)
    • en mode administrateur, le mettre dans %allusersprofile% (ProgramData) (sous-répertoire khiops_data?)
      • la variable %public% (c:\users\Public) semble meilleure, mais bien que documentée sur de nombreux forums, elle ne semble pas "officiellement documentée par Microsoft
      • utiliser %public% si défini, et sinon %allusersprofile%?
    • ne pas oublier d'utiliser ce répertoire comme répertorie de lancement pour les icones de lancement des outils Khiops et Khiops et KhiopsCoclustering
  • vérifier quels pluggins de nsis doivent encore être installés
  • tester l'installation en mode admin ou user, sur e-buro et yourdev

Pour la V11, on pourra revoir ça si nécessaire.

@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch 5 times, most recently from 67011c3 to 0bba5ba Compare August 30, 2023 17:00
@marcboulle
Copy link
Collaborator

Il manque un endroit pour stocker les docs de l'outil:

  • guides et tutoriel
    • au format docx, pptx et pdf tel quel pour la V10
    • autre format pour la V11: à étudier plus tard
  • README.txt
  • install.txt
    • à dispatcher vers le readme ou le whatsnew pour la V11?
    • on le garde tel quel pour la V10
  • whatsnewV.txt

Une solution possible (à spécifier)

  • prevoir un espace de stockage dans le repôt, en format LFS
  • bien adapté, car ces docs sont naturellement synchronises avec les versions de l'outil

@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch 5 times, most recently from 78435d7 to de414d0 Compare September 1, 2023 07:08
@bruno-at-orange
Copy link
Contributor

Il manque un endroit pour stocker les docs de l'outil:

* guides et tutoriel
  
  * au format docx, pptx et pdf tel quel pour la V10
  * autre format pour la V11: à étudier plus tard

* README.txt

* install.txt
  
  * à dispatcher vers le readme ou le whatsnew pour la V11?
  * on le garde tel quel pour la V10

* whatsnewV.txt

Une solution possible (à spécifier)

* prevoir un espace de stockage dans le repôt, en format LFS

* bien adapté, car ces docs sont naturellement synchronises avec les versions de l'outil

Les fichiers whatsnewV10.0.txt et README.txt sont utilisés dans les packages Linux, ils sont versionnés et sont dans le repertoire /packaging/common/khiops/ (Cf. packaging/install.cmake ligne 101)

include(GoogleTest)
enable_testing()

# Add testing targets
Copy link
Contributor

@bruno-at-orange bruno-at-orange Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Add testing projects" is more accurate

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok i'll put Add testing sub-projects.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@bruno-at-orange bruno-at-orange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just few things

@@ -7,31 +7,19 @@ add_subdirectory(genere)
add_subdirectory(basetest)
add_subdirectory(generetest)

# build norm.jar
# Add norm.jar target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne suis pas d'accord... l'idée ici est bien de construire un jar. ça definit effectivement une nouvelle cible, mais c'est pas vraiment ce qui nous intéresse. En l'occurence la cible n'est pas norm.jar mais norm_jar

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every target has an associated "built object". CMake is oriented to targets and what we do in the CMakeLists.txt files is defining and configuring targets.

I can expand the comment : "Add norm_jar target (which builds norm.jar)".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non je ne suis pas d'accord. Le commentaire initial est plus clair pour tout le monde

Copy link
Member Author

@folmos-at-orange folmos-at-orange Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a potential newcomer (as I was a few months ago) it is more informative to say what CMake usually does in a CMakeLists.txt scripts: to setup targets. I have not found any "build" methods in CMakeLists.txt directives, only add_* and set_*

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to Add norm.jar (CMake names the target norm_jar)

@folmos-at-orange
Copy link
Member Author

Also fixes #28

@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch from de414d0 to 7b57687 Compare September 15, 2023 14:33
@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch 5 times, most recently from f7a0542 to 0d60b59 Compare September 28, 2023 15:05
@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch 2 times, most recently from 0ad5ac0 to bbb89b6 Compare October 31, 2023 14:02
@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch from bbb89b6 to 265686b Compare November 10, 2023 18:13
Copy link
Collaborator

@marcboulle marcboulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concernant le suffixe preview, on peut le laisser pour l'instant dans la version windows, mais créer une issue qui:

  • pose la question de l'intérêt de ce suffixe
  • si ok: homégénisation sur toutes les platformes (linux...)
  • si ko: on revient à avant

L'alternative (supression ou commentaire maintenant, puis issue) est plus coûteuse à mettre en place, et ne changera rien au statut après discussion de l'issue.

- Add path filtering so it only executs when relevant code is changed
- Use temporarily phoenix-actions/test-reporting until dorny/test-report
  fix a bug showing the dashboard in other workflows
- Improve readability of test steps
A pull_request event is better suited than push event for our purposes.
A push event is triggered not only when pushing but when merging via the
GH web interface.
@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch from 265686b to b9937a1 Compare November 21, 2023 12:53
The khiops.jar contains only icons/images. They were in the "empty"
namespace but the CMake add_jar directive does not work well when the
namespace is empty.  The solution is to always use a namespace for the jar images.

Additionally the add_jar code was refactored to add_khiops_jar function
in the top CMakeLists.txt
The position independent code settings are since CMake 3.14 handled with
the POSITION_INDEPENDENT_CODE target property. This automatically sets
the proper linker flags to achieve this objective for all supported
toolchains.
@folmos-at-orange
Copy link
Member Author

Concernant le suffixe preview, on peut le laisser pour l'instant dans la version windows, mais créer une issue qui:

  • pose la question de l'intérêt de ce suffixe
  • si ok: homégénisation sur toutes les platformes (linux...)
  • si ko: on revient à avant

L'alternative (supression ou commentaire maintenant, puis issue) est plus coûteuse à mettre en place, et ne changera rien au statut après discussion de l'issue.

I created issue #100 for this subject.

@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch 4 times, most recently from 4c8291a to 858e73b Compare November 22, 2023 09:35
- Add and readapt the NSIS scripts
  - All bundled executables are now passed as parameters within the
    makensis call
- Add a workflow that build the NSIS packages in the GH CI
- Update samples location in documentation
- Update readme and whatsnew files
@folmos-at-orange folmos-at-orange force-pushed the 7-build-nsis-khiops-nocode-installer-in-the-ci branch from 858e73b to 8b25cdc Compare November 22, 2023 09:47
@marcboulle marcboulle self-requested a review November 23, 2023 09:51
@folmos-at-orange folmos-at-orange merged commit c3c41e3 into dev Nov 23, 2023
40 checks passed
@folmos-at-orange folmos-at-orange deleted the 7-build-nsis-khiops-nocode-installer-in-the-ci branch November 23, 2023 10:05
@folmos-at-orange folmos-at-orange restored the 7-build-nsis-khiops-nocode-installer-in-the-ci branch November 23, 2023 10:05
@folmos-at-orange folmos-at-orange deleted the 7-build-nsis-khiops-nocode-installer-in-the-ci branch November 23, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants