7 build nsis khiops nocode installer in the ci #118
Workflow file for this run
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
--- | |
name: Create RPM package | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: ['**CMakeLists.txt', '**.cmake'] | |
jobs: | |
build-rpm-package: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [rocky8, rocky9] | |
container: | |
image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: set environment variables | |
run: | | |
source /etc/os-release | |
echo "ID=$ID" >> "$GITHUB_ENV" | |
VERSION_CODENAME=$(echo $PLATFORM_ID | cut -d":" -f2) | |
echo "VERSION_CODENAME=$VERSION_CODENAME" >> "$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 | |
- 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 | |
- name: Build package with CPack | |
run: cd build/linux-gcc-release && cpack -G RPM | |
- name: Rename packages with codename | |
run: | | |
source /etc/os-release | |
ARCH=$(arch) | |
cd build/linux-gcc-release/packages | |
for filename in *.rpm | |
do | |
mv -v $filename ${filename%.${ARCH}*}.${{ env.VERSION_CODENAME }}.${ARCH}.rpm | |
done | |
- name: Upload the packages as artifacts | |
uses: actions/[email protected] | |
with: | |
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }} | |
path: build/linux-gcc-release/packages/*.rpm | |
if-no-files-found: error | |
# Test packages on a brand new runner to check: | |
# - the installation process (including dependencies installation) | |
# - that executable works (run with -v) | |
# - that it executes a small test | |
test-rpm-package: | |
needs: build-rpm-package | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
rocky_version: [8, 9] | |
container: | |
image: rockylinux:${{ matrix.rocky_version }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
source /etc/os-release | |
echo "ID=$ID" >> "$GITHUB_ENV" | |
VERSION=$(echo $PLATFORM_ID | cut -d":" -f2) | |
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.ID }}-${{ env.VERSION }} | |
path: artifacts | |
- run: yum update -y | |
- name: Install Khiops core | |
run: | | |
yum install -y ./artifacts/khiops-core* | |
- name: Install Khiops Desktop (with java) | |
run: | | |
yum install -y ./artifacts/khiops-* | |
- name: Test Khiops installation | |
uses: ./.github/actions/test-khiops-install | |
test-kni-rpm: | |
needs: build-rpm-package | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [rocky8, rocky9] | |
container: | |
image: ghcr.io/khiopsml/khiops/khiopsdev-${{ matrix.os }}:latest | |
steps: | |
- name: Put OS info on the environment | |
run: | | |
source /etc/os-release | |
echo "ID=$ID" >> "$GITHUB_ENV" | |
VERSION=$(echo $PLATFORM_ID | cut -d":" -f2) | |
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ env.ID }}-${{ env.VERSION }} | |
path: artifacts | |
- name: Install KNI package | |
run: | | |
yum update -y | |
yum install -y ./artifacts/kni* | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: .github | |
- name: Test KNI package installation | |
uses: ./.github/actions/test-kni |