Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup connection to Xilinx license server. #1918

Merged
merged 19 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/Automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
Pipeline:
if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') }}
uses: ./.github/workflows/Pipeline.yml
secrets:
LICENSE_TUNNEL_KEY_DATA: ${{ secrets.LICENSE_TUNNEL_KEY_DATA }}


Automerge:
Expand Down
37 changes: 35 additions & 2 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Pipeline

on:
workflow_call:
secrets:
LICENSE_TUNNEL_KEY_DATA:
required: false

jobs:

Expand All @@ -17,6 +20,10 @@ jobs:
family: ['artix7', 'zynq7', 'kintex7', 'spartan7']

env:
GHA_SSH_TUNNEL_KEY: "${{ secrets.LICENSE_TUNNEL_KEY_DATA }}"
GHA_SSH_TUNNEL_CONFIG: "${{ secrets.LICENSE_TUNNEL_SSH_CONFIG }}"
GHA_SSH_TUNNEL_CONFIG_SECRET_NAME: "xilinx_license_server_config"
GHA_SSH_TUNNEL_KEY_SECRET_NAME: "xilinx_license_server_key"
ALLOW_ROOT: true
GHA_EXTERNAL_DISK: "tools"
XILINX_LOCAL_USER_DATA: "no"
Expand All @@ -31,8 +38,34 @@ jobs:
run: |
DEBIAN_FRONTEND=noninteractive apt update -qq
DEBIAN_FRONTEND=noninteractive apt install -qq -y \
bash bison build-essential ca-certificates clang-format cmake psmisc \
colordiff coreutils git flex python3 python3-dev python3-venv xsltproc libtinfo5
bash \
bison \
build-essential \
ca-certificates \
clang-format \
cmake \
colordiff \
coreutils \
flex \
git \
iproute2 \
iputils-ping \
libtinfo5 \
netcat-openbsd \
psmisc \
python3 \
python3-dev \
python3-venv \
xsltproc \
sudo \

- name: Xilinx Setup
run: |
git config --global --add safe.directory /root/prjxray/prjxray
.github/workflows/scripts/xilinx.sh
env:
USE_LICENSE_SERVER: "true"
XRAY_SETTINGS: ${{ matrix.family }}

- name: Build
run: make build --output-sync=target --warn-undefined-variables -j$(nproc)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/scripts/db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ echo
echo "======================================="
echo "Creating Vivado Symbolic Link"
echo "---------------------------------------"
ln -s /mnt/aux/Xilinx /opt/Xilinx
ls /opt/Xilinx/Vivado
source /opt/Xilinx/Vivado/2017.2/settings64.sh
vivado -version
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/scripts/xilinx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash
# Copyright (C) 2017-2022 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC

echo
echo "========================================"
echo "Xilinx proprietary toolchain setup."
echo "----------------------------------------"

echo
echo "Fix up the Xilinx configuration directory"
echo "----------------------------------------"
mkdir -p ~/.Xilinx
ls -l ~/.Xilinx
mkdir ~/.ssh
echo
echo "Fixing loader to be able to run lmutils"
echo "----------------------------------------"
ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

export XILINX_LOCAL_USER_DATA=no
echo "----------------------------------------"

echo
echo "Select Xilinx Vivado version"
echo "----------------------------------------"
(
set -e
cd /opt
if [ x"$XRAY_SETTINGS" = x"kintex7" ]; then
echo "Using Xilinx Vivado Design Edition for $XRAY_SETTINGS build."
echo
ln -s /mnt/aux/Xilinx-design /opt/Xilinx
ls -l Xilinx
echo
else
ln -s /mnt/aux/Xilinx /opt/Xilinx
echo "Using Xilinx Vivado WebPack Edition for $XRAY_SETTINGS build."
ls -l Xilinx
fi
)
echo "----------------------------------------"


echo
echo "List /opt directory"
echo "----------------------------------------"
ls -l /opt
echo "----------------------------------------"

echo $GHA_SSH_TUNNEL_CONFIG_SECRET_NAME
kgugala marked this conversation as resolved.
Show resolved Hide resolved
if [[ ! -z "$USE_LICENSE_SERVER" ]]; then

echo
echo "Xilinx license server ssh key found, checking the license"
echo

echo "127.0.0.1 xlic.int" | sudo tee -a /etc/hosts

source /opt/Xilinx/Vivado/2017.2/settings64.sh
export PATH=/opt/Xilinx/Vivado/2017.2/bin/unwrapped/lnx64.o:$PATH
echo "-----"
lmutil lmstat -a -c 2100@localhost -i || true
echo "-----"

export XILINXD_LICENSE_FILE=2100@localhost

else
echo
echo "**No** Xilinx license server ssh key found."
fi
echo "----------------------------------------"