Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
folmos-at-orange committed Feb 20, 2024
1 parent 89ac61d commit 1167772
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 35 deletions.
47 changes: 36 additions & 11 deletions .github/workflows/pack-debian.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
name: Create Debian package
name: Debian/Ubuntu Package
on:
workflow_dispatch:
pull_request:
paths: ['**CMakeLists.txt', '**.cmake']
paths:
- '**CMakeLists.txt'
- '**.cmake'
- .github/workflows/pack-debian.yml
push:
tags: [v*]
jobs:
build-deb-package:
build:
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -44,14 +49,14 @@ jobs:
- name: Upload the packages as artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}-deb
path: build/linux-gcc-release/packages/*.deb
# 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-deb-package:
needs: build-deb-package
test:
needs: build
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -73,7 +78,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}-deb
path: artifacts
- name: Install Khiops core
run: |
Expand All @@ -95,8 +100,8 @@ jobs:
khiops_coclustering -v
- name: Test Khiops installation
uses: ./.github/actions/test-khiops-install
test-kni-deb:
needs: build-deb-package
test-kni:
needs: build
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -110,13 +115,13 @@ jobs:
steps:
- name: Put OS info on the environment
run: |
source /etc/os-release
source /etc/os-release
echo "ID=$ID" >> "$GITHUB_ENV"
echo "VERSION_CODENAME=$VERSION_CODENAME" >> "$GITHUB_ENV"
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}-deb
path: artifacts
- name: Install KNI Package
run: |
Expand All @@ -129,3 +134,23 @@ jobs:
sparse-checkout: .github
- name: Test KNI package
uses: ./.github/actions/test-kni
release:
if: github.ref_type == 'tag'
permissions:
contents: write
strategy:
matrix:
os: [debian10, ubuntu22.04, ubuntu20.04]
runs-on: ubuntu-latest
steps:
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: '*-deb'
- name: Upload packages to the release
uses: ncipollo/[email protected]
with:
allowUpdates: true
updateOnlyUnreleased: true
makeLatest: false
artifacts: '*.deb'
45 changes: 31 additions & 14 deletions .github/workflows/pack-nsis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: Build NSIS Windows installer
name: Windows Installer
on:
workflow_dispatch:
pull_request:
paths:
- '**CMakeLists.txt'
- packaging/windows/nsis/*.nsh
- packaging/windows/nsis/*.nsi
- .github/workflows/pack-nsis.yml
push:
tags: [v*]
jobs:
build-nsis-installer:
build:
outputs:
khiops-package-version: ${{ steps.get-version.outputs.khiops-package-version }}
name: Build NSIS Windows installer
runs-on: windows-latest
steps:
- name: Obtain checkout ref
Expand All @@ -30,7 +30,7 @@ jobs:
echo "CHECKOUT_REF=$CHECKOUT_REF" >> $GITHUB_ENV
echo "Checkout ref: $CHECKOUT_REF"
- name: Checkout sources
uses: actions/checkout@v4.1.0
uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
- name: Put the package version on the environment and output
Expand All @@ -44,7 +44,7 @@ jobs:
echo "KHIOPS_PACKAGE_REDUCED_VERSION=$KHIOPS_PACKAGE_REDUCED_VERSION" >> "$GITHUB_ENV"
echo "khiops-package-version=$KHIOPS_PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Download Windows install assets
uses: robinraju/release-downloader@v1.8
uses: robinraju/release-downloader@v1.9
with:
repository: khiopsml/khiops-win-install-assets
latest: true
Expand Down Expand Up @@ -78,27 +78,26 @@ jobs:
/DKHIOPS_DOC_DIR=..\..\..\assets\doc `
khiops.nsi
- name: Upload installer as an artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3
with:
name: khiops-installer
name: khiops-installer-${{ env.KHIOPS_PACKAGE_VERSION }}
path: ./packaging/windows/nsis/khiops-${{ env.KHIOPS_PACKAGE_VERSION }}-setup.exe
test-nsis-installer:
name: Test NSIS Windows installer
needs: build-nsis-installer
test:
needs: build
runs-on: windows-2019
steps:
- name: Download NSIS installer artifact
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v3
with:
name: khiops-installer
name: khiops-installer-${{ needs.build.outputs.khiops-package-version }}
- name: Install Khiops
shell: pwsh
run: |
# Execute the installer
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Start-Process `
-FilePath .\khiops-${{ needs.build-nsis-installer.outputs.khiops-package-version }}-setup.exe `
-FilePath .\khiops-${{ needs.build.outputs.khiops-package-version }}-setup.exe `
-ArgumentList '/S' `
-Wait
# Add Khiops and MPI to the path
Expand All @@ -107,6 +106,24 @@ jobs:
echo ${Env:GITHUB_ENV}
type ${Env:GITHUB_ENV}
- name: Checkout the khiops sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Test the installation
uses: ./.github/actions/test-khiops-install
release:
if: github.ref_type == 'tag'
needs: [build, test]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download NSIS installer artifact
uses: actions/download-artifact@v3
with:
name: khiops-installer-${{ needs.build.outputs.khiops-package-version }}
- name: Upload NSIS installer to the release
uses: ncipollo/[email protected]
with:
allowUpdates: true
updateOnlyUnreleased: true
makeLatest: false
artifacts: khiops-${{ needs.build.outputs.khiops-package-version }}-setup.exe
40 changes: 30 additions & 10 deletions .github/workflows/pack-rpm.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Create RPM package
name: RockyLinux Package
on:
workflow_dispatch:
pull_request:
paths: ['**CMakeLists.txt', '**.cmake']
paths: ['**CMakeLists.txt', '**.cmake', .github/workflows/pack-rpm.yml]
jobs:
build-rpm-package:
build:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: set environment variables
- name: Put OS info on the environment
run: |
source /etc/os-release
echo "ID=$ID" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -48,17 +48,17 @@ jobs:
mv -v $filename ${filename%.${ARCH}*}.${{ env.VERSION_CODENAME }}.${ARCH}.rpm
done
- name: Upload the packages as artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v3
with:
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}
name: ${{ env.ID }}-${{ env.VERSION_CODENAME }}-rpm
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
test:
needs: build
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -92,8 +92,8 @@ jobs:
yum install -y ./artifacts/khiops-*
- name: Test Khiops installation
uses: ./.github/actions/test-khiops-install
test-kni-rpm:
needs: build-rpm-package
test-kni:
needs: build
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -126,3 +126,23 @@ jobs:
sparse-checkout: .github
- name: Test KNI package installation
uses: ./.github/actions/test-kni
release:
if: github.ref_type == 'tag'
permissions:
contents: write
strategy:
matrix:
os: [debian10, ubuntu22.04, ubuntu20.04]
runs-on: ubuntu-latest
steps:
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: '*-rpm'
- name: Upload packages to the release
uses: ncipollo/[email protected]
with:
allowUpdates: true
updateOnlyUnreleased: true
makeLatest: false
artifacts: '*.rpm'

0 comments on commit 1167772

Please sign in to comment.