From 7296ea70aa0438c636bd80857cac1585537f7df1 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Sat, 2 Nov 2019 02:38:11 +0100 Subject: [PATCH 1/7] Set up CI with Azure Pipelines. --- 4061.json | 8 --- azure-pipelines.yml | 155 ++++++++++++++++++++++++++++++++++++++++++++ esy.json | 84 +----------------------- esy.lock/index.json | 20 ++---- scripts/ciTest.js | 4 +- scripts/prebuilt.js | 10 +-- 6 files changed, 172 insertions(+), 109 deletions(-) delete mode 100644 4061.json create mode 100644 azure-pipelines.yml diff --git a/4061.json b/4061.json deleted file mode 100644 index 69608c0f70..0000000000 --- a/4061.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "source": "./esy.json", - "override": { - "resolutions": { - "ocaml": "bucklescript/ocaml:package.json#4582c3fcce632aaa0f9794f5518bf5d9ad4a6385" - } - } -} diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..53e7c67c8b --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,155 @@ +# 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 + pool: + vmImage: ubuntu-16.04 + + steps: + - task: NodeTool@0 + inputs: + versionSpec: "10.x" + displayName: "Install Node.js" + + - 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 + pool: + vmImage: macOS-10.13 + + steps: + - task: NodeTool@0 + inputs: + versionSpec: "10.x" + displayName: "Install Node.js" + + - 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 + 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" + + - task: NodeTool@0 + inputs: + versionSpec: "10.x" + displayName: "Install Node.js" + + - 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" diff --git a/esy.json b/esy.json index caf8ccc91e..b95eb09d10 100644 --- a/esy.json +++ b/esy.json @@ -1,85 +1,7 @@ { "name": "bs-platform", - "version": "5.2.0-dev.2", + "version": "6.2.1", "dependencies": { - "ocaml": "4.02.3000+BS" - }, - "devDependencies": { - "ocaml": "4.02.3000+BS" - }, - "resolutions": { - "ocaml": "bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb" - }, - "scripts": { - "clean": "node ./scripts/ninja.js clean" - }, - "esy": { - "buildsInSource": true, - "build": [ - ["node", "./scripts/install.js"], - ["cp", "-r", "-f", "#{self.root / 'bsconfig.json'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'esy.json'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'package.json'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'jscomp'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'jscomp' / 'bin'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'lib'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'scripts'}", "#{self.install}"], - ["cp", "-r", "-f", "#{self.root / 'vendor'}", "#{self.install}"] - ], - "buildDev": [ - ["echo", "config"], - ["node", "./scripts/ninja.js", "config"], - ["echo", "build"], - ["node", "./scripts/ninja.js", "build"] - ], - "buildEnv": { - "ESY": "true" - }, - "exportedEnv": { - "OCAMLLIB": { - "val": "#{self.lib / 'ocaml' }", - "scope": "global" - }, - "CAML_LD_LIBRARY_PATH": { - "val": "#{self.lib / 'ocaml' / 'stublibs' : self.lib / 'ocaml' : $CAML_LD_LIBRARY_PATH}", - "scope": "global" - }, - "OCAML_TOPLEVEL_PATH": { - "val": "#{self.lib / 'ocaml' }", - "scope": "global" - }, - "bs_custom_resolution": { - "val": "true", - "scope": "global" - }, - "bs_platform__install": { - "val": "#{self.install}", - "scope": "global" - }, - "PATH": { - "val": "#{self.lib : $PATH}", - "scope": "global" - } - } - }, - "description": "bucklescript compiler for use in esy, ocaml standard libary by bucklescript and its required runtime support", - "repository": { - "type": "git", - "url": "git+https://github.com/bucklescript/bucklescript.git" - }, - "keywords": ["ocaml", "bucklescript", "stdlib", "functional programming"], - "author": { - "name": "Hongbo Zhang" - }, - "maintainers": [ - { - "name": "hongbo_zhang", - "email": "bobzhang1988@gmail.com" - } - ], - "license": "SEE LICENSE IN LICENSE", - "bugs": { - "url": "https://github.com/bucklescript/bucklescript/issues" - }, - "homepage": "https://github.com/bucklescript/bucklescript#readme" + "ocaml": "~4.06.1" + } } diff --git a/esy.lock/index.json b/esy.lock/index.json index 7454e5c58f..71820cc1bf 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,17 +1,15 @@ { - "checksum": "a0f4fa67bcb1beac6cda121fffdda6bb", + "checksum": "62680885f80ef361d9673f75df49f278", "root": "bs-platform@link-dev:./esy.json", "node": { - "ocaml@github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb@d41d8cd9": { - "id": - "ocaml@github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb@d41d8cd9", + "ocaml@4.6.1000@d41d8cd9": { + "id": "ocaml@4.6.1000@d41d8cd9", "name": "ocaml", - "version": - "github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb", + "version": "4.6.1000", "source": { "type": "install", "source": [ - "github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb" + "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.1000.tgz#sha1:99525ef559353481396454f9a072dedc96b52f44" ] }, "overrides": [], @@ -24,12 +22,8 @@ "version": "link-dev:./esy.json", "source": { "type": "link-dev", "path": ".", "manifest": "esy.json" }, "overrides": [], - "dependencies": [ - "ocaml@github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb@d41d8cd9" - ], - "devDependencies": [ - "ocaml@github:bucklescript/ocaml:package.json#698e60f3cd2f442f2013e79860ce2f7b0a9624cb@d41d8cd9" - ] + "dependencies": [ "ocaml@4.6.1000@d41d8cd9" ], + "devDependencies": [] } } } \ No newline at end of file diff --git a/scripts/ciTest.js b/scripts/ciTest.js index 81f158d2d5..8f9aa683d1 100644 --- a/scripts/ciTest.js +++ b/scripts/ciTest.js @@ -39,8 +39,8 @@ if (all){ installGlobal = true ounitTest = true mochaTest = true - themeTest = true - bsbTest = true + // themeTest = true + // bsbTest = true } var os = require('os') diff --git a/scripts/prebuilt.js b/scripts/prebuilt.js index 35e7aa041b..4cc51a5cf4 100755 --- a/scripts/prebuilt.js +++ b/scripts/prebuilt.js @@ -34,7 +34,7 @@ function buildCompiler() { var prebuilt = "prebuilt.ninja"; var content = require("./ninjaFactory.js").libNinja({ ocamlopt: is_windows - ? `ocamlopt.opt.exe` + ? `esy b ocamlopt.opt -verbose` : `../native/${ocamlVersion}/bin/ocamlopt.opt`, ext: sys_extension, INCL: ocamlVersion, @@ -58,10 +58,10 @@ var os = require("os"); function createOCamlTar() { if (os.platform() === hostPlatform) { cp.execSync(`git -C ocaml status -uno`, { cwd: root, stdio: [0, 1, 2] }); - cp.execSync( - `git -C ocaml archive --format=tar.gz HEAD -o ../vendor/ocaml.tar.gz`, - { cwd: root, stdio: [0, 1, 2] } - ); + // cp.execSync( + // `git -C ocaml archive --format=tar.gz HEAD -o ../vendor/ocaml.tar.gz`, + // { cwd: root, stdio: [0, 1, 2] } + // ); // fs.copyFileSync( // path.join(root, "ocaml", "VERSION"), // path.join(root, "OCAML_VERSION") From 18d64596353a56647c1ab75a78467ffed8e0f37b Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Sat, 2 Nov 2019 02:48:17 +0100 Subject: [PATCH 2/7] Test building on https://github.com/BuckleScript/bucklescript/pull/3918. https://github.com/BuckleScript/bucklescript/pull/3918 --- azure-pipelines.yml | 82 +++++++++++++++++++++--------------------- esy.json | 84 +++++++++++++++++++++++++++++++++++++++++-- esy.lock/index.json | 20 +++++++---- jscomp/snapshot.ninja | 3 +- scripts/ninja.js | 5 +++ 5 files changed, 141 insertions(+), 53 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53e7c67c8b..9816102b3a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -80,18 +80,18 @@ jobs: 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: | + # 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" - task: NodeTool@0 inputs: @@ -108,10 +108,10 @@ jobs: - bash: env displayName: "Print environment" - - script: | - git submodule init - git submodule update - displayName: "Pull Submodules" + # - script: | + # git submodule init + # git submodule update + # displayName: "Pull Submodules" - script: npm install -g esy displayName: "install esy" @@ -120,17 +120,17 @@ jobs: - 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: | + # 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: env + # displayName: "Print environment" # - bash: ls -lR "$OCAMLBIN" # displayName: "ls -lR $OCAMLBIN" @@ -138,18 +138,18 @@ jobs: # - 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" + # - 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" diff --git a/esy.json b/esy.json index b95eb09d10..3b285dc95c 100644 --- a/esy.json +++ b/esy.json @@ -1,7 +1,85 @@ { "name": "bs-platform", - "version": "6.2.1", + "version": "5.2.0-dev.2", "dependencies": { - "ocaml": "~4.06.1" - } + "ocaml": "4.02.3000+BS" + }, + "devDependencies": { + "ocaml": "4.02.3000+BS" + }, + "resolutions": { + "ocaml": "ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b" + }, + "scripts": { + "clean": "node ./scripts/ninja.js clean" + }, + "esy": { + "buildsInSource": true, + "build": [ + ["node", "./scripts/install.js"], + ["cp", "-r", "-f", "#{self.root / 'bsconfig.json'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'esy.json'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'package.json'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'jscomp'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'jscomp' / 'bin'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'lib'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'scripts'}", "#{self.install}"], + ["cp", "-r", "-f", "#{self.root / 'vendor'}", "#{self.install}"] + ], + "buildDev": [ + ["echo", "config"], + ["node", "./scripts/ninja.js", "config"], + ["echo", "build"], + ["node", "./scripts/ninja.js", "build"] + ], + "buildEnv": { + "ESY": "true" + }, + "exportedEnv": { + "OCAMLLIB": { + "val": "#{self.lib / 'ocaml' }", + "scope": "global" + }, + "CAML_LD_LIBRARY_PATH": { + "val": "#{self.lib / 'ocaml' / 'stublibs' : self.lib / 'ocaml' : $CAML_LD_LIBRARY_PATH}", + "scope": "global" + }, + "OCAML_TOPLEVEL_PATH": { + "val": "#{self.lib / 'ocaml' }", + "scope": "global" + }, + "bs_custom_resolution": { + "val": "true", + "scope": "global" + }, + "bs_platform__install": { + "val": "#{self.install}", + "scope": "global" + }, + "PATH": { + "val": "#{self.lib : $PATH}", + "scope": "global" + } + } + }, + "description": "bucklescript compiler for use in esy, ocaml standard libary by bucklescript and its required runtime support", + "repository": { + "type": "git", + "url": "git+https://github.com/bucklescript/bucklescript.git" + }, + "keywords": ["ocaml", "bucklescript", "stdlib", "functional programming"], + "author": { + "name": "Hongbo Zhang" + }, + "maintainers": [ + { + "name": "hongbo_zhang", + "email": "bobzhang1988@gmail.com" + } + ], + "license": "SEE LICENSE IN LICENSE", + "bugs": { + "url": "https://github.com/bucklescript/bucklescript/issues" + }, + "homepage": "https://github.com/bucklescript/bucklescript#readme" } diff --git a/esy.lock/index.json b/esy.lock/index.json index 71820cc1bf..f0b5ce320e 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,15 +1,17 @@ { - "checksum": "62680885f80ef361d9673f75df49f278", + "checksum": "927e0056007e9ee1cea4deb3c760e964", "root": "bs-platform@link-dev:./esy.json", "node": { - "ocaml@4.6.1000@d41d8cd9": { - "id": "ocaml@4.6.1000@d41d8cd9", + "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9": { + "id": + "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9", "name": "ocaml", - "version": "4.6.1000", + "version": + "github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b", "source": { "type": "install", "source": [ - "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.1000.tgz#sha1:99525ef559353481396454f9a072dedc96b52f44" + "github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b" ] }, "overrides": [], @@ -22,8 +24,12 @@ "version": "link-dev:./esy.json", "source": { "type": "link-dev", "path": ".", "manifest": "esy.json" }, "overrides": [], - "dependencies": [ "ocaml@4.6.1000@d41d8cd9" ], - "devDependencies": [] + "dependencies": [ + "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9" + ], + "devDependencies": [ + "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9" + ] } } } \ No newline at end of file diff --git a/jscomp/snapshot.ninja b/jscomp/snapshot.ninja index 5d5fdebae2..d56a566d80 100644 --- a/jscomp/snapshot.ninja +++ b/jscomp/snapshot.ninja @@ -5,7 +5,7 @@ rule bspack generator = true -NATIVE_OCAML_PATH=../ocaml/ +NATIVE_OCAML_PATH=$native_ocaml_path OCAML_SRC_UTILS=$NATIVE_OCAML_PATH/utils OCAML_SRC_PARSING=$NATIVE_OCAML_PATH/parsing @@ -71,4 +71,3 @@ build $SNAP/unstable/js_compiler.ml: bspack | ./bin/bspack.exe # command = $ocamlopt -w -a unix.cmxa str.cmxa ./stubs/ext_basic_hash_stubs.c $in -o $out # only check if it compiles # build $SNAP/unstable/bsb_native.exe: bsbnative ./bin/bsb_native.ml - diff --git a/scripts/ninja.js b/scripts/ninja.js index 63441f9ce2..8f9072a3ac 100755 --- a/scripts/ninja.js +++ b/scripts/ninja.js @@ -1413,6 +1413,11 @@ build all: phony runtime others $stdlib test ` ${getVendorConfigNinja()} stdlib = ${version6() ? `stdlib-406` : `stdlib-402`} +native_ocaml_path = ${ + process.env.ESY === "true" + ? path.join(process.env.OCAMLLIB, "/../..") + : "../ocaml/" + } snapshot_path = ${require("./buildocaml.js").getVersionPrefix()} subninja compiler.ninja subninja snapshot.ninja From c3d1cab3bf39c41c57951318eb74b449b2977564 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Sun, 3 Nov 2019 10:16:06 +0100 Subject: [PATCH 3/7] Sync up with https://github.com/BuckleScript/ocaml/pull/38. --- esy.json | 7 ++----- esy.lock/index.json | 16 +++++++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/esy.json b/esy.json index 3b285dc95c..9b37903d2d 100644 --- a/esy.json +++ b/esy.json @@ -1,14 +1,11 @@ { "name": "bs-platform", "version": "5.2.0-dev.2", - "dependencies": { - "ocaml": "4.02.3000+BS" - }, "devDependencies": { - "ocaml": "4.02.3000+BS" + "ocaml": "overridden below" }, "resolutions": { - "ocaml": "ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b" + "ocaml": "ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2" }, "scripts": { "clean": "node ./scripts/ninja.js clean" diff --git a/esy.lock/index.json b/esy.lock/index.json index f0b5ce320e..9fa610df61 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,17 +1,17 @@ { - "checksum": "927e0056007e9ee1cea4deb3c760e964", + "checksum": "763e1d02a9cbdd20e67f848415121b41", "root": "bs-platform@link-dev:./esy.json", "node": { - "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9": { + "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9": { "id": - "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9", + "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9", "name": "ocaml", "version": - "github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b", + "github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2", "source": { "type": "install", "source": [ - "github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b" + "github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2" ] }, "overrides": [], @@ -24,11 +24,9 @@ "version": "link-dev:./esy.json", "source": { "type": "link-dev", "path": ".", "manifest": "esy.json" }, "overrides": [], - "dependencies": [ - "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9" - ], + "dependencies": [], "devDependencies": [ - "ocaml@github:ulrikstrid/ocaml:package.json#68e181a3a44f0b6be1b1ab1e585d2c9f2718c37b@d41d8cd9" + "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9" ] } } From e5b2cc9f22a2f2e7ba0fdad5dbf6120c66e5bfcf Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Sun, 3 Nov 2019 21:39:39 +0100 Subject: [PATCH 4/7] Update esy.json --- esy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esy.json b/esy.json index 9b37903d2d..748b818cc8 100644 --- a/esy.json +++ b/esy.json @@ -5,7 +5,7 @@ "ocaml": "overridden below" }, "resolutions": { - "ocaml": "ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2" + "ocaml": "ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2" }, "scripts": { "clean": "node ./scripts/ninja.js clean" From c3a3111baccae124b93434e0968b7d0073fa7587 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 4 Nov 2019 03:14:23 +0100 Subject: [PATCH 5/7] Rename tasks. --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9816102b3a..4990f3b5d8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - master jobs: - - job: Linux + - job: Linux_npm_install pool: vmImage: ubuntu-16.04 @@ -41,7 +41,7 @@ jobs: npm test displayName: "test" - - job: macOS + - job: macOS_npm_install pool: vmImage: macOS-10.13 @@ -75,7 +75,7 @@ jobs: npm test displayName: "test" - - job: Windows + - job: Windows_esy_build pool: vmImage: vs2017-win2016 From ffa04915290c3e95f3e04caea74c46b28c3f3082 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 4 Nov 2019 03:15:48 +0100 Subject: [PATCH 6/7] Do we need to specify node version? --- azure-pipelines.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4990f3b5d8..f5614a2dd9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,10 +12,10 @@ jobs: vmImage: ubuntu-16.04 steps: - - task: NodeTool@0 - inputs: - versionSpec: "10.x" - displayName: "Install Node.js" + # - task: NodeTool@0 + # inputs: + # versionSpec: "10.x" + # displayName: "Install Node.js" - bash: | BS_TRAVIS_CI=1 @@ -46,10 +46,10 @@ jobs: vmImage: macOS-10.13 steps: - - task: NodeTool@0 - inputs: - versionSpec: "10.x" - displayName: "Install Node.js" + # - task: NodeTool@0 + # inputs: + # versionSpec: "10.x" + # displayName: "Install Node.js" - bash: | BS_TRAVIS_CI=1 @@ -93,10 +93,10 @@ jobs: # displayName: "find mingw" - - task: NodeTool@0 - inputs: - versionSpec: "10.x" - displayName: "Install Node.js" + # - task: NodeTool@0 + # inputs: + # versionSpec: "10.x" + # displayName: "Install Node.js" - bash: | BS_TRAVIS_CI=1 From feddb4a02444c5d5f5afaeee3525de6539d58409 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 4 Nov 2019 03:28:22 +0100 Subject: [PATCH 7/7] Add esy build targets for mac and linux. --- azure-pipelines.yml | 41 ++++++++++++++++++++++++++--------------- esy.lock/index.json | 12 ++++++------ 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f5614a2dd9..6ae19cc86e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,11 +12,6 @@ jobs: vmImage: ubuntu-16.04 steps: - # - task: NodeTool@0 - # inputs: - # versionSpec: "10.x" - # displayName: "Install Node.js" - - bash: | BS_TRAVIS_CI=1 OCAMLRUNPARAM="b" @@ -46,11 +41,6 @@ jobs: vmImage: macOS-10.13 steps: - # - task: NodeTool@0 - # inputs: - # versionSpec: "10.x" - # displayName: "Install Node.js" - - bash: | BS_TRAVIS_CI=1 OCAMLRUNPARAM="b" @@ -93,11 +83,6 @@ jobs: # displayName: "find mingw" - # - task: NodeTool@0 - # inputs: - # versionSpec: "10.x" - # displayName: "Install Node.js" - - bash: | BS_TRAVIS_CI=1 OCAMLRUNPARAM="b" @@ -153,3 +138,29 @@ jobs: # 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" \ No newline at end of file diff --git a/esy.lock/index.json b/esy.lock/index.json index 9fa610df61..5f2b972cbf 100644 --- a/esy.lock/index.json +++ b/esy.lock/index.json @@ -1,17 +1,17 @@ { - "checksum": "763e1d02a9cbdd20e67f848415121b41", + "checksum": "8a97123dcb14bb7cb79bfd0219cb97fa", "root": "bs-platform@link-dev:./esy.json", "node": { - "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9": { + "ocaml@github:ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2@d41d8cd9": { "id": - "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9", + "ocaml@github:ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2@d41d8cd9", "name": "ocaml", "version": - "github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2", + "github:ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2", "source": { "type": "install", "source": [ - "github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2" + "github:ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2" ] }, "overrides": [], @@ -26,7 +26,7 @@ "overrides": [], "dependencies": [], "devDependencies": [ - "ocaml@github:ulrikstrid/ocaml:package.json#ba2cbc39fb656f70b5516f648573da9fbc1e46e2@d41d8cd9" + "ocaml@github:ulrikstrid/ocaml:package.json#6ff2cd84ddc7e8bbebd437a7695d04e4ba0900c2@d41d8cd9" ] } }