.gitlab-ci.yml 2.17 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
7
  
calocedre TAC's avatar
calocedre TAC committed
8
build-java:
Merisier Tac's avatar
Merisier Tac committed
9
  stage: build
Merisier Tac's avatar
Merisier Tac committed
10 11
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
12
  script:
Cypres TAC's avatar
Cypres TAC committed
13
    - cd CLEA-lib/java
Merisier Tac's avatar
Merisier Tac committed
14 15
    # build all (for other phase such as docker) but skip tests
    - mvn -DskipTests=true package
Merisier Tac's avatar
Merisier Tac committed
16 17
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
18
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
19

calocedre TAC's avatar
calocedre TAC committed
20
build-c:
Merisier Tac's avatar
Merisier Tac committed
21
  stage: build
calocedre TAC's avatar
calocedre TAC committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
  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

38 39 40 41 42 43 44 45 46 47 48
build-js:
  stage: build
  image: node:15.13.0
  tags:
    - ci
  script:
    - cd CLEA-lib/js
    - npm install
    - npm run build
    - ls dist

49 50
test-java:
  stage: test
Merisier Tac's avatar
Merisier Tac committed
51 52 53
  tags:
    - ci
  script:
Cypres TAC's avatar
Cypres TAC committed
54
    - cd CLEA-lib/java
Merisier Tac's avatar
Merisier Tac committed
55 56 57
    - mvn verify
  artifacts:
    paths:
Cypres TAC's avatar
Cypres TAC committed
58
      - CLEA-lib/java/target/*.jar
Merisier Tac's avatar
Merisier Tac committed
59

calocedre TAC's avatar
calocedre TAC committed
60
test-js:
61
  stage: test
62
  before_script:
63
    #Install  node and npm #
64
    - 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
65 66 67 68
    #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
69 70 71 72
  tags:
    - ci
  script:
    - cd CLEA-lib/js
Kumquat Orange's avatar
Kumquat Orange committed
73
    - pwd || true
74
    - java -cp ../java/target/clea-crypto-*-jar-with-dependencies.jar fr.inria.clea.lsp.LspEncoderDecoder decode || true
75 76
    - export CHROME_BIN=chromium
    - export FIREFOX_BIN=firefox-esr
77 78 79 80
    - npm install
    - npm test
    - npm run testcrypto

81 82
test-interop:
  stage: test
Kumquat Orange's avatar
Kumquat Orange committed
83 84
  tags:
    - ci
85 86 87 88
  image: python:3-buster
  before_script: 
    - apt-get update
    - apt-get install -y -qq openjdk-11-jre
Kumquat Orange's avatar
Kumquat Orange committed
89
  script:
90 91 92 93 94 95 96 97 98 99
    - cd CLEA-lib/test
    - python test_clea.py

deploy:
  stage: deploy
  tags:
    - ci
  script:
    - cd CLEA-lib/java
    - 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