git.delta.rocks / jrsonnet / refs/commits / 86c2530b0f69

difftreelog

ci build wasm on ci

Лач2020-06-28parent: #faa4e4e.patch.diff
in: master

6 files changed

modified.gitignorediffbeforeafterboth
22
3.idea3.idea
4.vscode4.vscode
5
6cache
57
modified.gitlab-ci.ymldiffbeforeafterboth
1variables:
2 CARGO_HOME: $CI_PROJECT_DIR/cache
3
4stages:
5 - prepare
6 - build
7
8build-container:
1image: "rustlang/rust:nightly"9 image: docker:19.03.11
10 stage: prepare
11 services:
12 - docker:19.03.11-dind
13 before_script:
14 - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
15 script:
16 - docker build -t $CI_REGISTRY_IMAGE:build .
17 - docker push $CI_REGISTRY_IMAGE:build
218
3test:cargo:19test-library:
20 image: $CI_REGISTRY_IMAGE:build
21 stage: build
4 script:22 script:
5 - rustc --version && cargo --version23 - make test
24 cache:
25 key: test
26 paths:
6 - cargo test --all --verbose27 - ./cache
28
29build-linux:
30 image: $CI_REGISTRY_IMAGE:build
31 stage: build
32 script:
33 - make build-native
34 cache:
35 key: linux
36 paths:
37 - ./cache
38 - ./target
39 artifacts:
40 paths:
41 - ./target/release/jrsonnet
42 expire_in: 30 days
43
44build-wasm:
45 image: $CI_REGISTRY_IMAGE:build
46 stage: build
47 script:
48 - make build-wasi
49 cache:
50 key: wasm
51 paths:
52 - ./cache
53 - ./target
54 artifacts:
55 paths:
56 - ./target/wasm32-wasi/release/jsonnet.wasm
57 expire_in: 30 days
758
modifiedMakefilediffbeforeafterboth
1.PHONY: test build build-wasi
1jsonnet-cpp:2test:
2 git clone https://github.com/google/jsonnet jsonnet-cpp3 cargo test
3
4.ONESHELL:4build:
5 RUSTFLAGS="-Zmutable-noalias=yes -C link-arg=-s" cargo build --release -p jrsonnet
5test-examples: jsonnet-cpp6build-wasi:
6 cargo build --release7 cd ./bindings/ && cargo build --release -p jsonnet --target wasm32-wasi
7 export JSONNET_BIN="$(PWD)/target/release/jsonnet"
8 export EXAMPLES_DIR="$(PWD)/jsonnet-cpp/examples/"
9 cd ./jsonnet-cpp/examples/
10 ./check.sh
118
addedbuild/Dockerfilediffbeforeafterboth

no changes

addedbuild/make-docker.shdiffbeforeafterboth

no changes

addedbuild/run-docker.shdiffbeforeafterboth

no changes