-
Notifications
You must be signed in to change notification settings - Fork 469
Set up CI with Azure Pipelines #3910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7296ea7
Set up CI with Azure Pipelines.
cristianoc 18d6459
Test building on https://github.com/BuckleScript/bucklescript/pull/3918.
cristianoc c3d1cab
Sync up with https://github.com/BuckleScript/ocaml/pull/38.
cristianoc e5b2cc9
Update esy.json
cristianoc c3a3111
Rename tasks.
cristianoc ffa0491
Do we need to specify node version?
cristianoc feddb4a
Add esy build targets for mac and linux.
cristianoc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,166 @@ | ||
# Node.js | ||
# Build a general Node.js project with npm. | ||
# Add steps that analyze code, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript | ||
|
||
trigger: | ||
- master | ||
|
||
jobs: | ||
- job: Linux_npm_install | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
|
||
steps: | ||
- bash: | | ||
BS_TRAVIS_CI=1 | ||
OCAMLRUNPARAM="b" | ||
echo "##vso[task.setvariable variable=BS_TRAVIS_CI]$BS_TRAVIS_CI" | ||
echo "##vso[task.setvariable variable=OCAMLRUNPARAM]$OCAMLRUNPARAM" | ||
displayName: "Set BS_TRAVIS_CI and OCAMLRUNPARAM" | ||
|
||
- bash: env | ||
displayName: "Print environment" | ||
|
||
- script: | | ||
git submodule init | ||
git submodule update | ||
displayName: "Pull Submodules" | ||
|
||
- script: | | ||
npm install | ||
displayName: "npm install" | ||
|
||
- bash: | | ||
export BS_TRAVIS_CI=1 | ||
npm test | ||
displayName: "test" | ||
|
||
- job: macOS_npm_install | ||
pool: | ||
vmImage: macOS-10.13 | ||
|
||
steps: | ||
- bash: | | ||
BS_TRAVIS_CI=1 | ||
OCAMLRUNPARAM="b" | ||
echo "##vso[task.setvariable variable=BS_TRAVIS_CI]$BS_TRAVIS_CI" | ||
echo "##vso[task.setvariable variable=OCAMLRUNPARAM]$OCAMLRUNPARAM" | ||
displayName: "Set BS_TRAVIS_CI and OCAMLRUNPARAM" | ||
|
||
- bash: env | ||
displayName: "Print environment" | ||
|
||
- script: | | ||
git submodule init | ||
git submodule update | ||
displayName: "Pull Submodules" | ||
|
||
- script: | | ||
npm install | ||
displayName: "npm install" | ||
|
||
- bash: | | ||
export BS_TRAVIS_CI=1 | ||
npm test | ||
displayName: "test" | ||
|
||
- job: Windows_esy_build | ||
pool: | ||
vmImage: vs2017-win2016 | ||
|
||
steps: | ||
# - bash: | | ||
# echo "which x86_64-w64-mingw32-gcc" | ||
# which x86_64-w64-mingw32-gcc | ||
# "echo ls -l /c/ProgramData/Chocolatey/bin" | ||
# ls -l /c/ProgramData/Chocolatey/bin | ||
# echo "int main() { return 0; }" >test.c | ||
# echo "x86_64-w64-mingw32-gcc -v test.c" | ||
# x86_64-w64-mingw32-gcc -v test.c | ||
# # echo "esy b which x86_64-w64-mingw32-as" | ||
# # esy b which x86_64-w64-mingw32-as | ||
|
||
# displayName: "find mingw" | ||
|
||
- bash: | | ||
BS_TRAVIS_CI=1 | ||
OCAMLRUNPARAM="b" | ||
echo "##vso[task.setvariable variable=BS_TRAVIS_CI]$BS_TRAVIS_CI" | ||
echo "##vso[task.setvariable variable=OCAMLRUNPARAM]$OCAMLRUNPARAM" | ||
displayName: "Set BS_TRAVIS_CI and OCAMLRUNPARAM" | ||
|
||
- bash: env | ||
displayName: "Print environment" | ||
|
||
# - script: | | ||
# git submodule init | ||
# git submodule update | ||
# displayName: "Pull Submodules" | ||
|
||
- script: npm install -g esy | ||
displayName: "install esy" | ||
- script: esy install | ||
displayName: "esy install" | ||
- script: esy build | ||
displayName: "esy build" | ||
|
||
# - bash: | | ||
# OCAMLOPT=`esy b which ocamlopt` | ||
# OCAMLBIN_UNIX=$(dirname "${OCAMLOPT}") | ||
# OCAMLBIN=$( cygpath --windows "$OCAMLBIN_UNIX") | ||
# echo "OCAMLBIN: $OCAMLBIN" | ||
# echo "##vso[task.setvariable variable=OCAMLBIN]$OCAMLBIN" | ||
# echo "##vso[task.prependpath]$OCAMLBIN" | ||
# displayName: "Set OCAMLBIN" | ||
|
||
# - bash: env | ||
# displayName: "Print environment" | ||
|
||
# - bash: ls -lR "$OCAMLBIN" | ||
# displayName: "ls -lR $OCAMLBIN" | ||
|
||
# - bash: ls -lR "$OCAMLBIN/.." | ||
# displayName: "ls -lR $OCAMLBIN/.." | ||
|
||
# - bash: | | ||
# echo "PATH" | ||
# echo $PATH | ||
# echo "ocamlopt -version" | ||
# ocamlopt -version | ||
# echo "looking for x86_64-w64-mingw32-as" | ||
# find ~/.esy -name "x86_64-w64-mingw32-as*" | ||
# echo "print_int 42;; print_newline();;" >testOcaml.ml | ||
# echo "build with esy" | ||
# esy b ocamlopt.opt -verbose testOcaml.ml -o testOcaml | ||
# ./testOcaml | ||
# echo "build without esy" | ||
# ocamlopt.opt testOcaml.ml -o testOcaml | ||
# node scripts/prebuilt.js | ||
# displayName: "try node scripts/prebuilt.js" | ||
|
||
- job: Linux_esy_build | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- bash: env | ||
displayName: "Print environment" | ||
- script: npm install -g esy | ||
displayName: "install esy" | ||
- script: esy install | ||
displayName: "esy install" | ||
- script: esy build | ||
displayName: "esy build" | ||
|
||
- job: macOS_esy_build | ||
pool: | ||
vmImage: macOS-10.13 | ||
steps: | ||
- bash: env | ||
displayName: "Print environment" | ||
- script: npm install -g esy | ||
displayName: "install esy" | ||
- script: esy install | ||
displayName: "esy install" | ||
- script: esy build | ||
displayName: "esy build" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work because
npm link
does not work under Azure?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's my guess. I think links in general are problematic.
So I'm skipping this for now as I'm more interested in getting Windows to work.
The other observation is that CircleCI is definitely faster on Linux.