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 19, 2024
1 parent 89ac61d commit da47d7d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 22 deletions.
38 changes: 30 additions & 8 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 @@ -50,8 +55,8 @@ jobs:
# - 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 Down Expand Up @@ -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,7 +115,7 @@ 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
Expand All @@ -129,3 +134,20 @@ jobs:
sparse-checkout: .github
- name: Test KNI package
uses: ./.github/actions/test-kni
release:
needs: [build, test] # TODO: add kni
strategy:
matrix:
os: [debian10, ubuntu22.04, ubuntu20.04]
runs-on: ubuntu-latest
steps:
- name: Put OS info on the environment
run: |
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 }}

43 changes: 29 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,22 @@ 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: windows-2019
steps:
- name: DDD
run: touch khiops-setup.exe
#- 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 a release
uses: ncipollo/[email protected]
with:
allowUpdates: true
artifacts: khiops-setup.exe

0 comments on commit da47d7d

Please sign in to comment.