-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:jaredly/reason-language-server
- Loading branch information
Showing
22 changed files
with
229 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Cross-platform set of build steps for building esy projects | ||
|
||
parameters: | ||
platform: "macOS" | ||
vmImage: "macOS-10.13" | ||
|
||
jobs: | ||
- job: ${{ parameters.platform }} | ||
pool: | ||
vmImage: ${{ parameters.vmImage }} | ||
demands: node.js | ||
timeoutInMinutes: 120 # This is mostly for Windows | ||
variables: | ||
ESY__CACHE_INSTALL_PATH: ${{ parameters.ESY__CACHE_INSTALL_PATH }} | ||
CACHE_FOLDER: $(Pipeline.Workspace)/cache | ||
steps: | ||
- template: utils/use-node.yml | ||
- template: utils/use-esy.yml | ||
- template: utils/restore-build-cache.yml | ||
- script: "esy install" | ||
displayName: "esy install" | ||
- script: "esy build" | ||
displayName: "esy build" | ||
# - script: "esy test" | ||
# displayName: "Test command" | ||
- template: utils/publish-build-cache.yml | ||
- bash: ./_build/default/src/analyze_example_tests/ExamplesTests.exe | ||
- bash: ./_build/default/util_tests/UtilTests.exe | ||
- bash: mkdir -p rls-release | ||
- bash: cp _build/default/bin/Bin.exe rls-release/reason-language-server.exe | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Upload binary' | ||
inputs: | ||
pathToPublish: 'rls-release' | ||
artifactName: 'rls-$(Agent.OS)' | ||
parallel: true | ||
parallelCount: 8 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
steps: | ||
- pwsh: Copy-Item -Path $(ESY__CACHE_INSTALL_PATH) -Destination $(CACHE_FOLDER) -Recurse | ||
displayName: '[Cache][Publish] Copy builds to be cached' |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# The cache key is built up of the following: | ||
# We use a string that we can change to bust the cache | ||
# The string "esy" | ||
# The string for the OS | ||
# The hash of the lock file | ||
steps: | ||
- bash: | | ||
# COMPUTE THE ESY INSTALL CACHE LOCATION AHEAD OF TIME | ||
DESIRED_LEN="86" | ||
# Note: This will need to change when upgrading esy version | ||
# that reenables long paths on windows. | ||
if [ "$AGENT_OS" == "Windows_NT" ]; then | ||
DESIRED_LEN="33" | ||
fi | ||
HOME_ESY3="$HOME/.esy/3" | ||
HOME_ESY3_LEN=${#HOME_ESY3} | ||
NUM_UNDERS=$(echo "$(($DESIRED_LEN-$HOME_ESY3_LEN))") | ||
UNDERS=$(printf "%-${NUM_UNDERS}s" "_") | ||
UNDERS="${UNDERS// /_}" | ||
THE_ESY__CACHE_INSTALL_PATH=${HOME_ESY3}${UNDERS}/i | ||
if [ "$AGENT_OS" == "Windows_NT" ]; then | ||
THE_ESY__CACHE_INSTALL_PATH=$( cygpath --mixed --absolute "$THE_ESY__CACHE_INSTALL_PATH") | ||
fi | ||
echo "THE_ESY__CACHE_INSTALL_PATH: $THE_ESY__CACHE_INSTALL_PATH" | ||
# This will be exposed as an env var ESY__CACHE_INSTALL_PATH, or an | ||
# Azure var esy__cache_install_path | ||
echo "##vso[task.setvariable variable=esy__cache_install_path]$THE_ESY__CACHE_INSTALL_PATH" | ||
displayName: '[Cache] calculate esy store path' | ||
- task: Cache@2 | ||
inputs: | ||
# "v1" prefix added just to keep the ability to clear a cache without having to wait 7 days | ||
key: v1 | esy | $(Agent.OS) | esy.lock/index.json | ||
restoreKeys: v1 | esy | $(Agent.OS) | ||
path: $(CACHE_FOLDER) | ||
cacheHitVar: CACHE_RESTORED | ||
displayName: '[Cache] esy packages' | ||
|
||
- pwsh: 'New-Item $(ESY__CACHE_INSTALL_PATH) -ItemType Directory' | ||
condition: eq(variables.CACHE_RESTORED, 'true') | ||
displayName: '[Cache][Restore] Create esy cache directory' | ||
|
||
- pwsh: Move-Item -Path $(CACHE_FOLDER)/* -Destination $(ESY__CACHE_INSTALL_PATH) | ||
displayName: '[Cache][Restore] Move downloaded cache in place' | ||
condition: eq(variables.CACHE_RESTORED, 'true') |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# steps to install esy globally | ||
|
||
steps: | ||
- script: "npm install -g [email protected]" | ||
displayName: "install esy" |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# steps to use node on agent | ||
|
||
steps: | ||
- task: NodeTool@0 | ||
displayName: "Use Node 8.x" | ||
inputs: | ||
versionSpec: 8.x |
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
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
Oops, something went wrong.