changes for tea 1.0.0 (#3023)

I removed some tea --prefix usage, but decided in the end to keep it in tea/cli for now.
This commit is contained in:
Max Howell 2023-08-23 10:28:14 -04:00 committed by GitHub
parent 7bd83f9ea6
commit 4c2bb1dc95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 19 deletions

View file

@ -11,7 +11,8 @@ build:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |
script:
- |
cmake -S . -B build \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_SHARED_LIBS=ON \
@ -25,24 +26,25 @@ build:
-DCMAKE_VERBOSE_MAKEFILE=ON \
-Wno-dev \
-DBUILD_TESTING=OFF
cmake --build build
cmake --install build
- cmake --build build
- cmake --install build
# Remove bad flags in .pc files.
# https://github.com/abseil/abseil-cpp/issues/1408
if [[ "$(uname)" == "Darwin" ]]; then
- run: |
sed -i '' 's/-Xarch_x86_64 -Xarch_x86_64 -Xarch_arm64 //g' {{ prefix }}/lib/pkgconfig/absl_random_internal_randen_hwaes{_impl,}.pc
fi
if: darwin
cd "{{prefix}}/lib/cmake/absl"
sed -i.bak \
-e "s:$(tea --prefix):\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" \
- working-directory: "{{prefix}}/lib/cmake/absl"
run: |
sed -i.bak \
-e "s:{{ tea.prefix }}:\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" \
abslTargets{,-release}.cmake
rm abslTargets{,-release}.cmake.bak
rm abslTargets{,-release}.cmake.bak
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
ls -l
c++ -std=c++17 -I{{ prefix }}/include -L{{ prefix }}/lib -labsl_strings test.cc
c++ -std=c++17 -I{{ prefix }}/include -L{{ prefix }}/lib -labsl_strings test.cc
test "$(./a.out)" = "Joined string: foo-bar-baz\n"

View file

@ -40,7 +40,7 @@ build:
- run: |
sed -E -i.bak \
-e "s:$(tea --prefix):\$\{_IMPORT_PREFIX\}/../../..:g" \
-e "s:{{tea.prefix}}:\$\{_IMPORT_PREFIX\}/../../..:g" \
-e '/^ INTERFACE_INCLUDE_DIRECTORIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/include|/v\1/include|g' \
-e '/^ INTERFACE_LINK_LIBRARIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/lib|/v\1/lib|g' \
folly-targets.cmake

View file

@ -49,12 +49,6 @@ build:
./configure $ARGS
make --jobs {{ hw.concurrency }} install
env:
# FIXME: this appears to be a regression related to
# https://github.com/teaxyz/brewkit/pull/99
# It's breaking certain ld invocations, due to:
# TEA_PREFIX mysteriously unset
# collect2: error: ld returned 1 exit status
TEA_PREFIX: $(tea --prefix)
ARGS:
- --prefix={{prefix}}
- --enable-bcmath

View file

@ -7,25 +7,40 @@ versions:
strip: /^v/
dependencies:
tea.xyz: ^0
companions:
python.org: ^3.7
pip.pypa.io: '*'
build:
dependencies:
python.org: ^3.7
crates.io/semverator: '*'
script:
- python-venv.sh {{prefix}}/bin/pipenv
# create symlinks for pipenv so it can auto install and use pythons it wants
# create exec scripts for pipenv so it can auto install and use the pythons it wants
- working-directory:
${{prefix}}/bin
run: |
v=3.6
while semverator lt $v {{deps.python.org.version.marketing}}; do
v=$(semverator bump $v minor | cut -d. -f1,2)
ln -s "../../../tea.xyz/v*/bin/tea" python$v
echo '#!/bin/sh' > python$v
echo "exec tea python~$v \"\$@\"" >> python$v
chmod +x python$v
done
# so the venv for ourselves works without adding a specific python to
# our runtime dependencies
- working-directory:
${{prefix}}/bin
run: |
echo '#!/bin/sh' > python
echo "exec tea python~{{ deps.python.org.version.marketing }} \"\$@\"" >> python
chmod +x python
runtime:
env:
PIPENV_IGNORE_VIRTUALENVS: 1