Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
NanoSoC Tech
Commits
955223b8
Commit
955223b8
authored
2 years ago
by
dwn1c21
Browse files
Options
Downloads
Patches
Plain Diff
Remove deploy Z2
parent
20377869
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+68
-68
68 additions, 68 deletions
.gitlab-ci.yml
with
68 additions
and
68 deletions
.gitlab-ci.yml
+
68
−
68
View file @
955223b8
...
...
@@ -90,74 +90,74 @@ build-job-ZCU104: # This job runs in the build stage, which runs first.
tags
:
-
Vivado2021.1
deploy-job-Z2
:
# This job runs in the deploy stage.
stage
:
deploy
# It only runs when *both* jobs in the test stage complete successfully.
environment
:
production
script
:
-
echo "Deploying application to Z2"
# use smbclient to transfer accross the bit, hwh and python script files to the z2 xilinx board
# could probably set this up as scp with RSA keys in future
-
smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'cd ./pynq/overlays/soclabs/ ; put ./system/fpga_imp/pynq_export/pz2/pynq/overlays/soclabs/design_1.bit ./design_1.bit' -E 2>errorlog
-
if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
-
echo "Connection to Z2 Board Failed"
-
exit
1
-
else
-
echo "Connection to Z2 Board successful"
-
fi
-
rm errorlog
-
smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'cd ./pynq/overlays/soclabs/ ; put ./system/fpga_imp/pynq_export/pz2/pynq/overlays/soclabs/design_1.hwh ./design_1.hwh' -E 2>errorlog
-
if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
-
echo "Connection to Z2 Board Failed"
-
exit
1
-
else
-
echo "Connection to Z2 Board successful"
-
fi
-
rm errorlog
-
cd ./system/fpga_imp/CI_verification
-
smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'put ./load_bitfile.py ./load_bitfile.py' -E 2>errorlog
-
if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
-
echo "Connection to Z2 Board Failed"
-
exit
1
-
else
-
echo "Connection to Z2 Board successful"
-
fi
-
rm errorlog
# get root access on host machine, this was found to be needed because other screen would not work
# however a more elegant solution would be better
-
echo gitrunner1 | sudo -S su
# open detatched terminal with connection to the Xilinx Z2 board
-
sudo screen -S zynq -dm /dev/ttyUSB1
115200
# get root access on xilinx board, this is needed because the python script won't run without
# being root.
-
sudo screen -r zynq -X stuff "sudo -S su \n"
# setup pynq environment
-
sudo screen -r zynq -X stuff "source /etc/profile.d/pynq_venv.sh \n"
-
sudo screen -r zynq -X stuff "source /etc/profile.d/xrt_setup.sh \n"
-
sudo screen -r zynq -X stuff "source /etc/profile.d/boardname.sh \n"
# run load_bitfile: this loads the overlay and checks that it has been loaded
# script will output "Overlay Loaded" if successful
-
sudo screen -r zynq -X stuff "python3 load_bitfile.py > tmp \n"
# sleep 1 minute: this is needed as currently the terminal running the CI/CD script will not wait
# for the python script to finish. A more elegant solution should be implemented in future
-
sleep
60
# copy over the tmp file back to host machine and check if "Overlay Loaded" has been outputed f
-
smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'get tmp'
-
if (grep -r "Overlay Loaded" ./tmp)
-
then
-
echo "Bit file loaded successfully"
-
else
-
echo "Bit file load failed"
-
exit
1
-
fi
after_script
:
# cleanup: remove detached terminal screen
-
echo gitrunner1 | sudo -S su
-
sudo screen -X -S zynq quit
tags
:
-
Z2
#
deploy-job-Z2: # This job runs in the deploy stage.
#
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
#
environment: production
#
script:
#
- echo "Deploying application to Z2"
#
# use smbclient to transfer accross the bit, hwh and python script files to the z2 xilinx board
#
# could probably set this up as scp with RSA keys in future
#
- smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'cd ./pynq/overlays/soclabs/ ; put ./system/fpga_imp/pynq_export/pz2/pynq/overlays/
#
soclabs/design_1.bit ./design_1.bit' -E 2>errorlog
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
#
- then
#
- echo "Connection to Z2 Board Failed"
#
- exit 1
#
- else
#
- echo "Connection to Z2 Board successful"
#
- fi
#
- rm errorlog
#
- smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'cd ./pynq/overlays/soclabs/ ; put ./system/fpga_imp/pynq_export/pz2/pynq/overlays/
#
soclabs/design_1.hwh ./design_1.hwh' -E 2>errorlog
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
#
- then
#
- echo "Connection to Z2 Board Failed"
#
- exit 1
#
- else
#
- echo "Connection to Z2 Board successful"
#
- fi
#
- rm errorlog
#
- cd ./system/fpga_imp/CI_verification
#
- smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'put ./load_bitfile.py ./load_bitfile.py' -E 2>errorlog
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
#
- then
#
- echo "Connection to Z2 Board Failed"
#
- exit 1
#
- else
#
- echo "Connection to Z2 Board successful"
#
- fi
#
- rm errorlog
#
# get root access on host machine, this was found to be needed because other screen would not work
#
# however a more elegant solution would be better
#
- echo gitrunner1 | sudo -S su
#
# open detatched terminal with connection to the Xilinx Z2 board
#
- sudo screen -S zynq -dm /dev/ttyUSB1 115200
#
# get root access on xilinx board, this is needed because the python script won't run without
#
# being root.
#
- sudo screen -r zynq -X stuff "sudo -S su \n"
#
# setup pynq environment
#
- sudo screen -r zynq -X stuff "source /etc/profile.d/pynq_venv.sh \n"
#
- sudo screen -r zynq -X stuff "source /etc/profile.d/xrt_setup.sh \n"
#
- sudo screen -r zynq -X stuff "source /etc/profile.d/boardname.sh \n"
#
# run load_bitfile: this loads the overlay and checks that it has been loaded
#
# script will output "Overlay Loaded" if successful
#
- sudo screen -r zynq -X stuff "python3 load_bitfile.py > tmp \n"
#
# sleep 1 minute: this is needed as currently the terminal running the CI/CD script will not wait
#
# for the python script to finish. A more elegant solution should be implemented in future
#
- sleep 60
#
# copy over the tmp file back to host machine and check if "Overlay Loaded" has been outputed f
#
- smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'get tmp'
#
- if (grep -r "Overlay Loaded" ./tmp)
#
- then
#
- echo "Bit file loaded successfully"
#
- else
#
- echo "Bit file load failed"
#
- exit 1
#
- fi
#
after_script:
#
# cleanup: remove detached terminal screen
#
- echo gitrunner1 | sudo -S su
#
- sudo screen -X -S zynq quit
#
tags:
#
- Z2
deploy-job-ZCU104
:
# This job runs in the deploy stage.
stage
:
deploy
# It only runs when *both* jobs in the test stage complete successfully.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment