Skip to content

Instantly share code, notes, and snippets.

@d-j-kendall
Created November 30, 2020 22:39
Show Gist options
  • Save d-j-kendall/87b992862e8517759450e29b14e830cf to your computer and use it in GitHub Desktop.
Save d-j-kendall/87b992862e8517759450e29b14e830cf to your computer and use it in GitHub Desktop.
Example of PyInstaller NSIS AWS Build Pipeline (Powershell Windows Server 2019)
version: 0.2
phases:
install:
runtime-versions:
python: 3.7.6
commands:
# Downloads NSIS packager from our S3 bucket
- curl https://cc-build-dependencies-repo.s3.amazonaws.com/nsis-3.06.1-setup.exe -O $env:CODEBUILD_SRC_DIR\nsis-3.06.1-setup.exe
# Silently installs NSIS software for All Users on CodeBuild
- Start-Process -FilePath "$Env:CODEBUILD_SRC_DIR\nsis-3.06.1-setup.exe" -ArgumentList "/S", "/D=C:\Program Files (x86)\NSIS" -NoNewWindow -Wait
# Display Python Version in build logs
- python --version
# Installs all required packages for Python and PyInstaller
- pip install -r requirements-win.txt
- echo "Finished Installing NSIS and Python Requirements"
finally:
- echo "End Install Phase" "Begin Pre-Build Phase"
build:
commands:
# Run PyInstaller to build binaries
- Start-Process -FilePath "$Env:CODEBUILD_SRC_DIR\build.bat" -NoNewWindow -Wait
- echo "Finished PyInstaller Compilation"
finally:
- echo "End Build Phase" "Begin Post-Build Phase"
post_build:
commands:
- echo "Finished build process"
#reports:
#report-name-or-arn:
#files:
# - location
# - location
#base-directory: location
#discard-paths: yes
#file-format: JunitXml | CucumberJson
artifacts:
files:
- 'NSIS\test_bench_viewer_installer.exe'
name: tb_viewer-(Get-Date -Format "yyyyMMdd-HHmmss").exe
#discard-paths: yes
base-directory: $Env:CODEBUILD_SRC_DIR
#cache:
#paths:
# - paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment