Verilator ocla (#1588) #6500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'main' | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
Release_Date: | |
description: 'Release date of Raptor in format YYYY.MM' | |
default: "" | |
type: string | |
DEFAULT_DEVICES: | |
description: 'Name of production devices separated by comma' | |
default: "" | |
type: string | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
linux-gcc: | |
name: ubuntu-${{ matrix.mode }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
mode: | |
- test | |
- test/batch | |
- test/batch_gen2 | |
- regression | |
# - coverage | |
- install | |
- valgrind | |
- production | |
- solver | |
env: | |
MODE: ${{ matrix.mode }} | |
steps: | |
- name: ssh-agent | |
uses: webfactory/[email protected] | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
bash .github/workflows/install_ubuntu_dependencies_build.sh | |
# bash .github/workflows/install_litex_ubuntu.sh | |
- name: Setup Python Packages | |
run: | | |
pip3 install orderedmultidict | |
pip3 install psutil | |
- name: Use ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: linux-${{ matrix.mode }} | |
- name: Configure shell | |
run: | | |
echo 'CC=gcc-11' >> $GITHUB_ENV | |
echo 'CXX=g++-11' >> $GITHUB_ENV | |
echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV | |
echo 'PREFIX=/tmp/raptor_gui-install' >> $GITHUB_ENV | |
echo "$PREFIX" >> $GITHUB_PATH | |
echo "ADDITIONAL_CMAKE_OPTIONS='-DMY_CXX_WARNING_FLAGS="-W -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Werror -UNDEBUG"'" >> $GITHUB_ENV | |
echo 'RULE_MESSAGES=off' >> $GITHUB_ENV | |
echo 'LC_ALL=en_US.utf-8' >> $GITHUB_ENV | |
echo 'LANG=en_US.utf-8' >> $GITHUB_ENV | |
event_type=`echo ${{ github.event_name }}` | |
if [ ${{ github.repository_owner }} == 'os-fpga' ] | |
then | |
echo 'run_tests="RAPTOR_PUB=1"' >> $GITHUB_ENV | |
echo 'p_devices=MPW1' >> $GITHUB_ENV | |
else | |
echo 'run_tests="RAPTOR_PUB=0"' >> $GITHUB_ENV | |
echo 'p_devices=${{ secrets.DefaultDevice }}' >> $GITHUB_ENV | |
fi | |
if [ $event_type == 'workflow_dispatch' ] | |
then | |
echo 'p_devices=${{ inputs.DEFAULT_DEVICES }}' >> $GITHUB_ENV | |
fi | |
- name: Show shell configuration | |
run: | | |
env | |
which cmake && cmake --version | |
which make && make --version | |
which swig && swig -version | |
which python && python --version | |
which ninja && ninja --version | |
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh | |
which $CC && $CC --version | |
which $CXX && $CXX --version | |
echo -e "Production devices are\n\t${{ env.p_devices }}" | |
- name: free disk space | |
run: | | |
du -sch * | |
df -h | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt clean | |
docker rmi $(docker image ls -aq) | |
sudo apt-get autoremove -y >/dev/null 2>&1 | |
sudo apt-get autoclean -y >/dev/null 2>&1 | |
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 | |
df -h | |
- name: Test Release | |
if: matrix.mode == 'test' | |
run: | | |
make release CPU_CORES=2 ${{ env.run_tests }} ADDITIONAL_CMAKE_OPTIONS=-DBUILD_YOSYS_PLUGINS=ON test | |
- name: test/batch Release | |
if: matrix.mode == 'test/batch' | |
run: | | |
make release CPU_CORES=2 ${{ env.run_tests }} test/batch | |
- name: test/batch_gen2 Release | |
if: matrix.mode == 'test/batch_gen2' | |
run: | | |
make release CPU_CORES=2 ${{ env.run_tests }} test/batch_gen2 | |
- name: test/solver | |
if: matrix.mode == 'solver' | |
run: | | |
make CPU_CORES=2 ${{ env.run_tests }} solver/tests | |
- name: Regression | |
if: matrix.mode == 'regression' | |
run: | | |
make regression ${{ env.run_tests }} CPU_CORES=2 | |
- name: Coverage | |
if: matrix.mode == 'coverage' | |
run: | | |
make debug CPU_CORES=2 ${{ env.run_tests }} coverage-build/raptor_gui.coverage | |
- name: Production | |
if: matrix.mode == 'production' | |
run: | | |
make release CPU_CORES=2 ${{ env.run_tests }} PRODUCTION_BUILD=1 PRODUCTION_DEVICES=${{ env.p_devices }} STICK_RELEASE_VERSION=$r_d | |
./build/bin/raptor --version | |
#TODO enable it again to restore license | |
#./build/bin/Flex_LM/lmutil lmhostid | |
#export LM_LICENSE_FILE=${GITHUB_WORKSPACE}/.github/bin/.raptor.lic | |
d_test=$(echo "${{ env.p_devices }}" | cut -d ',' -f 1) | |
./Raptor_Tools/OpenLM/licensecc/install/bin/lccgen license issue -p projects/Raptor -f Raptor,$d_test,DE -o build/bin/raptor.lic | |
cat build/bin/raptor.lic | |
echo "the device is $d_test" | |
./build/bin/raptor --batch --mute --script tests/tcl_examples/and2_verilog/run_raptor.tcl --device $d_test | |
- name: Valgrind & Debug | |
if: matrix.mode == 'valgrind' | |
run: | | |
make debug CPU_CORES=2 ${{ env.run_tests }} | |
make debug test/unittest-d ${{ env.run_tests }} | |
make debug test/gui ${{ env.run_tests }} | |
make debug test/valgrind ${{ env.run_tests }} | |
- name: Install Test | |
if: matrix.mode == 'install' | |
run: | | |
make release CPU_CORES=2 ${{ env.run_tests }} ADDITIONAL_CMAKE_OPTIONS=-DBUILD_YOSYS_PLUGINS=ON | |
make install ${{ env.run_tests }} | |
make clean ${{ env.run_tests }} # make sure we only see installation artifacts | |
make test_install ${{ env.run_tests }} | |
# - name: Archive regression artifacts | |
# if: matrix.mode == 'test/batch_gen2' && always() | |
# uses: actions/[email protected] | |
# with: | |
# name: raptor_gui-linux-gcc-regression | |
# path: | | |
# ${{ github.workspace }}/build/share/raptor | |
# ${{ github.workspace }}/tests/ | |
- name: Print server resource | |
if: success() || failure() | |
run: | | |
df -h | |
du -sch * | |
# Reference: https://github.com/OPM/ResInsight/blob/dev/.github/workflows/centos7.yml | |
centos7-gcc: | |
name: centos7-${{ matrix.mode }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
mode: | |
- test | |
- regression | |
- production | |
env: | |
MODE: ${{ matrix.mode }} | |
FORK_REPO: ${{ secrets.FORK_STATUS }} | |
steps: | |
- name: ssh-agent | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
- name: free disk space | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -f /swapfile | |
sudo apt clean | |
docker image ls | |
before=$(docker image ls -q) | |
echo $before | |
echo " " | |
after=$(docker image ls -q | sed '1d' | sed '1d' | sed '1d') | |
echo $after | |
docker rmi $after | |
sudo rm -rf /usr/local/lib/android >/dev/null 2>&1 | |
- name: install minimum dependencies | |
run: | | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install -y qt6-base-dev qt6-webengine-dev qt6-webengine* libqt6webenginecore6* && sudo apt clean all | |
sudo apt install -y libegl1-mesa-dev libx11-xcb-dev libxkbcommon-dev libhwloc-dev libusb-1.0-0-dev && sudo apt clean all | |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | |
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
sudo apt update | |
sudo apt install -y vulkan-sdk | |
sudo apt-get autoremove -y >/dev/null 2>&1 | |
sudo apt-get autoclean -y >/dev/null 2>&1 | |
df -h | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: pull the CentOS image | |
run: docker pull ghcr.io/${{ github.repository_owner }}/raptor:centos7latest | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set Device name and Test on/off | |
run: | | |
if [ ${{ github.repository_owner }} == 'os-fpga' ] | |
then | |
echo 'run_tests="RAPTOR_PUB=1"' >> $GITHUB_ENV | |
echo 'p_devices=MPW1' >> $GITHUB_ENV | |
else | |
echo 'run_tests="RAPTOR_PUB=0"' >> $GITHUB_ENV | |
echo 'p_devices=${{ secrets.DefaultDevice }}' >> $GITHUB_ENV | |
fi | |
event_type=`echo ${{ github.event_name }}` | |
if [ $event_type == 'workflow_dispatch' ] | |
then | |
echo 'p_devices=${{ inputs.DEFAULT_DEVICES }}' >> $GITHUB_ENV | |
fi | |
- name: Checkout Subsystem | |
run: | | |
make run-cmake-release CPU_CORES=2 | |
echo "${{ env.p_devices }}" > DEFAULT_DEVICES | |
echo "${{ env.run_tests }}" > TEST_ON | |
echo ${{ inputs.Release_Date }} > input_release_date | |
- name: Show shell configuration | |
uses: addnab/docker-run-action@v3 | |
with: | |
shell: bash | |
image: ghcr.io/${{ github.repository_owner }}/raptor:centos7latest | |
run: | | |
source /opt/rh/devtoolset-11/enable | |
cmake --version | |
gcc --version | |
ls -l /usr/local | |
- name: Test | |
if: matrix.mode == 'test' | |
uses: addnab/docker-run-action@v3 | |
with: | |
shell: bash | |
image: ghcr.io/${{ github.repository_owner }}/raptor:centos7latest | |
options: -v ${{ github.workspace }}:/work | |
run: | | |
source /opt/rh/devtoolset-11/enable | |
cd work && make clean | |
run_test=`cat TEST_ON` | |
make release test/batch CPU_CORES=2 $run_test | |
- name: Regression | |
if: matrix.mode == 'regression' | |
uses: addnab/docker-run-action@v3 | |
with: | |
shell: bash | |
image: ghcr.io/${{ github.repository_owner }}/raptor:centos7latest | |
options: -v ${{ github.workspace }}:/work | |
run: | | |
source /opt/rh/devtoolset-11/enable | |
cd work && make clean | |
run_test=`cat TEST_ON` | |
make regression CPU_CORES=2 $run_test | |
make release CPU_CORES=2 $run_test ADDITIONAL_CMAKE_OPTIONS=-DBUILD_YOSYS_PLUGINS=ON test/batch | |
- name: Production Build | |
if: "${{ matrix.mode == 'production' }}" | |
uses: addnab/docker-run-action@v3 | |
with: | |
shell: bash | |
image: ghcr.io/${{ github.repository_owner }}/raptor:centos7latest | |
options: -v ${{ github.workspace }}:/work | |
run: | | |
cd work && make clean | |
source /opt/rh/devtoolset-11/enable | |
p_device=`cat DEFAULT_DEVICES` | |
run_test=`cat TEST_ON` | |
r_d=`cat input_release_date` | |
echo $p_device | |
echo "$r_d" | |
d_test=$(echo "$p_device" | cut -d ',' -f 1) | |
mkdir /opt/instl_dir | |
make install CPU_CORES=2 $run_test PRODUCTION_BUILD=1 PREFIX=/opt/instl_dir PRODUCTION_DEVICES=$p_device STICK_RELEASE_VERSION=$r_d | |
#export LM_LICENSE_FILE=/work/.github/bin/.raptor.lic | |
./Raptor_Tools/OpenLM/licensecc/install/bin/lccgen license issue -p projects/Raptor -f Raptor,$d_test,DE -o build/bin/raptor.lic | |
cat build/bin/raptor.lic | |
echo "the device is $d_test" | |
./build/bin/raptor --batch --mute --script tests/tcl_examples/and2_verilog/run_raptor.tcl --device $d_test | |
export LD_LIBRARY_PATH=/opt/instl_dir/lib64/raptor/lib:/usr/local/Qt6.2.4/lib:$LD_LIBRARY_PATH | |
cd /work/Raptor_Tools/Create_Raptor_Artifact && bash create_release.sh -C -w /opt/instl_dir | |
cat /opt/instl_dir/share/raptor/etc/device.xml | |
ls -l /opt/instl_dir/share/raptor/etc/devices/* | |
ls -l /opt/instl_dir/bin | |
- name: Print server resource | |
if: success() || failure() | |
run: df -h | |
# The below section upload Raptor binaries to FTP so to enable it make sure provide your credentials. | |
- name: Check FTP server status | |
# Change ref head to deploy using a different branch. | |
if: "${{ matrix.mode == 'production' && github.ref == 'refs/heads/main' && env.FORK_REPO == 'ON' }}" | |
#if: "${{ matrix.mode == 'production' }}" | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.FTP_IP }} | |
username: ${{ secrets.FTP_USER }} | |
key: ${{ secrets.FTP_KEY }} | |
port: ${{ secrets.FTP_PORT }} | |
script: whoami | |
- name: Deploy | |
# Change ref head to deploy using a different branch. | |
if: "${{ matrix.mode == 'production' && github.ref == 'refs/heads/main' && env.FORK_REPO == 'ON' }}" | |
#if: "${{ matrix.mode == 'production'}}" | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.FTP_IP }} | |
username: ${{ secrets.FTP_USER }} | |
key: ${{ secrets.FTP_KEY }} | |
port: ${{ secrets.FTP_PORT }} | |
source: "./Raptor_Tools/upload/*" | |
target: "/home/rsbuilder/Raptor" | |
# Reference: https://github.com/eyllanesc/69108420/blob/main/.github/workflows/test.yml | |
msys2-gcc: | |
if: ${{ false }} # disable for now | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Cancel previous | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
# Fix Cmake version, 3.21.4 has a bug that prevents Tcl to build | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.21.3' | |
- name: Configure Git | |
run: git config --global core.autocrlf input | |
shell: bash | |
# - name: ssh-agent | |
# uses: webfactory/[email protected] | |
# with: | |
# ssh-private-key: | | |
# ${{ secrets.SSH_PRIVATE_KEY_VERIFIC_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA }} | |
# ${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TCL }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_VERIFIC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RTL_BENCH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_PLUGINS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ABC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_JIRA_TESTCASE }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LITEX_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_IP_CATALOG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_BACKEND }} | |
# ${{ secrets.SSH_PRIVATE_KEY_EMBEDDED_COMMON_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_U_BOOT_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ZEPHYR_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA_PD_CASTOR_RS }} | |
# ${{ secrets.SSH_RS_FPGA_PRIMITIVES }} | |
- name: Git pull | |
uses: actions/checkout@v4 | |
- name: Install core dependencies | |
run: choco install -y swig --side-by-side --version=3.0.12 | |
shell: powershell | |
- name: Setup Python Packages | |
run: | | |
pip3 install orderedmultidict | |
pip3 install psutil | |
- name: Setup Msys2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MSYS | |
update: true | |
install: gcc make cmake ninja python python-devel git diffutils autoconf | |
release: false | |
env: | |
MSYS2_PATH_TYPE: inherit | |
# Install Qt | |
- shell: msys2 {0} | |
run: | | |
pacman --noconfirm -S zlib | |
pacman --noconfirm -S zlib-devel | |
pacman --noconfirm -S mingw-w64-x86_64-qt6 | |
# Static version pacman --noconfirm -Syu mingw-w64-x86_64-qt6-static | |
find . -name qt6-config.cmake | |
find . -name Qt6Config.cmake | |
find /mingw64 -name qt6-config.cmake | |
find /mingw64 -name Qt6Config.cmake | |
find C:/msys64/ -name qt6-config.cmake | |
find C:/msys64/ -name Qt6Config.cmake | |
- name: Configure shell environment variables | |
run: | | |
export SWIG_DIR=/c/ProgramData/chocolatey/lib/swig/tools/install/swigwin-3.0.12 | |
export Qt6_Dir=/mingw64/lib/cmake/Qt6/ | |
# Static version: export Qt6_Dir=/mingw64/qt5-static/lib/cmake/Qt6/ | |
export Qt6_DIR=$Qt6_Dir | |
export CWD=`pwd` | |
echo "Qt6_DIR=$Qt6_DIR" >> $GITHUB_ENV | |
echo "SWIG_DIR=$SWIG_DIR" >> $GITHUB_ENV | |
echo 'CMAKE_GENERATOR=Ninja' >> $GITHUB_ENV | |
echo 'CC=gcc' >> $GITHUB_ENV | |
echo 'CXX=g++' >> $GITHUB_ENV | |
echo 'NO_TCMALLOC=On' >> $GITHUB_ENV | |
echo "PREFIX=$CWD/install" >> $GITHUB_ENV | |
echo "$Qt6_DIR" >> $GITHUB_PATH | |
echo "$SWIG_DIR" >> $GITHUB_PATH | |
- name: Show shell configuration | |
run: | | |
export PATH=$SWIG_DIR:$PATH | |
env | |
where git && git --version | |
where cmake && cmake --version | |
where make && make --version | |
where swig && swig -version | |
where python && python --version | |
where ninja && ninja --version | |
where tclsh && echo 'puts [info patchlevel];exit 0' | tclsh | |
where $CC && $CC --version | |
where $CXX && $CXX --version | |
- name: Build | |
run: | | |
export PATH=$SWIG_DIR:$PATH | |
export Qt6_Dir=/mingw64/lib/cmake/Qt6/ | |
# export Qt6_Dir=/mingw64/qt6-static/lib/cmake/Qt6/ | |
export Qt6_DIR=$Qt6_Dir | |
export PATH=$Qt6_DIR:$PATH | |
make lib-only | |
# There are Qt linkage issues, so build only the libs for now | |
# make VERBOSE=1 release | |
# make debug | |
# make install | |
- name: Test | |
run: | | |
export PATH=$SWIG_DIR:$PATH | |
export Qt6_Dir=/mingw64/lib/cmake/Qt5/ | |
# export Qt6_Dir=/mingw64/qt5-static/lib/cmake/Qt5/ | |
export Qt6_DIR=$Qt6_Dir | |
export PATH=$Qt6_DIR:$PATH | |
# There Qt are linkage issues, so build only the libs for now | |
# make test_install | |
# make test/unittest | |
# make regression | |
windows-msvc: | |
if: ${{ false }} # disable for now | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- name: Cancel previous | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
# Fix Cmake version, 3.21.4 has a bug that prevents Tcl to build | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.21.3' | |
- name: Use cmake | |
run: cmake --version | |
- name: Install Core Dependencies | |
run: | | |
choco install -y make | |
choco install -y swig --side-by-side --version=3.0.12 | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Setup Python Packages | |
run: | | |
pip3 install orderedmultidict | |
pip3 install psutil | |
- name: Install Qt | |
uses: jurplel/[email protected] | |
with: | |
version: '6.2.4' | |
modules: 'qtwebengine qtwebchannel qtpositioning' | |
- run: git config --global core.autocrlf input | |
shell: bash | |
# - name: ssh-agent | |
# uses: webfactory/[email protected] | |
# with: | |
# ssh-private-key: | | |
# ${{ secrets.SSH_PRIVATE_KEY_VERIFIC_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA }} | |
# ${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TCL }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_VERIFIC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RTL_BENCH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_PLUGINS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ABC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_JIRA_TESTCASE }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LITEX_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_IP_CATALOG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_BACKEND }} | |
# ${{ secrets.SSH_PRIVATE_KEY_EMBEDDED_COMMON_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_U_BOOT_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ZEPHYR_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA_PD_CASTOR_RS }} | |
# ${{ secrets.SSH_RS_FPGA_PRIMITIVES }} | |
- uses: actions/checkout@v4 | |
- name: Build & Test | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
set CMAKE_GENERATOR=Ninja | |
set CC=cl | |
set CXX=cl | |
set NO_TCMALLOC=On | |
set PREFIX=%GITHUB_WORKSPACE%\install | |
set CPU_CORES=%NUMBER_OF_PROCESSORS% | |
set MAKE_DIR=C:\make\bin | |
#set TCL_DIR=%PROGRAMFILES%\Git\mingw64\bin | |
set SWIG_DIR=%PROGRMDATA%\chocolatey\lib\swig\tools\install\swigwin-3.0.12 | |
set PATH=%pythonLocation%;%SWIG_DIR%;%MAKE_DIR%;%PATH% | |
#set PATH=%pythonLocation%;%SWIG_DIR%;%MAKE_DIR%;%TCL_DIR%;%PATH% | |
set | |
where cmake && cmake --version | |
where make && make --version | |
where swig && swig -version | |
where python && python --version | |
where ninja && ninja --version | |
make release CPU_CORES=2 RAPTOR_PUB=1 ADDITIONAL_CMAKE_OPTIONS=-DBUILD_YOSYS_PLUGINS=ON | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
make install RAPTOR_PUB=1 | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
make test/unittest | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
make test_install | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
make regression | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
make test/batch | |
- name: Archive build artifacts | |
uses: actions/[email protected] | |
with: | |
name: raptor_gui-windows-msvc | |
path: ${{ github.workspace }}/install | |
- name: Archive regression artifacts | |
if: always() | |
uses: actions/[email protected] | |
with: | |
name: raptor_gui-windows-msvc-regression | |
path: | | |
${{ github.workspace }}/build/test/ | |
${{ github.workspace }}/build/tests/ | |
macos-gcc: | |
if: ${{ false }} # disable till EDA-802 is fixed | |
runs-on: macos-latest | |
steps: | |
- name: Cancel previous | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
- name: Setup Python Packages | |
run: | | |
pip3 install orderedmultidict | |
pip3 install psutil | |
# - name: ssh-agent | |
# uses: webfactory/[email protected] | |
# with: | |
# ssh-private-key: | | |
# ${{ secrets.SSH_PRIVATE_KEY_VERIFIC_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA }} | |
# ${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TCL }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_VERIFIC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RTL_BENCH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_PLUGINS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ABC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_JIRA_TESTCASE }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LITEX_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_IP_CATALOG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_BACKEND }} | |
# ${{ secrets.SSH_PRIVATE_KEY_EMBEDDED_COMMON_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_U_BOOT_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ZEPHYR_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA_PD_CASTOR_RS }} | |
# ${{ secrets.SSH_RS_FPGA_PRIMITIVES }} | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: jurplel/[email protected] | |
with: | |
setup-python: false | |
version: '6.2.4' | |
modules: 'qtwebengine qtwebchannel qtpositioning' | |
- name: Use ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: macos-gcc | |
- name: Install other dependencies | |
run: | | |
bash .github/workflows/install_macos_dependencies_build.sh | |
- name: Configure shell | |
run: | | |
echo 'CC=gcc-9' >> $GITHUB_ENV | |
echo 'CXX=g++-9' >> $GITHUB_ENV | |
echo "/usr/local/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH | |
echo 'PREFIX=${GITHUB_WORKSPACE}/install' >> $GITHUB_ENV | |
echo "$PREFIX" >> $GITHUB_PATH | |
- name: Show shell configuration | |
run: | | |
env | |
which cmake && cmake --version | |
which make && make --version | |
which swig && swig -version | |
which python && python --version | |
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh | |
which $CC && $CC --version | |
which $CXX && $CXX --version | |
which bison && bison --version | |
which install && install --version | |
- name: Build | |
run: | | |
make release CPU_CORES=2 | |
make install CPU_CORES=2 | |
- name: Unit tests | |
run: | | |
make test_install_mac CPU_CORES=2 | |
- name: Regression tests | |
run: | | |
make regression CPU_CORES=2 | |
macos-clang: | |
if: ${{ false }} # disable till EDA-802 is fixed | |
runs-on: macos-latest | |
steps: | |
- name: Cancel previous | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.8 | |
- name: Setup Python Packages | |
run: | | |
pip3 install orderedmultidict | |
pip3 install psutil | |
- name: Install dependencies | |
uses: jurplel/[email protected] | |
with: | |
setup-python: false | |
version: '6.2.4' | |
modules: 'qtwebengine qtwebchannel qtpositioning' | |
# - name: ssh-agent | |
# uses: webfactory/[email protected] | |
# with: | |
# ssh-private-key: | | |
# ${{ secrets.SSH_PRIVATE_KEY_VERIFIC_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA }} | |
# ${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TCL }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_VERIFIC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RTL_BENCH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_YOSYS_PLUGINS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ABC }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LOGIC_SYNTH }} | |
# ${{ secrets.SSH_PRIVATE_KEY_JIRA_TESTCASE }} | |
# ${{ secrets.SSH_PRIVATE_KEY_LITEX_RS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_RAPTOR_TOOLS }} | |
# ${{ secrets.SSH_PRIVATE_KEY_IP_CATALOG }} | |
# ${{ secrets.SSH_PRIVATE_KEY_BACKEND }} | |
# ${{ secrets.SSH_PRIVATE_KEY_EMBEDDED_COMMON_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_U_BOOT_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_ZEPHYR_DEV }} | |
# ${{ secrets.SSH_PRIVATE_KEY_OPENFPGA_PD_CASTOR_RS }} | |
# ${{ secrets.SSH_RS_FPGA_PRIMITIVES }} | |
- uses: actions/checkout@v4 | |
- name: Use ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: macos-clang | |
- name: Install other dependencies | |
run: | | |
bash .github/workflows/install_macos_dependencies_build.sh | |
- name: Configure shell | |
run: | | |
echo 'PREFIX=${GITHUB_WORKSPACE}/install' >> $GITHUB_ENV | |
echo "/usr/local/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH | |
echo "$PREFIX" >> $GITHUB_PATH | |
- name: Install XQuartz on macOS | |
run: brew install xquartz --cask | |
- name: Show shell configuration | |
run: | | |
env | |
which cmake && cmake --version | |
which make && make --version | |
which swig && swig -version | |
which python && python --version | |
which -a bison && bison --version | |
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh | |
- name: Build | |
run: | | |
make release CPU_CORES=2 | |
make install CPU_CORES=2 | |
- name: Unit tests | |
run: | | |
make test_install_mac CPU_CORES=2 | |
make test/unittest | |
make XVFB="" debug test/gui_mac | |
- name: Regression tests | |
run: | | |
make regression CPU_CORES=2 | |
CodeFormatting: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get install clang-format | |
clang-format --version | |
- name: Run formatting style check | |
run: ./.github/bin/run-clang-format.sh | |
ClangTidy: | |
runs-on: ubuntu-latest | |
if: ${{github.event_name == 'pull_request'}} | |
steps: | |
- name: Cancel previous | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: ssh-agent | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_FOEDAG }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -qq && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt -qq -y install clang-tidy-12 \ | |
g++-11 tclsh default-jre cmake \ | |
uuid-dev build-essential xorg libhwloc-dev \ | |
qt6-base-dev qt6-webengine-dev qt6-webengine* libegl1-mesa-dev libx11-xcb-dev libxkbcommon-dev xvfb \ | |
libusb-1.0-0-dev pkg-config | |
- name: Use ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: clang-tidy-codegen | |
- name: Configure shell | |
run: | | |
echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV | |
echo 'RULE_MESSAGES=off' >> $GITHUB_ENV | |
- name: Prepare source | |
run: | | |
make run-cmake-release CPU_CORES=2 | |
ln -s build/compile_commands.json . | |
- name: Run clang tidy | |
run: | | |
./.github/bin/run-clang-tidy.sh |