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
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
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide 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.
...
@@ -90,74 +90,74 @@ build-job-ZCU104: # This job runs in the build stage, which runs first.
tags
:
tags
:
-
Vivado2021.1
-
Vivado2021.1
deploy-job-Z2
:
# This job runs in the deploy stage.
#
deploy-job-Z2: # This job runs in the deploy stage.
stage
:
deploy
# It only runs when *both* jobs in the test stage complete successfully.
#
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
environment
:
production
#
environment: production
script
:
#
script:
-
echo "Deploying application to Z2"
#
- echo "Deploying application to Z2"
# use smbclient to transfer accross the bit, hwh and python script files to the z2 xilinx board
#
# 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
#
# 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
#
- 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)
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
#
- then
-
echo "Connection to Z2 Board Failed"
#
- echo "Connection to Z2 Board Failed"
-
exit
1
#
- exit 1
-
else
#
- else
-
echo "Connection to Z2 Board successful"
#
- echo "Connection to Z2 Board successful"
-
fi
#
- fi
-
rm errorlog
#
- 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
#
- 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)
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
#
- then
-
echo "Connection to Z2 Board Failed"
#
- echo "Connection to Z2 Board Failed"
-
exit
1
#
- exit 1
-
else
#
- else
-
echo "Connection to Z2 Board successful"
#
- echo "Connection to Z2 Board successful"
-
fi
#
- fi
-
rm errorlog
#
- rm errorlog
-
cd ./system/fpga_imp/CI_verification
#
- 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
#
- 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)
#
- if (grep -r "Connection to 192.168.2.99 failed" ./errorlog)
-
then
#
- then
-
echo "Connection to Z2 Board Failed"
#
- echo "Connection to Z2 Board Failed"
-
exit
1
#
- exit 1
-
else
#
- else
-
echo "Connection to Z2 Board successful"
#
- echo "Connection to Z2 Board successful"
-
fi
#
- fi
-
rm errorlog
#
- rm errorlog
# get root access on host machine, this was found to be needed because other screen would not work
#
# 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
#
# however a more elegant solution would be better
-
echo gitrunner1 | sudo -S su
#
- echo gitrunner1 | sudo -S su
# open detatched terminal with connection to the Xilinx Z2 board
#
# open detatched terminal with connection to the Xilinx Z2 board
-
sudo screen -S zynq -dm /dev/ttyUSB1
115200
#
- 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
#
# get root access on xilinx board, this is needed because the python script won't run without
# being root.
#
# being root.
-
sudo screen -r zynq -X stuff "sudo -S su \n"
#
- sudo screen -r zynq -X stuff "sudo -S su \n"
# setup pynq environment
#
# 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/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/xrt_setup.sh \n"
-
sudo screen -r zynq -X stuff "source /etc/profile.d/boardname.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
#
# run load_bitfile: this loads the overlay and checks that it has been loaded
# script will output "Overlay Loaded" if successful
#
# script will output "Overlay Loaded" if successful
-
sudo screen -r zynq -X stuff "python3 load_bitfile.py > tmp \n"
#
- 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
#
# 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
#
# for the python script to finish. A more elegant solution should be implemented in future
-
sleep
60
#
- sleep 60
# copy over the tmp file back to host machine and check if "Overlay Loaded" has been outputed f
#
# 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'
#
- smbclient //192.168.2.99/xilinx -m SMB3 -U xilinx%xilinx -c 'get tmp'
-
if (grep -r "Overlay Loaded" ./tmp)
#
- if (grep -r "Overlay Loaded" ./tmp)
-
then
#
- then
-
echo "Bit file loaded successfully"
#
- echo "Bit file loaded successfully"
-
else
#
- else
-
echo "Bit file load failed"
#
- echo "Bit file load failed"
-
exit
1
#
- exit 1
-
fi
#
- fi
after_script
:
#
after_script:
# cleanup: remove detached terminal screen
#
# cleanup: remove detached terminal screen
-
echo gitrunner1 | sudo -S su
#
- echo gitrunner1 | sudo -S su
-
sudo screen -X -S zynq quit
#
- sudo screen -X -S zynq quit
tags
:
#
tags:
-
Z2
#
- Z2
deploy-job-ZCU104
:
# This job runs in the deploy stage.
deploy-job-ZCU104
:
# This job runs in the deploy stage.
stage
:
deploy
# It only runs when *both* jobs in the test stage complete successfully.
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