Skip to content

Commit

Permalink
CI Improvements
Browse files Browse the repository at this point in the history
1. Use newer node.js 18.16.0
2. Use Azure Pipelines cache@2 for faster npm installations
3. Compute ESY_BASH_VERSION variable for pipeline releases
  • Loading branch information
ManasJayanth committed Jun 10, 2023
1 parent 5e887db commit 4cdc4c7
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .ci/esy-build-steps.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
# Cross-platform set of build steps for building esy projects

steps:
- task: NodeTool@0
inputs:
versionSpec: '8.9'
versionSpec: '18.16.0'
- bash: |
NPM_CACHE_DIR=$(npm config get cache)
ESY_BASH_VERSION=$(node -e 'console.log(require("./package.json").version)')
echo "##vso[task.setvariable variable=NPM_CACHE_DIR]$NPM_CACHE_DIR"
echo "##vso[task.setvariable variable=ESY_BASH_VERSION]$ESY_BASH_VERSION"
displayName: Compute pipeline variables
- task: Cache@2
inputs:
key: 'npm | "$(Build.SourcesDirectory)/package-lock.json"'
restoreKeys: |
npm
path: $(NPM_CACHE_DIR)
displayName: Cache NPM
- script: npm i -g esy
- script: npm install
- script: npm run build-exe
Expand All @@ -19,8 +33,8 @@ steps:
- task: PublishBuildArtifacts@1
displayName: 'Release Package'
inputs:
PathtoPublish: './esy-bash-0.3.20.tgz'
ArtifactName: npm-package
PathtoPublish: './esy-bash-$(ESY_BASH_VERSION).tgz'
ArtifactName: esy-bash-$(ESY_BASH_VERSION)
- script: node postinstall.js
displayName: "node postinstall.js (iteration 1)"
- script: npm run test
Expand Down

0 comments on commit 4cdc4c7

Please sign in to comment.