.gitlab-ci.yml 4.49 KB
Newer Older
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml

# This is a sample GitLab CI/CD configuration file that should run without any modifications.
# It demonstrates a basic 3 stage CI/CD pipeline. Instead of real tests or scripts,
# it uses echo commands to simulate the pipeline execution.
#
# A pipeline is composed of independent jobs that run scripts, grouped into stages.
# Stages run in sequential order, but jobs within stages run in parallel.
#
# For more information, see: https://docs.gitlab.com/ee/ci/yaml/index.html#stages

Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
16
stages:          # List of stages for jobs, and their order of execution
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
17
18
19
20
  - build-bitstream
#  - buildpetalinux
#  - prepare-sd
#  - buildkintexes
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
21
  - packbitstream
22
23

  
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# buildmarsfpga-job:
#   stage: build-bitstream
#   script:
#     - echo "building bitstream for the FPGA part of Zynq"
#     - source /opt/Xilinx/Vivado/2018.2/settings64.sh 
#     - source scripts/build_mars_bitstream.sh
#     - echo "building done"
#     - tree -L 2
#   artifacts:
#     paths:
#       - build-mars/*sdk/*hdf
#   tags:
#     - Vivado20182
#   interruptible: true
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
38

39
buildk1-job:
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
40
  stage: build-bitstream
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  script:
    - echo "building bitstream for the FPGA part of Zynq"
    - source /opt/Xilinx/Vivado/2018.2/settings64.sh 
    - source scripts/build_K1_bitstream.sh
    - echo "building done"
    - tree -L 2
  artifacts:
    paths:
      - build-Kintex/K1*/K1*.runs/impl_1/wing_k1_top.bit
  tags:
    - Vivado20182
  interruptible: true

buildk2-job:
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
55
  stage: build-bitstream
56
57
  # needs: 
  #   - job: buildk1-job
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  script:
    - echo "building bitstream for the FPGA part of Zynq"
    - source /opt/Xilinx/Vivado/2018.2/settings64.sh 
    - source scripts/build_K2_bitstream.sh
    - echo "building done"
    - tree -L 2
  artifacts:
    paths:
      - build-Kintex/K2*/K2*.runs/impl_1/wing_k2_top.bit
  tags:
    - Vivado20182
  interruptible: true

  
packbitstream-job:
73
  stage: packbitstream
74
75
76
77
78
79
  needs: 
    - job: buildk1-job
      artifacts: true
    - job: buildk2-job
      artifacts: true
  script:
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
80
    - source /opt/Xilinx/Vivado/2018.2/settings64.sh 
81
82
83
84
85
86
87
88
89
90
91
92
93
    - echo "packging bitstreams together for both kintexes"
    - BUILDDIR="build-Kintex"
    - cd ${BUILDDIR}
    - vivado -mode tcl -source ../scripts/k1project.tcl
    - echo "building done"
    - tree -L 2
  artifacts:
    paths:
      - build-Kintex/K12.mcs
  tags:
    - Vivado20182
  
  
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# buildpetalinux-job:
#   stage: build-bitstream
#   needs: 
#     - job: buildmarsfpga-job
#       artifacts: true
#   script:
#     - source /opt/Xilinx/Vivado/2018.2/settings64.sh 
#     - source /opt/Xilinx/Petalinux/settings.sh
#     - echo "building petalinux image for the processor part of Zynq"
#     - source scripts/build_mars_petalinux.sh
#     - echo "building done"
#   artifacts:
#     paths:
#       - build-mars/*petalinux/images/linux/BOOT.BIN
#       - build-mars/*petalinux/images/linux/image.ub
#   tags:
#     - Vivado20182
#   interruptible: true
Jiri Kvasnicka's avatar
Jiri Kvasnicka committed
112
113


114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# prepare-sd-job:
#   stage: build-bitstream
#   needs:
#     - job: buildpetalinux-job
#       artifacts: true
#   script:
#     - echo "creating a zip file"
#     - zipdir="$PWD"
#     - if [[ -z "${CI_COMMIT_REF_NAME}" ]] ; then GITBRANCH=`git rev-parse --abbrev-ref HEAD` ; else GITBRANCH="${CI_COMMIT_REF_NAME}" ; fi
#     - if [[ -z "${CI_COMMIT_SHORT_SHA}" ]] ; then GITHASH=`git rev-parse --short HEAD` ; else GITHASH="${CI_COMMIT_SHORT_SHA}" ; fi
#     - echo "debug zip in ${zipdir} directory"
#     - md5sum `find | grep -e "BOOT.BIN" -e "image.ub"` | tee md5sum.txt
#     - zip -r $zipdir/SD_card_ZX3_${GITBRANCH}_${GITHASH}.zip --junk-paths `find | grep -e "BOOT.BIN" -e "image.ub"`
#     - pushd `find | grep "root.pfs$"`; cd ..; zip -r $zipdir/SD_card_ZX3_${GITBRANCH}_${GITHASH}.zip root.pfs; popd;
#     - touch version_${GITBRANCH}_${GITHASH}.txt
#     - echo -n "built on " >version_${GITBRANCH}_${GITHASH}.txt
#     - date >>version_${GITBRANCH}_${GITHASH}.txt
#     - echo "HASH ${GITHASH}" >>version_${GITBRANCH}_${GITHASH}.txt
#     - zip -r $zipdir/SD_card_ZX3_${GITBRANCH}_${GITHASH}.zip md5sum.txt version_${GITBRANCH}_${GITHASH}.txt
#     - unzip -l -v $zipdir/SD_card_ZX3_${GITBRANCH}_${GITHASH}.zip
#   artifacts:
#     paths:
#       - SD_card_ZX3*.zip
#   tags:
#     - Vivado20182