gitlab-ci-base.yml 2.21 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
image: tapasco

variables:
  XILINXD_LICENSE_FILE: "/opt/cad/keys/xilinx"

before_script:
  - uname -a
  - echo $SHELL
  - echo $PWD
  - source $PWD/setup.sh
  - source /root/.sdkman/bin/sdkman-init.sh
  - export SBT_OPTS="-Dsbt.global.base=$TAPASCO_HOME/.sbt/ -Dsbt.ivy.home=$TAPASCO_HOME/.ivy2/ -Divy.home=$TAPASCO_HOME/.ivy2/"

stages:
  - toolchain-test
  - hls
  - import
  - compose
  - dse

scala-test:
  stage: toolchain-test
  script:
    - sbt clean test

26
27
28
29
30
.template: &template
  only:
    - "master"
    - /20\d\d\.\d/

31
sbt-prepare:
32
  <<: *template
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
  stage: toolchain-test
  cache:
      untracked: true
      key: "$CI_COMMIT_SHA-$CI_COMMIT_REF_NAME"
      policy: push
  script:
    - sbt assembly

.hls-template: &hls-definition
  <<: *template
  stage: hls
  dependencies:
    - sbt-prepare
  cache:
      untracked: true
      key: "$CI_COMMIT_SHA-$CI_COMMIT_REF_NAME"
      policy: pull
  artifacts:
      when: always
      expire_in: 1 hours
      paths:
        - core
  script:
    - source /opt/cad/$VIVADO_OFFSET/settings64.sh
    - vivado -version
    - |
      if [ ! -d ".ivy2" ]; then
        echo "Cache not available"
        sbt assembly
      fi
    - tapasco -v hls arraysum, arrayinit -a $ARCHS -p $PLATFORMS

.import-template: &import-definition
  <<: *template
  stage: import
  dependencies:
    - sbt-prepare
  cache:
      untracked: true
      key: "$CI_COMMIT_SHA-$CI_COMMIT_REF_NAME"
      policy: pull
  script:
    - source /opt/cad/$VIVADO_OFFSET/settings64.sh
    - |
      if [ ! -d ".ivy2" ]; then
        echo "Cache not available"
        sbt assembly
      fi
    - cd $TAPASCO_HOME/common/ip && zip -r precision_counter.zip precision_counter*
    - tapasco -v import $TAPASCO_HOME/common/ip/precision_counter.zip as 14 -a $ARCHS -p $PLATFORMS

.compose-template: &compose-definition
  <<: *template
  stage: compose
  cache:
      untracked: true
      key: "$CI_COMMIT_SHA-$CI_COMMIT_REF_NAME"
      policy: pull
  script:
    - source /opt/cad/$VIVADO_OFFSET/settings64.sh
    - |
      if [ ! -d ".ivy2" ]; then
        echo "Cache not available"
        sbt assembly
      fi
    - tapasco -v --maxTasks 1 compose [arraysum x 1, arrayupdate x 1] @ 100 MHz -a $ARCHS -p $PLATFORMS --features "$FEATURES"