Skip to content

Update OpenFPGA to latest (submodule checkout has issues in older ver… #2

Update OpenFPGA to latest (submodule checkout has issues in older ver…

Update OpenFPGA to latest (submodule checkout has issues in older ver… #2

Workflow file for this run

name: 'build'
on:
push:
jobs:
build-msys2:
strategy:
fail-fast: false
matrix:
include:
- msystem: mingw64
env: x86_64
runner: windows-2022
- msystem: ucrt64
env: ucrt-x86_64
runner: windows-2022
# clang version 17.0.6
# Target: x86_64-w64-windows-gnu
# Thread model: posix
# D:/a/OpenFPGA/OpenFPGA/vtr-verilog-to-routing/libs/librrgraph/src/base/rr_graph_storage.cpp:425:10: note: in instantiation of function template specialization 'std::sort<edge_sort_iterator, edge_compare_dest_node>' requested here std::sort(
# C:/msys64/clang64/include/c++/v1/__algorithm/sort.h:647:5: error: indirection requires pointer operand ('const edge_sort_iterator' invalid)*__begin = _Ops::__iter_move(__pivot_pos);
# - msystem: clang64
# env: clang-x86_64
# runner: windows-2022
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: msys2 {0}
#shell: C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -no-start {0}
steps:
- name: Cancel Previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
path-type: minimal
update: true
release: false
install: >-
base-devel
git
wget
mingw-w64-${{ matrix.env }}-toolchain
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-tcl
mingw-w64-${{ matrix.env }}-zlib
mingw-w64-${{ matrix.env }}-swig
mingw-w64-${{ matrix.env }}-python
- name: Show Shell Configuration
run: |
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
# https://sourceforge.net/p/mingw/mailman/message/5690922/
# https://github.com/capnproto/capnproto/issues/1458
- name: Build
run: |
#
export SOURCE_DIR=${PWD}/openfpga
echo "SOURCE_DIR=${SOURCE_DIR}" >> $GITHUB_ENV
#
export COMMIT_SHA1=$(git -C ${SOURCE_DIR} rev-parse --short HEAD)
echo "COMMIT_SHA1=${COMMIT_SHA1}" >> $GITHUB_ENV
printf "COMMIT_SHA1=${COMMIT_SHA1}"
#
export BUILD_DIR=${SOURCE_DIR}/build
echo "BUILD_DIR=${BUILD_DIR}" >> $GITHUB_ENV
#
export INSTALL_DIR=${PWD}/install
echo "INSTALL_DIR=${INSTALL_DIR}" >> $GITHUB_ENV
#
make install -j$(nproc)
- name: Install 7zip
run: |
printf "\n\n >>>7zip setup <<<\n"
export SEVENZIP_DIR_PATH=${SOURCE_DIR}/7zip
mkdir -p ${SEVENZIP_DIR_PATH}
export SEVENZIP_FILE_PATH=${SEVENZIP_DIR_PATH}/7z.exe
echo "SEVENZIP_FILE_PATH=${SEVENZIP_FILE_PATH}" >> $GITHUB_ENV
export SEVENZIP_SFX_FILE_PATH_W=$(cygpath -w "${SEVENZIP_DIR_PATH}/7z.sfx" | sed 's/\\/\\\\/g')
echo "SEVENZIP_SFX_FILE_PATH_W=${SEVENZIP_SFX_FILE_PATH_W}" >> $GITHUB_ENV
wget --quiet https://www.7-zip.org/a/7zr.exe --directory-prefix=${SEVENZIP_DIR_PATH}
wget --quiet https://www.7-zip.org/a/7z2201-x64.exe --directory-prefix=${SEVENZIP_DIR_PATH}
cd ${SEVENZIP_DIR_PATH}
${SEVENZIP_DIR_PATH}/7zr.exe x ${SEVENZIP_DIR_PATH}/7z2201-x64.exe -y > /dev/null
cd - &> /dev/null
- name: Create Package
run: |
printf "\n\n >>>create package dir, copy binaries <<<\n"
export PACKAGE_DIR=${PWD}/package
mkdir -p ${PACKAGE_DIR}/bin
cp -fv ${INSTALL_DIR}/bin/vpr.exe ${PACKAGE_DIR}/bin/
cp -fv ${INSTALL_DIR}/bin/openfpga.exe ${PACKAGE_DIR}/bin/
#
printf "\n\n >>> ${{ matrix.msystem }} dependency libs: vpr.exe <<<\n"
printf "\nldd output:"
ldd ${PACKAGE_DIR}/bin/vpr.exe
printf "\ncopy libs:"
for f in `ldd ${PACKAGE_DIR}/bin/vpr.exe | cut -d' ' -f 3 | grep "${{ matrix.msystem }}" | uniq`; do cp -fv ${f} ${PACKAGE_DIR}/bin; done
printf "\n\n >>> ${{ matrix.msystem }} dependency libs: openfpga.exe <<<\n"
printf "\nldd output:"
ldd ${PACKAGE_DIR}/bin/openfpga.exe
printf "\ncopy libs:"
for f in `ldd ${PACKAGE_DIR}/bin/openfpga.exe | cut -d' ' -f 3 | grep "${{ matrix.msystem }}" | uniq`; do cp -fv ${f} ${PACKAGE_DIR}/bin; done
#
printf "\n\n >>> create packages <<<\n"
cd ${PACKAGE_DIR}
# ${SEVENZIP_FILE_PATH} a -mmt -mx3 -sfx${SEVENZIP_SFX_FILE_PATH_W} openfpga.sfx.exe * > /dev/null
# mv ${PACKAGE_DIR}/openfpga.sfx.exe ../openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.sfx.exe
${SEVENZIP_FILE_PATH} a -tzip openfpga.7z * > /dev/null
mv ${PACKAGE_DIR}/openfpga.7z ../openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.7z
cd - &> /dev/null
# ls openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.sfx.exe
ls openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.7z
- name: Upload OpenFPGA Package
uses: actions/[email protected]
if: ${{ success() }}
with:
name: openfpga-build-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}
retention-days: 2
path: openfpga-${{ env.COMMIT_SHA1 }}-${{ matrix.msystem }}.7z
overwrite: true
build-ubuntu2004:
runs-on: ubuntu-20.04
defaults:
run:
shell: /bin/bash
steps:
- name: Cancel previous
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout Repo
uses: actions/[email protected]
with:
submodules: recursive
fetch-depth: 0
- name: Install Dependencies
run: |
apt-get update
apt-get install -y \
libicu-dev \
libglib2.0-dev \
libssl-dev \
libdbus-1-dev \
libgtk-3-dev \
libjpeg8-dev \
libtiff-dev \
libxcb-util-dev \
libreadline-dev \
libfontconfig1-dev \
libfreetype6-dev \
libx11-dev \
libx11-xcb-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxrender-dev \
libxcb1-dev \
libxcb-glx0-dev \
libxcb-keysyms1-dev \
libxcb-image0-dev \
libxcb-shm0-dev \
libxcb-icccm4-dev \
libxcb-sync-dev \
libxcb-xfixes0-dev \
libxcb-shape0-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libxcb-xinerama0-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libcanberra-gtk3-module \
packagekit-gtk3-module \
appmenu-gtk3-module \
wget \
git \
build-essential \
cmake \
flex \
bison \
pkg-config \
tcl \
tcl-dev \
tk \
tk-dev \
tcl8.6 \
tcl8.6-dev \
libtcl8.6 \
libboost-all-dev \
curl \
libedit-dev \
qtbase5-dev \
qtchooser \
qt5-qmake \
qtbase5-dev-tools \
g++-9 \
libkf5qqc2desktopstyle-dev \
tclsh \
google-perftools \
libgoogle-perftools-dev \
uuid-dev \
lcov \
valgrind \
xorg \
xvfb \
python3 \
python3-setuptools \
python3-lxml \
python3-pip \
swig \
libtbb-dev \
clang \
gawk \
tcl-dev \
libffi-dev \
graphviz \
xdot \
libboost-system-dev \
libboost-python-dev \
libboost-filesystem-dev \
zlib1g-dev \
xindy \
texlive-latex-base \
pandoc \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-fonts-extra-links \
fonts-freefont-* \
texlive-xetex \
latexmk \
pax-utils \
tmux \
tmux-plugin-manager \
tmux-themepack-jimeh \
screen \
software-properties-common \
fonts-croscore \
file \
libfuse2 \
libeigen3-dev
- name: Show Shell Configuration
run: |
which git && git --version || true
which cmake && cmake --version || true
which make && make --version || true
which python && python --version || true
which ninja && ninja --version || true
which tclsh && echo 'puts [info patchlevel];exit 0' | tclsh || true
- name: Print Compiler Info
run: |
printf "\n"
printf "$(which gcc)\n"
printf "$(gcc -v)\n"
printf "\n"
printf "$(which g++)\n"
printf "$(g++ -v)\n"
printf "\n"
printf "$(which ld)\n"
printf "$(ld -v)\n"
- name: Dump GitHub Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Print Repo HEAD
run: |
echo && echo "git last log" && git log -1
# https://sourceforge.net/p/mingw/mailman/message/5690922/
# https://github.com/capnproto/capnproto/issues/1458
- name: Build
run: |
#
export SOURCE_DIR=${PWD}/openfpga
echo "SOURCE_DIR=${SOURCE_DIR}" >> $GITHUB_ENV
#
export COMMIT_SHA1=$(git -C ${SOURCE_DIR} rev-parse --short HEAD)
echo "COMMIT_SHA1=${COMMIT_SHA1}" >> $GITHUB_ENV
printf "COMMIT_SHA1=${COMMIT_SHA1}"
#
export BUILD_DIR=${SOURCE_DIR}/build
echo "BUILD_DIR=${BUILD_DIR}" >> $GITHUB_ENV
#
export INSTALL_DIR=${PWD}/install
echo "INSTALL_DIR=${INSTALL_DIR}" >> $GITHUB_ENV
#
make install -j$(nproc)