Skip to content

Commit

Permalink
Merge pull request #3 from thewtex/build-pipeline
Browse files Browse the repository at this point in the history
Fix Azure packaging
  • Loading branch information
thewtex authored Apr 10, 2019
2 parents 8fa4a7e + fd07d56 commit c1ff48a
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 40 deletions.
171 changes: 132 additions & 39 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,135 @@
trigger:
- master

pool:
vmImage: 'Ubuntu-16.04'

steps:

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'

- script: |
git submodule init
git submodule update
displayName: 'Download Git submodules'

- script: |
python -m pip install -r server/requirements.txt
python -m pip install pyinstaller
displayName: 'Install Python build dependencies'

- script: |
npm install
npm run build:release
displayName: 'npm install and build'

- script: |
pyinstaller build/glance-vessels-onefile.spec
cp ./dist/glance-vessels ./dist/glance-vessels.linux.x86_64
displayName: 'Package'

- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Linux'
targetPath: './dist/glance-vessels.linux.x86_64'
jobs:

- job: 'Linux'
pool:
vmImage: 'Ubuntu-16.04'

steps:
- script: |
git submodule init
git submodule update
displayName: 'Download Git submodules'
- script: |
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-pip python3-venv
displayName: 'Install OS packages'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'

- script: |
python3 -m venv ./venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install --upgrade setuptools
./venv/bin/python -m pip install -r server/requirements.txt
./venv/bin/python -m pip install pyinstaller
displayName: 'Install Python build dependencies'
- script: |
npm install
npm run build:release
displayName: 'npm install and build'
- script: |
source ./venv/bin/activate
./venv/bin/pyinstaller build/glance-vessels-onefile.spec
cp ./dist/glance-vessels ./dist/glance-vessels.linux.x86_64
displayName: 'Package'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Linux'
targetPath: './dist/glance-vessels.linux.x86_64'

- job: 'macOS'
pool:
vmImage: 'macos-10.13'

steps:
- script: |
git submodule init
git submodule update
displayName: 'Download Git submodules'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.5'
architecture: 'x64'

- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'

- script: |
python3 -m venv ./venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install --upgrade setuptools
./venv/bin/python -m pip install -r server/requirements.txt
./venv/bin/python -m pip install pyinstaller
displayName: 'Install Python build dependencies'
- script: |
npm install
npm run build:release
displayName: 'npm install and build'
- script: |
source ./venv/bin/activate
./venv/bin/pyinstaller build/glance-vessels-onefile.spec
cp ./dist/glance-vessels ./dist/glance-vessels.macos.x86_64
displayName: 'Package'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'MacOS'
targetPath: './dist/glance-vessels.macos.x86_64'

- job: 'Windows'
pool:
vmImage: 'vs2017-win2016'

steps:
- script: |
git submodule init
git submodule update
displayName: 'Download Git submodules'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'

- script: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install -r server/requirements.txt
python -m pip install pyinstaller
python -m pip install pywin32
displayName: 'Install Python build dependencies'
- bash: |
npm install
npm run build:release
displayName: 'npm install and build'
- bash: |
pyinstaller build/glance-vessels-onefile.spec
cp ./dist/glance-vessels.exe ./dist/glance-vessels.windows.x86_64.exe
displayName: 'Package'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Windows'
targetPath: './dist/glance-vessels.windows.x86_64.exe'
2 changes: 1 addition & 1 deletion build/glance-vessels-onefile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ block_cipher = None
a = Analysis([os.path.join('..', entry_point)],
pathex=[repo_dir],
binaries=[],
datas=[(os.path.join('..', 'server', 'www'), 'www')],
datas=[('../server/www', 'www')],
hiddenimports=[],
hookspath=['./build/'],
runtime_hooks=[],
Expand Down

0 comments on commit c1ff48a

Please sign in to comment.