Skip to content

Commit

Permalink
Build pipeline perf improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dpwatrous committed Aug 24, 2023
1 parent 917fd95 commit 9bbddcf
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 59 deletions.
27 changes: 1 addition & 26 deletions .vsts/common/setup-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,7 @@
set -e

pyroot="$AGENT_WORKFOLDER/.venv/batchexplorer"

if [ "$AGENT_OS" == "Windows_NT" ]; then
# Python is already installed via a pipeline task
conf_file="$pyroot/pip.ini"
else
conf_file="$pyroot/pip.conf"
pyenv_version=2.3.2
python_version=3.9.4

echo "Installing pyenv..."
export PYENV_ROOT="$AGENT_WORKFOLDER/.pyenv"
archive="$PYENV_ROOT/pyenv.tar.gz"
mkdir -p "$PYENV_ROOT"
curl -s -S -L "https://github.com/pyenv/pyenv/archive/v${pyenv_version}.tar.gz" > "$archive"
echo "f4347e6740e6cd47badc302491b105615a74fbf2 $archive" | shasum -c
tar xzf "$archive" -C "$PYENV_ROOT" --strip-components=1
export PATH="$PYENV_ROOT/bin:$PATH"
pyenv --version

echo "Installing Python $python_version..."
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $python_version
pyenv global "$python_version"
eval "$(pyenv init -)"
echo "##vso[task.prependpath]$PYENV_ROOT/bin"
echo "##vso[task.prependpath]$PYENV_ROOT/shims"
fi
conf_file="$pyroot/pip.ini"

echo "Setting up Python virtual environment..."
python -m venv "$pyroot"
Expand Down
12 changes: 2 additions & 10 deletions .vsts/darwin/darwin-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
steps:
- template: ../dependencies.yml
- script: |
set -e
echo "Homebrew version $(brew --version)"
brew install openssl readline sqlite3 xz zlib tcl-tk
displayName: Install MacOS Python dependencies
- script: |
set -e
echo "Node.js version $(node --version)"
echo "NPM version $(npm --version)"
npm ci
npm run dev-setup
displayName: Install MacOS JavaScript dependencies
- script: |
cd util/bux
npm pack
npm install -g batch-bux-1.0.0.tgz
displayName: Install Batch Utility CLI (bux)
14 changes: 1 addition & 13 deletions .vsts/linux/linux-dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
steps:
- script: |
set -e
sudo apt-get update
echo "Installing pyenv dependencies (see https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites)"
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
echo "Installing additional dependencies"
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 libgconf-2-4 dbus xvfb libgtk-3-0 rpm
displayName: Install Linux packages
- template: ../dependencies.yml
- script: |
set -e
echo "Node.js version $(node --version)"
echo "NPM version $(npm --version)"
npm install -g codecov
npm ci
npm run dev-setup
displayName: Install NPM dependencies
- script: |
cd util/bux
npm pack
npm install -g batch-bux-1.0.0.tgz
displayName: Install Batch Utility CLI (bux)
5 changes: 2 additions & 3 deletions .vsts/python-setup.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
steps:
- task: UsePythonVersion@0
condition: eq( variables['Agent.OS'], 'Windows_NT' )
inputs:
versionSpec: '3.9'
displayName: Install Python 3.9 for Batch Explorer
versionSpec: '3.10'
displayName: Use Python 3.10

- bash: ./.vsts/common/setup-python.sh
displayName: Set up Python environment and private feed
Expand Down
8 changes: 1 addition & 7 deletions .vsts/win/win-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@ steps:
exec { Write-Host "Node.js version" $(node --version) }
exec { Write-Host "NPM version" $(npm --version) }
exec { npm ci }
exec { npm run dev-setup }
displayName: Install Windows dependencies
- powershell: |
. ../../.vsts/win/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm pack }
exec { npm install -g batch-bux-1.0.0.tgz }
workingDirectory: util/bux
displayName: Install Batch Utility CLI (bux)

0 comments on commit 9bbddcf

Please sign in to comment.