forked from litex-hub/litex-conda-packages
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Split UHDM package into three packages #117
Open
tjurtsch
wants to merge
2
commits into
SymbiFlow:master
Choose a base branch
from
antmicro:add-missing-file
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
if [ x"$TRAVIS" = xtrue ]; then | ||
CPU_COUNT=2 | ||
fi | ||
|
||
TOP=$PWD | ||
export PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig/" | ||
export CXXFLAGS="$CXXFLAGS \ | ||
-I$BUILD_PREFIX/include \ | ||
-I$TOP/UHDM/include \ | ||
-I$TOP/UHDM/headers \ | ||
-I$TOP/UHDM \ | ||
-I$TOP/yosys/frontends/uhdm \ | ||
-I$PREFIX/include" | ||
export LDFLAGS="$CXXFLAGS \ | ||
-L$TOP/UHDM/build/lib \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/capnp \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/kj \ | ||
-L$PREFIX/lib/uhdm \ | ||
-L$BUILD_PREFIX/lib -L$PREFIX/lib -lrt -ltinfo" | ||
|
||
cd $TOP | ||
cd Surelog | ||
make -j$CPU_COUNT PREFIX=$PREFIX | ||
make install | ||
|
||
cp "$PREFIX/bin/surelog" "$PREFIX/bin/surelog-uhdm" |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG|replace('v','') or '0.X.X', GIT_DESCRIBE_NUMBER|int, GIT_DESCRIBE_HASH or 'gUNKNOWN') %} | ||
|
||
package: | ||
name: surelog-uhdm | ||
version: {{ version }} | ||
|
||
source: | ||
git_rev: {{ environ.get('UHDM_INTEGRATION_REV') }} | ||
git_url: https://github.com/alainmarcel/uhdm-integration.git | ||
|
||
build: | ||
script_env: | ||
- CI | ||
- TRAVIS | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- python {{ python }} | ||
- cmake | ||
- pkg-config | ||
- libuuid | ||
- gperftools | ||
- flex | ||
- libunwind | ||
- swig | ||
host: | ||
- python {{ python }} | ||
run: | ||
- ncurses | ||
- gperftools | ||
- libunwind | ||
- python {{ python }} | ||
|
||
test: | ||
commands: | ||
- surelog-uhdm --version | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
if [ x"$TRAVIS" = xtrue ]; then | ||
CPU_COUNT=2 | ||
fi | ||
|
||
TOP=$PWD | ||
|
||
unset VERILATOR_ROOT | ||
export PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig/" | ||
export CXXFLAGS="$CXXFLAGS \ | ||
-I$BUILD_PREFIX/include \ | ||
-I$TOP/UHDM/include \ | ||
-I$TOP/UHDM/headers \ | ||
-I$TOP/UHDM \ | ||
-I$TOP/yosys/frontends/uhdm \ | ||
-I$PREFIX/include" | ||
export LDFLAGS="$CXXFLAGS \ | ||
-L$TOP/UHDM/build/lib \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/capnp \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/kj \ | ||
-L$PREFIX/lib/uhdm \ | ||
-L$BUILD_PREFIX/lib -L$PREFIX/lib -lrt -ltinfo" | ||
|
||
cd $TOP | ||
mkdir -p UHDM/build | ||
cd UHDM/build | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX="$PREFIX" \ | ||
-D_GLIBCXX_DEBUG=1 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=1 -DWITH_LIBCXX=Off' \ | ||
../ | ||
make install | ||
|
||
cd $TOP | ||
cd verilator | ||
autoconf | ||
./configure --prefix=$PREFIX | ||
make -j$CPU_COUNT | ||
make install | ||
|
||
sed -i 's/"verilator_bin"/"verilator_bin-uhdm"/g' "$PREFIX/bin/verilator" | ||
sed -i 's/"verilator_bin_dbg"/"verilator_bin_dbg-uhdm"/g' "$PREFIX/bin/verilator" | ||
mv "$PREFIX/bin/verilator" "$PREFIX/bin/verilator-uhdm" | ||
mv "$PREFIX/bin/verilator_bin" "$PREFIX/bin/verilator_bin-uhdm" | ||
mv "$PREFIX/bin/verilator_bin_dbg" "$PREFIX/bin/verilator_bin_dbg-uhdm" | ||
sed -i 's@'$BUILD_PREFIX'@$(CONDA_PREFIX)@g' "$PREFIX/share/verilator/include/verilated.mk" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
channels: | ||
- conda-forge |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG|replace('v','') or '0.X.X', GIT_DESCRIBE_NUMBER|int, GIT_DESCRIBE_HASH or 'gUNKNOWN') %} | ||
|
||
package: | ||
name: verilator-uhdm | ||
version: {{ version }} | ||
|
||
source: | ||
git_rev: {{ environ.get('UHDM_INTEGRATION_REV') }} | ||
git_url: https://github.com/alainmarcel/uhdm-integration.git | ||
|
||
build: | ||
script_env: | ||
- CI | ||
- TRAVIS | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- python {{ python }} | ||
- cmake | ||
- pkg-config | ||
- libuuid | ||
- gperftools | ||
- flex | ||
- libunwind | ||
- swig | ||
run: | ||
- {{ compiler('cxx') }} | ||
- bison | ||
- flex | ||
- ncurses | ||
|
||
test: | ||
commands: | ||
- verilator-uhdm --version | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
|
||
if [ x"$TRAVIS" = xtrue ]; then | ||
CPU_COUNT=2 | ||
fi | ||
|
||
TOP=$PWD | ||
export PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig/" | ||
export CXXFLAGS="$CXXFLAGS \ | ||
-I$BUILD_PREFIX/include \ | ||
-I$TOP/UHDM/include \ | ||
-I$TOP/UHDM/headers \ | ||
-I$TOP/UHDM \ | ||
-I$TOP/yosys/frontends/uhdm \ | ||
-I$PREFIX/include" | ||
export LDFLAGS="$CXXFLAGS \ | ||
-L$TOP/UHDM/build/lib \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/capnp \ | ||
-L$TOP/UHDM/build/third_party/capnproto/c++/src/kj \ | ||
-L$PREFIX/lib/uhdm \ | ||
-L$BUILD_PREFIX/lib -L$PREFIX/lib -lrt -ltinfo" | ||
|
||
# Build uhdm, only for yosys build | ||
make uhdm/build -j$CPU_COUNT | ||
cd $TOP | ||
cd yosys | ||
env | ||
make ENABLE_READLINE=0 -j$CPU_COUNT | ||
make install | ||
|
||
# Rebuild UHDM, this time with conda PREFIX | ||
cd $TOP | ||
rm -rf UHDM/build | ||
mkdir -p UHDM/build | ||
cd UHDM/build | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX="$PREFIX" \ | ||
-D_GLIBCXX_DEBUG=1 \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=1 -DWITH_LIBCXX=Off' \ | ||
../ | ||
make install | ||
|
||
mv "$PREFIX/bin/yosys" "$PREFIX/bin/yosys-uhdm" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
channels: | ||
- conda-forge |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG|replace('v','') or '0.X.X', GIT_DESCRIBE_NUMBER|int, GIT_DESCRIBE_HASH or 'gUNKNOWN') %} | ||
|
||
package: | ||
name: yosys-uhdm | ||
version: {{ version }} | ||
|
||
source: | ||
git_rev: {{ environ.get('UHDM_INTEGRATION_REV') }} | ||
git_url: https://github.com/alainmarcel/uhdm-integration.git | ||
|
||
build: | ||
script_env: | ||
- CI | ||
- TRAVIS | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('c') }} | ||
- {{ compiler('cxx') }} | ||
- python {{ python }} | ||
- cmake | ||
- pkg-config | ||
- libuuid | ||
- gperftools | ||
- flex | ||
- libunwind | ||
- swig | ||
run: | ||
- ncurses | ||
|
||
test: | ||
commands: | ||
- yosys-uhdm --version | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, why do you need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to make sure we don't have any race conditions in package compatibility, for example uhdm surelog build starts -> in the meantime somebody upgrades the submodules in uhdm integration -> only then uhdm verilator build starts with different submodules. Checking the revision once and using it for all packages ensures this won't happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you have solved the problem you think you have solved here... Give me a while to think about it....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgorochowik - Do you know what the state of
conda build prepare
that @PiotrZierhoffer was managing? That was designed to solve exactly this problem by separating the "generating / freezing the conda recipe" from the build / test / etc steps.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tgorochowik @tjurtsch @mithro This is kinda unrelated to conda-build-prepare.
The problem here is that we can have different revisions for different uhdm packages - Travis will not preserve the value across packages. They are built in different VMs.
Conda-build-prepare will help you debug/alter the code before building, but this is a totally different scope.
I think that you can share the git versions between packages in an external storage, no other way for that in Travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a review where I wanted to add a comment. It's below