.gitlab-ci.yml 1.48 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
  - buildjs
Merisier Tac's avatar
Merisier Tac committed
8

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

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

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

50 51 52 53 54 55 56 57 58 59 60 61
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
62
deploy:
Merisier Tac's avatar
Merisier Tac committed
63
  stage: deploy
Merisier Tac's avatar
Merisier Tac committed
64 65
  tags:
    - ci
Merisier Tac's avatar
Merisier Tac committed
66
  script:
Cypres TAC's avatar
Cypres TAC committed
67
    - cd CLEA-lib/java
Cypres TAC's avatar
Cypres TAC committed
68
    - 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
69 70
  only:
    - master
Merisier Tac's avatar
Merisier Tac committed
71
    - tags
72 73 74 75 76 77 78 79 80 81 82 83

buildjs:
  stage: buildjs
  image: node:15.13.0
  tags:
    - ci
  script:
    - cd CLEA-lib/js
    - npm install
    - npm run build
    - ls dist