Merge branch 'webide/generate-deploy-script' of gitlab.com:edmondlee/ligo into webide/generate-deploy-script
This commit is contained in:
commit
5ae429c4ef
@ -7,6 +7,7 @@ variables:
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- push
|
- push
|
||||||
|
- ide-deploy
|
||||||
- versioning
|
- versioning
|
||||||
|
|
||||||
.docker-image:
|
.docker-image:
|
||||||
@ -29,6 +30,7 @@ version_scheduled_job:
|
|||||||
before_script:
|
before_script:
|
||||||
- find "$CI_PROJECT_DIR" -path "$CI_PROJECT_DIR/.git" -prune -o "(" -type d -a -not -perm -u=w ")" -exec chmod --verbose u+w {} ";"
|
- find "$CI_PROJECT_DIR" -path "$CI_PROJECT_DIR/.git" -prune -o "(" -type d -a -not -perm -u=w ")" -exec chmod --verbose u+w {} ";"
|
||||||
- nix-env -f channel:nixos-unstable -iA gnutar gitMinimal
|
- nix-env -f channel:nixos-unstable -iA gnutar gitMinimal
|
||||||
|
- export COMMIT_DATE="$(git show --no-patch --format=%ci)"
|
||||||
|
|
||||||
# The binary produced is useless by itself
|
# The binary produced is useless by itself
|
||||||
binary:
|
binary:
|
||||||
@ -66,15 +68,12 @@ test:
|
|||||||
paths:
|
paths:
|
||||||
- coverage
|
- coverage
|
||||||
|
|
||||||
# FIXME For some reason, e2e tests can't build on CI.
|
webide-e2e:
|
||||||
.webide-e2e:
|
|
||||||
extends: .nix
|
extends: .nix
|
||||||
rules:
|
only:
|
||||||
- changes:
|
- merge_requests
|
||||||
- tools/webide/**
|
- dev
|
||||||
when: always
|
- /^.*-run-dev$/
|
||||||
- if: '$CI_COMMIT_REF_NAME =~ /^(dev|.*-run-dev)$/ && $CI_PROJECT_PATH == "ligolang/ligo"'
|
|
||||||
when: always
|
|
||||||
script:
|
script:
|
||||||
- nix-build nix -A ligo-editor.e2e
|
- nix-build nix -A ligo-editor.e2e
|
||||||
|
|
||||||
@ -121,7 +120,6 @@ webide-docker:
|
|||||||
paths:
|
paths:
|
||||||
- webide.tar.gz
|
- webide.tar.gz
|
||||||
|
|
||||||
|
|
||||||
webide-push:
|
webide-push:
|
||||||
extends: .docker-image
|
extends: .docker-image
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -138,6 +136,17 @@ webide-push:
|
|||||||
- docker tag ligo-editor "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
- docker tag ligo-editor "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
||||||
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
- docker push "${WEBIDE_IMAGE_NAME}:${CI_COMMIT_SHORT_SHA}"
|
||||||
|
|
||||||
|
deploy-handoff:
|
||||||
|
# Handoff deployment duties to private repo
|
||||||
|
stage: ide-deploy
|
||||||
|
variables:
|
||||||
|
IDE_DOCKER_IMAGE: "registry.gitlab.com/${CI_PROJECT_PATH}/ligo_webide"
|
||||||
|
LIGO_COMMIT_REF_NAME: "${CI_COMMIT_SHORT_SHA}"
|
||||||
|
trigger: ligolang/ligo-webide-deploy
|
||||||
|
rules:
|
||||||
|
- if: '$CI_COMMIT_REF_NAME == "dev"'
|
||||||
|
when: always
|
||||||
|
|
||||||
static-binary:
|
static-binary:
|
||||||
extends: .nix
|
extends: .nix
|
||||||
only:
|
only:
|
||||||
|
@ -40,20 +40,31 @@ curl https://gitlab.com/ligolang/ligo/raw/master/scripts/installer.sh | bash -s
|
|||||||
ligo --help
|
ligo --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Static Linux binary
|
||||||
|
|
||||||
|
The `ligo` executable is statically linked. It should run on most modern Linux distributions.
|
||||||
|
|
||||||
|
To use it, get it [here](/bin/linux/ligo), make it executable, you're done!
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
wget https://ligolang.org/bin/linux/ligo
|
||||||
|
chmod +x ./ligo
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally, you can put it somewhere in your `PATH` for easy access:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
sudo cp ./ligo /usr/local/bin
|
||||||
|
```
|
||||||
|
|
||||||
## Debian Linux package installation
|
## Debian Linux package installation
|
||||||
|
|
||||||
We have produced .deb packages for a few Debian Linux versions. They will install a global `ligo` executable.
|
A `.deb` package containing the static `ligo` executable is also available.
|
||||||
First download one of the packages below, and then install using:
|
First download [the package](/deb/ligo.deb), and then install using:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
sudo apt install ./ligo.deb
|
||||||
```
|
```
|
||||||
sudo apt install ./<package_name_here>.deb
|
|
||||||
```
|
|
||||||
|
|
||||||
- [Ubuntu 18.04](/deb/ligo_ubuntu-18.04.deb)
|
|
||||||
- [Ubuntu 19.10](/deb/ligo_ubuntu-19.10.deb)
|
|
||||||
- [Debian 9](/deb/ligo_debian-9.deb)
|
|
||||||
- [Debian 10](/deb/ligo_debian-10.deb)
|
|
||||||
|
|
||||||
## Release schedule
|
## Release schedule
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ dockerTools, writeShellScriptBin, runCommand, mcpp, bash, coreutils, ligo, name ? "ligo" }:
|
{ dockerTools, writeShellScriptBin, runCommand, mcpp, bash, coreutils, ligo
|
||||||
|
, name ? "ligo", extraContents ? [ ] }:
|
||||||
dockerTools.buildLayeredImage {
|
dockerTools.buildLayeredImage {
|
||||||
inherit name;
|
inherit name;
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
contents = [ ligo bash ];
|
contents = [ ligo bash ] ++ extraContents;
|
||||||
config.Entrypoint = name;
|
config.Entrypoint = name;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ buildNpmPackage {
|
|||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp -Lr build $out
|
cp -Lr build $out
|
||||||
cp -r ${ligo-deb}/* $out/deb
|
cp -r ${ligo-deb}/*.deb $out/deb/ligo.deb
|
||||||
mkdir -p $out/bin/linux
|
mkdir -p $out/bin/linux
|
||||||
cp -r ${ligo-static}/bin/ligo $out/bin/linux/ligo
|
cp -r ${ligo-static}/bin/ligo $out/bin/linux/ligo
|
||||||
cp -r ${ligo-doc}/share/doc $out/odoc
|
cp -r ${ligo-doc}/share/doc $out/odoc
|
||||||
|
@ -20,6 +20,9 @@ let
|
|||||||
pkgs.runCommandNoCC "${pkg.name}-bin" { }
|
pkgs.runCommandNoCC "${pkg.name}-bin" { }
|
||||||
"mkdir -p $out/bin; cp -Lr ${pkg}/ligo $out/bin";
|
"mkdir -p $out/bin; cp -Lr ${pkg}/ligo $out/bin";
|
||||||
|
|
||||||
|
|
||||||
|
tmp = pkgs.runCommandNoCC "tmpdir" { } "mkdir -p $out/tmp";
|
||||||
|
|
||||||
in pkgs.extend (self: super: {
|
in pkgs.extend (self: super: {
|
||||||
inherit (self.ocamlPackages) ligo ligo-out ligo-tests ligo-doc ligo-coverage;
|
inherit (self.ocamlPackages) ligo ligo-out ligo-tests ligo-doc ligo-coverage;
|
||||||
ligo-bin = separateBinary self.ligo-out.bin;
|
ligo-bin = separateBinary self.ligo-out.bin;
|
||||||
@ -29,6 +32,7 @@ in pkgs.extend (self: super: {
|
|||||||
ligo-editor-docker = self.callPackage ./docker.nix {
|
ligo-editor-docker = self.callPackage ./docker.nix {
|
||||||
ligo = self.ligo-editor;
|
ligo = self.ligo-editor;
|
||||||
name = "ligo-editor";
|
name = "ligo-editor";
|
||||||
|
extraContents = [ tmp ];
|
||||||
};
|
};
|
||||||
ligo-website = self.callPackage ./ligo-website.nix {
|
ligo-website = self.callPackage ./ligo-website.nix {
|
||||||
inherit (nix-npm-buildpackage) buildNpmPackage;
|
inherit (nix-npm-buildpackage) buildNpmPackage;
|
||||||
|
@ -338,7 +338,7 @@ let rec compile_expression :
|
|||||||
let (p , loc) = r_split p in
|
let (p , loc) = r_split p in
|
||||||
let var =
|
let var =
|
||||||
let name = Var.of_name p.struct_name.value in
|
let name = Var.of_name p.struct_name.value in
|
||||||
e_variable name in
|
e_variable ~loc name in
|
||||||
let path = p.field_path in
|
let path = p.field_path in
|
||||||
let path' =
|
let path' =
|
||||||
let aux (s:Raw.selection) =
|
let aux (s:Raw.selection) =
|
||||||
@ -532,7 +532,7 @@ let rec compile_expression :
|
|||||||
| EBytes x ->
|
| EBytes x ->
|
||||||
let (x , loc) = r_split x in
|
let (x , loc) = r_split x in
|
||||||
return @@ e_literal ~loc (Literal_bytes (Hex.to_bytes @@ snd x))
|
return @@ e_literal ~loc (Literal_bytes (Hex.to_bytes @@ snd x))
|
||||||
| ETuple tpl -> compile_tuple_expression @@ (npseq_to_list tpl.value)
|
| ETuple tpl -> compile_tuple_expression ~loc:(Location.lift tpl.region) @@ (npseq_to_list tpl.value)
|
||||||
| ERecord r ->
|
| ERecord r ->
|
||||||
let (r , loc) = r_split r in
|
let (r , loc) = r_split r in
|
||||||
let%bind fields = bind_list
|
let%bind fields = bind_list
|
||||||
|
@ -45,14 +45,13 @@ module Errors = struct
|
|||||||
] in
|
] in
|
||||||
error ~data title message ()
|
error ~data title message ()
|
||||||
|
|
||||||
let unbound_variable (e:environment) (n:I.expression_variable) (loc:Location.t) () =
|
let unbound_variable (e:environment) (n:I.expression_variable) () =
|
||||||
let name () = Format.asprintf "%a" I.PP.expression_variable n in
|
let name () = Format.asprintf "%a" I.PP.expression_variable n in
|
||||||
let title = (thunk ("unbound variable "^(name ()))) in
|
let title = (thunk ("unbound variable "^(name ()))) in
|
||||||
let message () = "" in
|
let message () = "" in
|
||||||
let data = [
|
let data = [
|
||||||
("variable" , name) ;
|
("variable" , name) ;
|
||||||
("environment" , fun () -> Format.asprintf "%a" Environment.PP.environment e) ;
|
("environment" , fun () -> Format.asprintf "%a" Environment.PP.environment e) ;
|
||||||
("location" , fun () -> Format.asprintf "%a" Location.pp loc)
|
|
||||||
] in
|
] in
|
||||||
error ~data title message ()
|
error ~data title message ()
|
||||||
|
|
||||||
@ -698,7 +697,7 @@ and type_expression' : environment -> ?tv_opt:O.type_expression -> I.expression
|
|||||||
(* Basic *)
|
(* Basic *)
|
||||||
| E_variable name ->
|
| E_variable name ->
|
||||||
let%bind tv' =
|
let%bind tv' =
|
||||||
trace_option (unbound_variable e name ae.location)
|
trace_option (unbound_variable e name)
|
||||||
@@ Environment.get_opt name e in
|
@@ Environment.get_opt name e in
|
||||||
return (E_variable name) tv'.type_value
|
return (E_variable name) tv'.type_value
|
||||||
| E_literal Literal_unit ->
|
| E_literal Literal_unit ->
|
||||||
|
5
tools/webide/packages/client/package-lock.json
generated
5
tools/webide/packages/client/package-lock.json
generated
@ -16168,6 +16168,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"slugify": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-FtLNsMGBSRB/0JOE2A0fxlqjI6fJsgHGS13iTuVT28kViI4JjUiNqp/vyis0ZXYcMnpR3fzGNkv+6vRlI2GwdQ=="
|
||||||
|
},
|
||||||
"snapdragon": {
|
"snapdragon": {
|
||||||
"version": "0.8.2",
|
"version": "0.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
|
||||||
|
3
tools/webide/packages/server/package-lock.json
generated
3
tools/webide/packages/server/package-lock.json
generated
@ -3317,8 +3317,7 @@
|
|||||||
"gensync": {
|
"gensync": {
|
||||||
"version": "1.0.0-beta.1",
|
"version": "1.0.0-beta.1",
|
||||||
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
|
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
|
||||||
"integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
|
"integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"get-caller-file": {
|
"get-caller-file": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user