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/cc: c99
tea.xyz/gx/make: '*' tea.xyz/gx/make: '*'
script: | script:
- |
cmake -S . -B build \ cmake -S . -B build \
-DCMAKE_CXX_STANDARD=17 \ -DCMAKE_CXX_STANDARD=17 \
-DBUILD_SHARED_LIBS=ON \ -DBUILD_SHARED_LIBS=ON \
@ -25,24 +26,25 @@ build:
-DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_VERBOSE_MAKEFILE=ON \
-Wno-dev \ -Wno-dev \
-DBUILD_TESTING=OFF -DBUILD_TESTING=OFF
cmake --build build - cmake --build build
cmake --install build - cmake --install build
# Remove bad flags in .pc files. # Remove bad flags in .pc files.
# https://github.com/abseil/abseil-cpp/issues/1408 # 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 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" - working-directory: "{{prefix}}/lib/cmake/absl"
sed -i.bak \ run: |
-e "s:$(tea --prefix):\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" \ sed -i.bak \
-e "s:{{ tea.prefix }}:\$\{CMAKE_CURRENT_LIST_DIR\}/../../../../..:g" \
abslTargets{,-release}.cmake abslTargets{,-release}.cmake
rm abslTargets{,-release}.cmake.bak rm abslTargets{,-release}.cmake.bak
test: test:
dependencies: dependencies:
tea.xyz/gx/cc: c99 tea.xyz/gx/cc: c99
script: | script: |
ls -l 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" test "$(./a.out)" = "Joined string: foo-bar-baz\n"

View file

@ -40,7 +40,7 @@ build:
- run: | - run: |
sed -E -i.bak \ 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_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' \ -e '/^ INTERFACE_LINK_LIBRARIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/lib|/v\1/lib|g' \
folly-targets.cmake folly-targets.cmake

View file

@ -49,12 +49,6 @@ build:
./configure $ARGS ./configure $ARGS
make --jobs {{ hw.concurrency }} install make --jobs {{ hw.concurrency }} install
env: 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: ARGS:
- --prefix={{prefix}} - --prefix={{prefix}}
- --enable-bcmath - --enable-bcmath

View file

@ -7,25 +7,40 @@ versions:
strip: /^v/ strip: /^v/
dependencies: dependencies:
tea.xyz: ^0
companions:
python.org: ^3.7 python.org: ^3.7
pip.pypa.io: '*' pip.pypa.io: '*'
build: build:
dependencies: dependencies:
python.org: ^3.7
crates.io/semverator: '*' crates.io/semverator: '*'
script: script:
- python-venv.sh {{prefix}}/bin/pipenv - 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: - working-directory:
${{prefix}}/bin ${{prefix}}/bin
run: | run: |
v=3.6 v=3.6
while semverator lt $v {{deps.python.org.version.marketing}}; do while semverator lt $v {{deps.python.org.version.marketing}}; do
v=$(semverator bump $v minor | cut -d. -f1,2) 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 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: runtime:
env: env:
PIPENV_IGNORE_VIRTUALENVS: 1 PIPENV_IGNORE_VIRTUALENVS: 1