-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build new docker images with MPICH and OpenMPI. Generates DEB and RPM packages for multiple mpi implementations (mpich and openMPI) - Add mpi implemntation discovering in cmake (not working in conda) - Add a suffix to package names corresponding to the mpi implementation (as it advised in fedora packaging guidline) - Add mpi implementation name in packages names - packages khiops-core-openmpi with a version >> 10.2.1 replace khiops-core-10.2.1 without trouble with apt and dnf - Add mpich vs openMPI option in debian and rpm workflows (openMPI is the default) - Use ctest to run unit tests (issue #23) Cherry pick LearningTestTool and test hierarchy from dev Handle binary renaming in LearningTestTool - Switch to openMPI in kht_test and standard tests - The kht_test script handles the new naming of the parallel binaries: MODL_openmpi or MODL_mpich or MODL (the last one has priority) Conda: - Fix mpich build - Remove the use of the obsolete cmake option MPI_SUFFIX in conda build Fix DEB and RPM version renaming in pack-debian and pack-rpm cherry pick from dev-v10
- Loading branch information
1 parent
c45cf9a
commit 21fb91a
Showing
31 changed files
with
337 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,26 @@ inputs: | |
runs: | ||
using: composite | ||
steps: | ||
- name: Setup MPI | ||
- name: Setup MPI (windows) | ||
if: runner.os == 'Windows' | ||
uses: mpi4py/setup-mpi@v1 | ||
- name: Setup MPI (macOS) | ||
if: runner.os == 'macOS' | ||
shell: bash | ||
run: | | ||
brew install mpich | ||
- name: Setup MPI (Linux) | ||
if: runner.os == 'Linux' | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install openmpi-bin libopenmpi-dev | ||
sudo update-alternatives --set mpi /usr/bin/mpicc.openmpi | ||
sudo update-alternatives --set mpirun /usr/bin/mpirun.openmpi | ||
- name: Setup Ninja | ||
uses: ashutoshvarma/[email protected] | ||
- name: Load Visual C++ Environment Variables (Windows only) | ||
if: ${{ runner.os == 'Windows' }} | ||
if: runner.os == 'Windows' | ||
shell: cmd | ||
run: | | ||
call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,14 @@ | |
name: DEB Packages | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
mpi_implementation: | ||
description: mpi implementation | ||
type: choice | ||
default: openmpi | ||
options: | ||
- mpich | ||
- openmpi | ||
pull_request: | ||
paths: | ||
- '**CMakeLists.txt' | ||
|
@@ -33,9 +41,13 @@ jobs: | |
source /etc/os-release | ||
echo "ID=$ID" >> "$GITHUB_ENV" | ||
echo "VERSION_CODENAME=$VERSION_CODENAME" >> "$GITHUB_ENV" | ||
echo "MPI_IMPLEMENTATION=${{ inputs.mpi_implementation || 'openmpi' }}" >> "$GITHUB_ENV" | ||
- name: Configure CMake | ||
run: | | ||
cmake --preset linux-gcc-release -DBUILD_JARS=ON -DTESTING=OFF | ||
update-alternatives --set mpi /usr/bin/mpicc.$MPI_IMPLEMENTATION | ||
update-alternatives --set mpirun /usr/bin/mpirun.$MPI_IMPLEMENTATION | ||
cmake --preset linux-gcc-release -DBUILD_JARS=ON | ||
- name: Build Khiops binaries | ||
run: | | ||
cmake --build --preset linux-gcc-release --parallel \ | ||
|
@@ -82,31 +94,33 @@ jobs: | |
source /etc/os-release | ||
echo "ID=$ID" >> "$GITHUB_ENV" | ||
echo "VERSION_CODENAME=$VERSION_CODENAME" >> "$GITHUB_ENV" | ||
echo "MPI_IMPLEMENTATION=${{ inputs.mpi_implementation || 'openmpi' }}" >> "$GITHUB_ENV" | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: deb-${{ env.ID }}-${{ env.VERSION_CODENAME }} | ||
path: artifacts | ||
- name: Install Khiops core | ||
run: | | ||
export DEBIAN_FRONTEND="noninteractive" | ||
apt-get update | ||
dpkg -i ./artifacts/khiops-core* || true | ||
apt-get -f install -y | ||
- name: Check Khiops core installation | ||
continue-on-error: ${{ matrix.os == 'debian:11' }} | ||
run: | | ||
khiops-env --env | ||
khiops -v | ||
khiops_coclustering -v | ||
khiops -s | ||
khiops_coclustering -s | ||
- name: Install Khiops Desktop (with java) | ||
run: | | ||
dpkg -i ./khiops_* || true | ||
dpkg -i ./artifacts//khiops_* || true | ||
apt-get -f install -y | ||
- name: Check Khiops installation | ||
continue-on-error: ${{ matrix.os == 'debian:11' }} | ||
run: | | ||
khiops -v | ||
khiops_coclustering -v | ||
khiops-env --env | ||
khiops -s | ||
khiops_coclustering -s | ||
- name: Test Khiops installation | ||
continue-on-error: ${{ matrix.os == 'debian:11' }} | ||
uses: ./.github/actions/test-khiops-install | ||
|
@@ -164,12 +178,18 @@ jobs: | |
merge-multiple: true | ||
- name: Rename packages with tag version | ||
run: | | ||
SOURCE_VERSION=$(./scripts/khiops-version) | ||
for PKG_FILE in *.deb | ||
do | ||
NEW_PKG_FILE=$(echo $PKG_FILE | sed "s/_${SOURCE_VERSION}-/_${{ github.ref_name }}-/") | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
done | ||
# Renames the packge only if the source version differs from the tag | ||
SOURCE_VERSION=$(./scripts/khiops-version | sed 's/-/_/') | ||
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/-/_/') | ||
for PKG_FILE in *.deb | ||
do | ||
NEW_PKG_FILE=$(echo $PKG_FILE | sed "s/_${SOURCE_VERSION}-/_${TAG_VERSION}-/") | ||
if [[ "$PKG_FILE" != "$NEW_PKG_FILE" ]] | ||
then | ||
echo "Renaming '$PKG_FILE' to '$NEW_PKG_FILE'" | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
fi | ||
done | ||
- name: Upload packages to the release | ||
uses: ncipollo/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,10 +158,16 @@ jobs: | |
name: KNI | ||
- name: Rename packages with tag version | ||
run: | | ||
# Build the package file names | ||
SOURCE_VERSION="${{ needs.build.outputs.khiops-version }}" | ||
PKG_FILE=$(ls *-setup.exe) | ||
NEW_PKG_FILE=$(echo $PKG_FILE | sed "s/-${SOURCE_VERSION}-/-${{ github.ref_name }}-/") | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
# Rename to the tag version only if it is not coherent with the source version | ||
if [[ "$PKG_FILE" != "$NEW_PKG_FILE" ]] | ||
then | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
fi | ||
- name: Upload NSIS installer and KNI to the release | ||
uses: ncipollo/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
name: RPM Packages | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
mpi_implementation: | ||
description: mpi implementation | ||
type: choice | ||
default: openmpi | ||
options: [mpich, openmpi] | ||
pull_request: | ||
paths: ['**CMakeLists.txt', '**.cmake', .github/workflows/pack-rpm.yml] | ||
push: | ||
|
@@ -32,17 +38,17 @@ jobs: | |
echo "ID=$ID" >> "$GITHUB_ENV" | ||
VERSION_CODENAME=$(echo $PLATFORM_ID | cut -d":" -f2) | ||
echo "VERSION_CODENAME=$VERSION_CODENAME" >> "$GITHUB_ENV" | ||
echo "MPI_IMPLEMENTATION=${{ inputs.mpi_implementation || 'openmpi' }}" >> "$GITHUB_ENV" | ||
- name: Configure CMake | ||
run: | | ||
source /etc/profile.d/modules.sh | ||
module load mpi/mpich-x86_64 | ||
echo "MPI_SUFFIX=$MPI_SUFFIX" >> "$GITHUB_ENV" | ||
cmake --preset linux-gcc-release -DBUILD_JARS=ON -DTESTING=OFF | ||
module unload mpi | ||
module load mpi/${MPI_IMPLEMENTATION}-x86_64 | ||
cmake --preset linux-gcc-release -DBUILD_JARS=ON | ||
- name: Build Khiops binaries | ||
run: | | ||
cmake --build --preset linux-gcc-release --parallel \ | ||
--target MODL${{ env.MPI_SUFFIX }} MODL_Coclustering${{ env.MPI_SUFFIX }} \ | ||
KhiopsNativeInterface norm_jar khiops_jar | ||
--target MODL MODL_Coclustering KhiopsNativeInterface norm_jar khiops_jar | ||
- name: Build package with CPack | ||
run: cd build/linux-gcc-release && cpack -G RPM | ||
- name: Rename packages with codename | ||
|
@@ -88,6 +94,7 @@ jobs: | |
echo "ID=$ID" >> "$GITHUB_ENV" | ||
VERSION=$(echo $PLATFORM_ID | cut -d":" -f2) | ||
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | ||
echo "MPI_IMPLEMENTATION=${{ inputs.mpi_implementation || 'openmpi' }}" >> "$GITHUB_ENV" | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -97,9 +104,19 @@ jobs: | |
- name: Install Khiops core | ||
run: | | ||
yum install -y ./artifacts/khiops-core* | ||
- name: Check Khiops core installation | ||
run: | | ||
khiops-env --env | ||
khiops -s | ||
khiops_coclustering -s | ||
- name: Install Khiops Desktop (with java) | ||
run: | | ||
yum install -y ./artifacts/khiops-* | ||
- name: Check Khiops installation | ||
run: | | ||
khiops-env --env | ||
khiops -s | ||
khiops_coclustering -s | ||
- name: Test Khiops installation | ||
uses: ./.github/actions/test-khiops-install | ||
test-kni: | ||
|
@@ -156,11 +173,17 @@ jobs: | |
merge-multiple: true | ||
- name: Rename packages with tag version | ||
run: | | ||
SOURCE_VERSION=$(./scripts/khiops-version) | ||
# Renames the packge only if the source version differs from the tag | ||
SOURCE_VERSION=$(./scripts/khiops-version | sed 's/-/_/') | ||
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/-/_/') | ||
for PKG_FILE in *.rpm | ||
do | ||
NEW_PKG_FILE=$(echo $PKG_FILE | sed "s/-${SOURCE_VERSION}-/-${{ github.ref_name }}-/") | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
NEW_PKG_FILE=$(echo $PKG_FILE | sed "s/-${SOURCE_VERSION}-/-${TAG_VERSION}-/") | ||
if [[ "$PKG_FILE" != "$NEW_PKG_FILE" ]] | ||
then | ||
echo "Renaming '$PKG_FILE' to '$NEW_PKG_FILE'" | ||
mv $PKG_FILE $NEW_PKG_FILE | ||
fi | ||
done | ||
- name: Upload packages to the release | ||
uses: ncipollo/[email protected] | ||
|
Oops, something went wrong.