.gitlab-ci.yml 2.24 KB
Newer Older
Cypres TAC's avatar
Cypres TAC committed
1
image: maven:3.6-jdk-11
Merisier Tac's avatar
Merisier Tac committed
2 3 4

stages:
  - build
5
  - test
Merisier Tac's avatar
Merisier Tac committed
6
  - deploy
calocedre TAC's avatar
calocedre TAC committed
7
build-java:
Merisier Tac's avatar
Merisier Tac committed
8
  stage: build
Merisier Tac's avatar
Merisier Tac committed
9 10
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
11
  script:
Cypres TAC's avatar
Cypres TAC committed
12
    - cd CLEA-lib/java
Merisier Tac's avatar
Merisier Tac committed
13 14
    # build all (for other phase such as docker) but skip tests
    - mvn -DskipTests=true package
Merisier Tac's avatar
Merisier Tac committed
15 16
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
17
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
18

calocedre TAC's avatar
calocedre TAC committed
19
build-c:
Merisier Tac's avatar
Merisier Tac committed
20
  stage: build
calocedre TAC's avatar
calocedre TAC committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
  tags:
    - ci
  image: debian:latest
  before_script:
    - apt-get update
    - apt-get install -y -qq cmake make gcc git
  script:
    - cd CLEA-lib/c
    - mkdir build && cd build
    - cmake ..
    - make
  artifacts:
    paths:
      - CLEA-lib/c/build/test_*
      - CLEA-lib/c/build/build_clea

37 38
test-java:
  stage: test
Merisier Tac's avatar
Merisier Tac committed
39 40 41
  tags:
    - ci
  script:
Cypres TAC's avatar
Cypres TAC committed
42
    - cd CLEA-lib/java
Merisier Tac's avatar
Merisier Tac committed
43 44 45
    - mvn verify
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
46
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
47

48 49 50 51 52 53 54 55 56 57 58 59
test-interop:
  stage: test
  tags:
    - ci
  image: python:3-buster
  before_script: 
    - apt-get update
    - apt-get install -y -qq openjdk-11-jre
  script:
    - cd CLEA-lib/test
    - python test_clea.py

Merisier Tac's avatar
Merisier Tac committed
60
deploy:
Merisier Tac's avatar
Merisier Tac committed
61
  stage: deploy
Merisier Tac's avatar
Merisier Tac committed
62 63
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
64
  script:
Cypres TAC's avatar
Cypres TAC committed
65
    - cd CLEA-lib/java
Cypres TAC's avatar
Cypres TAC committed
66
    - mvn $MAVEN_CLI_OPTS -DskipTests=true  -DnexusReleasesUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -DnexusSnapshotsUrl=$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/maven -s ../../.gitlab-ci/ci_settings.xml deploy
Merisier Tac's avatar
Merisier Tac committed
67 68
  only:
    - master
Merisier Tac's avatar
Merisier Tac committed
69
    - tags
Kumquat Orange's avatar
Kumquat Orange committed
70

calocedre TAC's avatar
calocedre TAC committed
71
test-js:
72
  stage: test
73
  before_script:
74
    #Install  node and npm #
75
    - apt-get install -y curl && curl -sL https://deb.nodesource.com/setup_15.x | bash - && apt-get install -y nodejs && curl -L https://www.npmjs.com/install.sh | sh 
76 77 78 79
    #Install Latest Google chrome package on system for front test#
    - apt-get install -y chromium
    #Install Latest firefox package on system for front test#
    - apt-get install -y firefox-esr
80 81 82 83
  tags:
    - ci
  script:
    - cd CLEA-lib/js
Kumquat Orange's avatar
Kumquat Orange committed
84
    - pwd || true
85
    - cp ../java/target/clea-crypto-*-jar-with-dependencies.jar ./clea-crypto.jar
Kumquat Orange's avatar
Kumquat Orange committed
86
    - java -cp ./clea-crypto.jar fr.inria.clea.lsp.LspEncoderDecoder decode || true
87 88
    - export CHROME_BIN=chromium
    - export FIREFOX_BIN=firefox-esr
89 90 91 92
    - npm install
    - npm test
    - npm run testcrypto

calocedre TAC's avatar
calocedre TAC committed
93
build-js:
94
  stage: build
Kumquat Orange's avatar
Kumquat Orange committed
95 96 97 98 99
  image: node:15.13.0
  tags:
    - ci
  script:
    - cd CLEA-lib/js
Kumquat Orange's avatar
Kumquat Orange committed
100
    - npm install
Kumquat Orange's avatar
Kumquat Orange committed
101 102 103
    - npm run build
    - ls dist