-
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.
- Loading branch information
1 parent
89ac61d
commit 28818f7
Showing
2 changed files
with
57 additions
and
22 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
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 |
---|---|---|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -107,6 +106,20 @@ 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: 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-${{ needs.build.outputs.khiops-package-version }}-setup.exe |