这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
294 commits
Select commit Hold shift + click to select a range
72a36eb
jitcompiler llvm13 implementation file
LeonhardFS Jun 6, 2022
2941046
fix
LeonhardFS Jun 6, 2022
4ac8549
remove byval
LeonhardFS Jun 6, 2022
2156403
wip
LeonhardFS Jun 6, 2022
21855e0
llvm13 updates
LeonhardFS Jun 22, 2022
01d1fd9
LLVM13 fixes
LeonhardFS Jun 24, 2022
4e705cf
fix firstblock alloc to insert at beginning
LeonhardFS Jun 24, 2022
beb7a8c
asan
LeonhardFS Jun 24, 2022
440f7de
rtti fix
Jun 28, 2022
11e0258
wip llvm14
Jun 28, 2022
ef1dcae
wip
Jun 29, 2022
b422ce5
fixing deployment target
LeonhardFS Jun 29, 2022
57de0cf
more fixes
LeonhardFS Jun 29, 2022
6b380c6
wip, more fixes
LeonhardFS Jun 29, 2022
5b0724f
more fixing
LeonhardFS Jun 29, 2022
4dfb0c6
more
LeonhardFS Jun 29, 2022
0e87aa2
more fixes
LeonhardFS Jul 1, 2022
189af14
more fixing
LeonhardFS Jul 1, 2022
8048af6
add switch
LeonhardFS Jul 1, 2022
4798238
fix
LeonhardFS Jul 1, 2022
08a88c7
temp fix
LeonhardFS Jul 1, 2022
fd98ba1
merged in recent master
LeonhardFS Jul 1, 2022
8a203e5
fix
LeonhardFS Jul 1, 2022
ec6a539
llvm9 fixes
LeonhardFS Jul 1, 2022
e2a3ac0
cmake fix post merge
LeonhardFS Jul 1, 2022
d6a4c17
get fixing
LeonhardFS Jul 1, 2022
6903018
gets seems fine now
LeonhardFS Jul 1, 2022
2f37cd1
add missing functions
LeonhardFS Jul 1, 2022
fd8dc85
more progress
LeonhardFS Jul 1, 2022
78a4521
compile fix
LeonhardFS Jul 6, 2022
5e7d511
copy ctor of irbuilder causing issues, flipped in storenull
LeonhardFS Jul 6, 2022
04f6dc9
not working
LeonhardFS Jul 6, 2022
91d5125
more fices
LeonhardFS Jul 6, 2022
07a0a0f
remove debug print
LeonhardFS Jul 6, 2022
b1b97fd
fix
LeonhardFS Jul 6, 2022
5883323
fix infinite loop
LeonhardFS Jul 8, 2022
3f4609a
type fix
LeonhardFS Jul 8, 2022
59866db
elemtype for ptrdiff
LeonhardFS Jul 8, 2022
74a9ee9
llvm9 fix
Jul 11, 2022
365a874
if fix
LeonhardFS Jul 11, 2022
2976434
Merge branch 'llvm13' of github.com:LeonhardFS/tuplex-public into llvm13
LeonhardFS Jul 11, 2022
446661e
fixing
LeonhardFS Jul 11, 2022
9a0bcd3
Merge branch 'master' into llvm13
LeonhardFS Jul 11, 2022
f07461c
list fix
LeonhardFS Jul 11, 2022
4f4daa6
fix
LeonhardFS Jul 11, 2022
e80bc81
update
LeonhardFS Jul 11, 2022
75f2299
debug, something odd with iterators
LeonhardFS Jul 11, 2022
f485b88
casting issue...
LeonhardFS Jul 11, 2022
8dea75e
iter fix attempt
LeonhardFS Jul 11, 2022
50618d9
another fix
LeonhardFS Jul 11, 2022
8920fa9
naming
LeonhardFS Jul 11, 2022
5b8a311
notes...
LeonhardFS Jul 11, 2022
881c14e
merged in recent master, still failing iterator tests...
LeonhardFS Jul 14, 2022
126ee5a
wip, still have things to fix
LeonhardFS Jul 20, 2022
e72cc93
wip
LeonhardFS Jul 25, 2022
e269475
wip, generating scripts
LeonhardFS Aug 11, 2022
4b316fb
more script gen
LeonhardFS Aug 12, 2022
c26955b
wip python tools
LeonhardFS Aug 12, 2022
fc6c195
added aws and antlr
LeonhardFS Aug 12, 2022
495e539
test auto script
LeonhardFS Aug 12, 2022
e2c4c2e
script gen fix
LeonhardFS Aug 12, 2022
b163654
update
LeonhardFS Aug 12, 2022
5c45a7b
llvm fixes
LeonhardFS Aug 12, 2022
57e5205
adding libmagic-dev for apt ubuntu 22.04 dependencies
LeonhardFS Aug 12, 2022
34b3141
boost gcc11 fix
LeonhardFS Aug 12, 2022
ddbc140
fixes
LeonhardFS Aug 12, 2022
64eaad8
remove commented
LeonhardFS Aug 12, 2022
fe3ce83
+1 error in tb for 3.10
LeonhardFS Aug 12, 2022
030f172
wip
LeonhardFS Aug 12, 2022
6ebce4f
python3.10+ requires cloudpickle 2.1.0+
LeonhardFS Aug 14, 2022
159acd3
llvm14 install fixes
LeonhardFS Aug 14, 2022
2edd6be
qMerge branch 'scriptgen' into llvm13
LeonhardFS Aug 14, 2022
824318e
cleanup
LeonhardFS Aug 14, 2022
512af2e
llvm14 fixes
LeonhardFS Aug 15, 2022
495bb30
removing attributes to fix llvm14
LeonhardFS Aug 15, 2022
79488c6
reverse naming fix
LeonhardFS Aug 15, 2022
12cecfe
compile fix
LeonhardFS Aug 15, 2022
05543fb
range fixes and no crash on untypable function
LeonhardFS Aug 16, 2022
c5bc1b0
fix test
LeonhardFS Aug 16, 2022
052d4af
wip
LeonhardFS Aug 16, 2022
c625245
merge in recent master
LeonhardFS Oct 11, 2022
cd91408
debugging the bus error failure for DataFrameTest.PrefixNullTest
LeonhardFS Oct 13, 2022
c7004cb
found bug in JIT
LeonhardFS Oct 14, 2022
af44886
fix generated parser
LeonhardFS Oct 18, 2022
576e9ef
wip
LeonhardFS Apr 30, 2023
02736ff
llvm16 updates
LeonhardFS Jun 5, 2023
506b29f
compiles now
LeonhardFS Jun 6, 2023
70c6ace
wip llvm16+ support
LeonhardFS Jun 7, 2023
5ad6894
fixes to make one test pass
LeonhardFS Jun 7, 2023
887d498
fix another load for binary str
LeonhardFS Jun 7, 2023
1f29c7b
more string functions fixes
LeonhardFS Jun 8, 2023
e5c1497
strSplit fixed
LeonhardFS Jun 9, 2023
bb03bf4
fixing intrinsics
LeonhardFS Jun 9, 2023
a4eeeb3
Mathfunctions working
LeonhardFS Jun 9, 2023
e96c53a
various fixes for aggregatetest
LeonhardFS Jun 9, 2023
7cfe111
fix slot
LeonhardFS Jun 9, 2023
a66663a
wip fixing csv row parse
LeonhardFS Jun 10, 2023
c4867f7
fixing up csv parse and bool i8 error
LeonhardFS Jun 13, 2023
b621736
fix empty tuple and global strconst
LeonhardFS Jun 14, 2023
f9d307b
more llvm16 fixes
LeonhardFS Jun 24, 2023
56f96ac
new aws sdk fixes
LeonhardFS Jun 25, 2023
30f0a2e
llvm16 compile fixes wip for use case functions
LeonhardFS Jun 27, 2023
a394183
fix jitsource partially for llvm16
LeonhardFS Jun 28, 2023
de63fc9
fix regex.sub
LeonhardFS Jun 28, 2023
711be77
list related fixes
LeonhardFS Jun 30, 2023
3922c1c
remove debug printing
LeonhardFS Jun 30, 2023
1cb1875
fix joining
LeonhardFS Jul 4, 2023
c11a4bf
fix double test
LeonhardFS Jul 4, 2023
ee76231
wip m1 target
Jul 5, 2023
6e432a3
add antlr4 runtime version extraction
Jul 6, 2023
2419590
auto-download missing antlr version
Jul 6, 2023
3530764
fix intrinsics and add fix for googletest/protobuf absl dependency issue
Jul 7, 2023
d27210f
Merge branch 'llvm16' of github.com:LeonhardFS/tuplex-public into llvm16
LeonhardFS Jul 7, 2023
54f93d5
fix cmake for older antlr
LeonhardFS Jul 8, 2023
ff88e6c
intrinsic fix
LeonhardFS Jul 8, 2023
d1f70f0
fix snprintf function signature
Jul 8, 2023
a4d4f93
fix string indexing in tuple expr
Jul 8, 2023
83380d8
add fallback for non sse4.3 platforms for generated csv parser
Jul 9, 2023
62b14a7
fix string rep
Jul 9, 2023
90df79a
wip, trying to fix iterators
Jul 9, 2023
16d5ccb
fix for compile with old llvm9
Jul 9, 2023
79335ba
wrong ptr type
Jul 9, 2023
7f18c26
assert fix
Jul 9, 2023
75a8e93
wip, fixing up dependencies. Need to address ninja error
Jul 10, 2023
d085b8d
fix for ninja
Jul 10, 2023
ed7c1c9
csv fix
Jul 10, 2023
c1b6578
add cmake module
Jul 13, 2023
fa48939
fix global str const/regex shared object propagation
Jul 13, 2023
2b3690d
fix constants
Jul 13, 2023
c4de8f0
fix str split
Jul 14, 2023
7eb83b1
fix join test
Jul 15, 2023
dc85178
fix pushdown
Jul 15, 2023
99dae08
fix alloc for boolean decode
Jul 15, 2023
0272f3a
fix exception source task builder
Jul 16, 2023
5022c22
fix pushdown
Jul 16, 2023
70acbec
fix index test
Jul 17, 2023
0ef2a34
fixing iterator
Jul 18, 2023
567cdb5
more iterator fixes
Jul 18, 2023
d6455d1
fixes for storing variables
Jul 18, 2023
5cc96f9
fix tuple var store in declare variables
Jul 18, 2023
7b5d65a
fix for str iterator
Jul 18, 2023
b1b7d1a
fixing range iterator
Jul 19, 2023
26327eb
wip, need list size explicitly
Jul 23, 2023
f283b2d
fix reverse iterator with sext
Jul 24, 2023
4284509
add list comprehension
Jul 24, 2023
2512945
fixed size list fix
Jul 25, 2023
27ea8cc
fixing enumerate iterator
Jul 25, 2023
77a48f7
zip iterator fixes
Jul 25, 2023
b34784a
empty iterator fixes
Jul 25, 2023
cfbe541
fixes
Jul 26, 2023
7d7397d
fix type of nested iter
Jul 26, 2023
955980c
range based fix
Jul 26, 2023
76de5b1
fix list subscript for pointers being passed
Jul 26, 2023
e5fe7e4
fix for list load
Jul 26, 2023
aa21292
fix all iterator tests
Jul 26, 2023
c7b7cc8
fix regex load
Jul 26, 2023
b41ffc0
str.join fixes
Jul 26, 2023
c6c38f5
fix for list [] subscript
Jul 26, 2023
54e3cc0
some more list fixes
Jul 27, 2023
825a281
fix serialization in ft with typed load
Jul 27, 2023
46accbd
typed load for regex sub
Jul 27, 2023
7b80069
variable fixes and refactor
Jul 27, 2023
9538850
update re list access
Jul 27, 2023
1dcb3dd
fixing list_load
Jul 28, 2023
196838c
typed load for joins
Jul 28, 2023
4f3f629
revert pass-by ref for pyobject
Jul 28, 2023
3947668
consider pyobject as immutable for now
Jul 28, 2023
885cc02
match object fix
Jul 28, 2023
a7776a8
list fix
Jul 28, 2023
23ca861
refactor into homogenous tuple get function
Jul 28, 2023
d697d9b
fix list in
Jul 28, 2023
ce89597
fix 311 str split test
Jul 31, 2023
053a13a
fix random choice
Jul 31, 2023
4adf584
fix for null speculation, generate code for calls producing exceptions
Jul 31, 2023
b697a45
llvm16 compile fix
Jul 31, 2023
252d8b7
test for parser fails right now
Jul 31, 2023
4e81383
antlr update
LeonhardFS Jul 31, 2023
b33b557
M1 fixes
Aug 1, 2023
687cb88
fix llvm16 pointer for m1
Aug 1, 2023
770b201
fix join bucket
Aug 1, 2023
4b2d0c5
remove debug print
Aug 1, 2023
3ddd653
fix llvm fallback codegen for csv row parse
Aug 2, 2023
15df0c2
fix python3.11 global extract
LeonhardFS Aug 10, 2023
5755f3c
fix parseboolean gep
LeonhardFS Aug 10, 2023
59c11f7
fix homogeneous tuple
LeonhardFS Aug 10, 2023
6ddbd70
fixing flights bug
LeonhardFS Aug 15, 2023
0c2fdfe
error
LeonhardFS Aug 16, 2023
25361c0
fix python
LeonhardFS Aug 24, 2023
a807fa3
projection fixes
LeonhardFS Aug 25, 2023
801307d
fixes
Aug 28, 2023
f6bee20
fix bug
LeonhardFS Aug 28, 2023
a1f0556
wip joins
LeonhardFS Aug 29, 2023
64a8cb1
fix rename logic
LeonhardFS Aug 29, 2023
d874625
fix tests
LeonhardFS Aug 30, 2023
d20e059
update ci scripts
LeonhardFS Sep 2, 2023
930f567
fix docker
LeonhardFS Sep 11, 2023
47e23a7
update scripts for ci
Sep 12, 2023
6bb19ad
more script updates
Sep 12, 2023
1839efb
fixes
Sep 12, 2023
8b285a9
fix
Sep 12, 2023
87e2a42
changes
Sep 13, 2023
34fd173
wip, cleanup docker scripts
Sep 15, 2023
006c5f7
openssl
Sep 15, 2023
9ae2674
wip
Sep 19, 2023
3f1411b
update ci
Sep 20, 2023
7c45504
fix
Sep 20, 2023
58b1cf6
fix typo
Sep 20, 2023
0c2f24f
wip
Sep 20, 2023
045adf2
force to newer nlohman::json for gcc10 bug
Sep 20, 2023
60d3636
features
LeonhardFS Sep 25, 2023
1c93e5b
remove old antlr
LeonhardFS Sep 26, 2023
ab5572b
cmake fixes b.c. of protobuf
LeonhardFS Sep 27, 2023
211978b
more proto fixes
LeonhardFS Sep 27, 2023
f172bc1
cmake fixes
LeonhardFS Sep 28, 2023
1a2c784
wip
LeonhardFS Oct 10, 2023
0371aeb
cmake fixes
Oct 10, 2023
33ceb06
add runtime to generation targets
Oct 10, 2023
32afc3f
github action matrix
Oct 10, 2023
31b473f
cmake cleanup
Oct 10, 2023
8c8f735
add macos, and build for now only Python3.11 before all docker images…
Oct 10, 2023
c268c1d
select update
Oct 10, 2023
ab1440c
next macos try
Oct 10, 2023
e4f6806
use more recent cibuildwheel
Oct 10, 2023
67d9a76
action checkout
Oct 10, 2023
9cecda0
update macos dependencies
Oct 10, 2023
b513745
create all relevant images
Oct 11, 2023
cbc27cc
remove old scripts, update aws sdk script for cibuildwheel
Oct 11, 2023
6d1c938
improving aws sdk
LeonhardFS Oct 11, 2023
d8b11a4
docker build update
Oct 11, 2023
b506781
use default install prefix for aws sdk
Oct 11, 2023
b9a155f
change deploy-macos.sh for antlr to support minimum target
Oct 11, 2023
9412d1d
mac runner fixes
Oct 11, 2023
198afcb
image creation fixes
Oct 11, 2023
7760541
update java version, full image creation script
Oct 11, 2023
f4cda2f
java home
Oct 11, 2023
26b9db1
another java update
Oct 11, 2023
6c49251
update llvm to llvm 16.0.6
LeonhardFS Oct 11, 2023
900cfaf
include runtime as target
LeonhardFS Oct 11, 2023
a3da65f
improve lambda build script to accept versioned python
LeonhardFS Oct 12, 2023
d7e4f6e
update action script
Oct 12, 2023
9d55eea
another update
Oct 12, 2023
01f30a2
no version check yet
Oct 12, 2023
36d2fd8
another ci update
Oct 12, 2023
865b07c
full matrix, include linux runner in wheel, remove commented code and…
Oct 12, 2023
f7b7dba
PR cleanup
Oct 12, 2023
d71d771
more comments/code cleanup
Oct 12, 2023
8d8b1ea
fix create lambda zip, use full python version to identify boost
Oct 12, 2023
2fa03a8
more cleanup, changing scripts to produce dirs /opt/boost/python3.x
Oct 12, 2023
8eeb3c5
cleanup fixes
Oct 12, 2023
1ae4dca
final cleanup
LeonhardFS Oct 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 41 additions & 80 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,108 +4,69 @@ on: [push, pull_request, workflow_dispatch]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheel on ${{ matrix.os }} - py ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-10.15, macos-11, macos-12 ]

os: [ ubuntu-20.04, macos-11 ]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: ubuntu-20.04
python-version: "3.8"
cibw-build: "cp38-manylinux_x86_64"
- os: ubuntu-20.04
python-version: "3.9"
cibw-build: "cp39-manylinux_x86_64"
- os: ubuntu-20.04
python-version: "3.10"
cibw-build: "cp310-manylinux_x86_64"
- os: ubuntu-20.04
python-version: "3.11"
cibw-build: "cp311-manylinux_x86_64"
- os: macos-11
python-version: "3.8"
cibw-build: "cp38-macosx_x86_64"
- os: macos-11
python-version: "3.9"
cibw-build: "cp39-macosx_x86_64"
- os: macos-11
python-version: "3.10"
cibw-build: "cp310-macosx_x86_64"
- os: macos-11
python-version: "3.11"
cibw-build: "cp311-macosx_x86_64"
steps:
- uses: actions/checkout@v2

# this will create a dummy dev version based on the current time to avoid conflicts on test.pypi.org
- name: Create dev version
if: github.event_name != 'push' || startsWith(github.event.ref, 'refs/tags/v') != true
run: cd ./scripts && pip3 install requests && python3 set_version.py --dev
shell: bash
- uses: actions/checkout@v3

# need to make this an intermediate step, i.e. build first the different lambda runners on Ubuntu...
- name: Build Lambda runner (Linux only)
if: runner.os != 'macOS'
run: docker pull registry-1.docker.io/tuplex/ci:latest && bash ./scripts/create_lambda_zip.sh && mkdir -p ./tuplex/python/tuplex/other && cp ./build-lambda/tplxlam.zip ./tuplex/python/tuplex/other
run: docker pull registry-1.docker.io/tuplex/ci:${{ matrix.python-version }} && export PYTHON3_VERSION=${{ matrix.python-version }}.0 && bash ./scripts/create_lambda_zip.sh && mkdir -p ./tuplex/python/tuplex/other && cp ./build-lambda/tplxlam.zip ./tuplex/python/tuplex/other
shell: bash

- name: Build wheels
#if: runner.os != 'macOS'
uses: pypa/cibuildwheel@v1.11.1.post1
uses: pypa/cibuildwheel@fff9ec32ed25a9c576750c91e06b410ed0c15db7 # hash corresponds to v2.16.2
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: native
CIBW_MANYLINUX_X86_64_IMAGE: 'registry-1.docker.io/tuplex/ci:latest'
# build python 3.7, 3.8, 3.9 on linux.
# only build python 3.9 on macos

# production version:
# no musllinux yet, no 3.10 support yet.
CIBW_BUILD: "cp3{7,8,9}-*"
CIBW_SKIP: "cp3{5,6}-macosx* pp* *-musllinux_*"
CIBW_MANYLINUX_X86_64_IMAGE: "registry-1.docker.io/tuplex/ci:${{ matrix.python-version }}"
CIBW_BUILD: ${{ matrix.cibw-build }}

# do not use build, b.c. it will fail on subsequent. setup once.
CIBW_BEFORE_ALL_MACOS: bash ./scripts/macos/install_antlr4_cpp_runtime.sh && bash ./scripts/macos/brew_dependencies.sh && bash ./scripts/macos/install_aws-sdk-cpp.sh
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7"
# macOS dependencies separate, for linux use docker tuplex/ci:3.x images.
CIBW_BEFORE_ALL_MACOS: bash ./scripts/macos/install_antlr4_cpp_runtime.sh && bash ./scripts/macos/brew_dependencies.sh && bash ./scripts/macos/install_aws-sdk-cpp.sh && echo 'export PATH="/usr/local/opt/openjdk@11/bin:$PATH"' >> /Users/runner/.bash_profile

# set this environment variable to include the Lambda zip from the previous build step
# do not include Lambda runner in macos wheel yet. Do in future release.
# bundle aws runner with linux wheel, remove environment variable TUPLEX_LAMBDA_ZIP to remove runner.
CIBW_ENVIRONMENT_LINUX: "TUPLEX_LAMBDA_ZIP='./tuplex/python/tuplex/other/tplxlam.zip' CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' LD_LIBRARY_PATH=/usr/local/lib:/opt/lib"

# use following line to bundle Lambda runner:
# CIBW_ENVIRONMENT_LINUX: "TUPLEX_LAMBDA_ZIP='./tuplex/python/tuplex/other/tplxlam.zip' CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' LD_LIBRARY_PATH=/usr/local/lib:/opt/lib"
# yet, because PyPi limit hasn't been increased yet, do not bundle runner.
CIBW_ENVIRONMENT_LINUX: "CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' LD_LIBRARY_PATH=/usr/local/lib:/opt/lib"
# requires 10.13 at least for macos!
CIBW_ENVIRONMENT_MACOS: "CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON'"
# requires macOS 10.13 at least to build because of C++17 features.
CIBW_ENVIRONMENT_MACOS: "CMAKE_ARGS='-DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON' JAVA_HOME=${JAVA_HOME_11_X64}"

- name: reorganize files
run: touch ./scripts/dummy.version && cp ./scripts/*.version ./wheelhouse && cp ./.github/scripts/test_pypi.sh ./wheelhouse

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: |
./wheelhouse/*.whl
./wheelhouse/*.version
./wheelhouse/test_pypi.sh

# cf. https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
# potentially also create a sdist.
upload_pypi:
needs: [ build_wheels ]
runs-on: ubuntu-20.04
# remove repository url to publish to default pypi.
# upload to PyPI on every tag starting with 'v' ONLY on official tuplex repo.
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && github.repository == 'tuplex/tuplex'
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: remove test files
run: rm dist/*.version && rm dist/*.sh

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}

upload_testpypi:
needs: [ build_wheels ]
runs-on: ubuntu-20.04
# inverse condition, always create test release, any repo with passwords can work with this.
# note, pull requests are not sharing secrets...
if: github.event_name != 'pull_request' && (github.event_name != 'push' || startsWith(github.event.ref, 'refs/tags/v') != true)
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- name: reorganize
run: mkdir -p scripts && mv dist/*.sh ./scripts/ && mv dist/*.version ./scripts/ && chmod +x ./scripts/test_pypi.sh

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: ${{ secrets.pypi_user }}
password: ${{ secrets.pypi_password }}
repository_url: https://test.pypi.org/legacy/ # uncomment for test purposes
./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion benchmarks/zillow/Z1/baseline/fmt/include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ template <typename T, typename Context> class arg_converter {
} else {
if (is_signed) {
// glibc's printf doesn't sign extend arguments of smaller types:
// std::printf("%lld", -42); // prints "4294967254"
// std::printf(""%" PRId64", -42); // prints "4294967254"
// but we don't have to do the same because it's a UB.
arg_ = internal::make_arg<Context>(static_cast<long long>(value));
} else {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/zillow/Z2/baseline/fmt/include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ template <typename T, typename Context> class arg_converter {
} else {
if (is_signed) {
// glibc's printf doesn't sign extend arguments of smaller types:
// std::printf("%lld", -42); // prints "4294967254"
// std::printf(""%" PRId64", -42); // prints "4294967254"
// but we don't have to do the same because it's a UB.
arg_ = internal::make_arg<Context>(static_cast<long long>(value));
} else {
Expand Down
2 changes: 1 addition & 1 deletion doc/source/gettinginvolved.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Go to ``BlockGeneratorVisitor.cc`` and edit the
.. code-block:: c++

llvm::Value *
BlockGeneratorVisitor::compareInst(llvm::IRBuilder<>& builder, llvm::Value *L, const python::Type &leftType, const TokenType &tt,
BlockGeneratorVisitor::compareInst(codegen::IRBuilder&builder, llvm::Value *L, const python::Type &leftType, const TokenType &tt,
llvm::Value *R, const python::Type &rightType)

function to add support for the ``is`` tokens you added. You can use ``error(...)`` to fail on bad comparison expressions involving ``is`` as discussed above.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
"cloudpickle",
"numpy",
"ninja; sys_platform != 'win32'",
"cmake>=3.19,<3.22",
"cmake>=3.25",
"delocate; sys.platform == 'darwin'",
"auditwheel; sys.platform == 'linux'",
"requests"
Expand Down
42 changes: 28 additions & 14 deletions scripts/create_lambda_zip.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
#!/usr/bin/env bash
# (c) 2021 Tuplex team
# (c) 2017-2023 Tuplex team
# this script creates a deployable AWS Lambda zip package using docker

set -euxo pipefail

# exact python versions AWS uses:
# Python 3.9 runtime --> Python 3.9.8
# Python 3.8 runtime --> Python 3.8.11
PYTHON3_VERSION=3.9.8
echo ">>> Building Lambda runner"
DEFAULT_PYTHON3_VERSION=$(python3 --version | cut -d ' ' -f2)
echo "-- detected system python version is ${DEFAULT_PYTHON3_VERSION}"
echo "-- to specify different Python3 version, set environment variable PYTHON3_VERSION, e.g. export PYTHON3_VERSION=3.9"

PYTHON3_VERSION="${PYTHON3_VERSION:-$DEFAULT_PYTHON3_VERSION}"
PYTHON3_MAJMIN=${PYTHON3_VERSION%.*}
DOCKER_IMAGE=tuplex/ci:${PYTHON3_MAJMIN}

# check which Python version is installed in /opt/lambda-python/bin/python3
DOCKER_PYTHON3_VERSION=$(docker run -e LD_LIBRARY_PATH=/opt/lambda-python/lib $DOCKER_IMAGE /opt/lambda-python/bin/python3 --version | cut -d ' ' -f2)

# this script creates a deployable AWS Lambda zip package using docker
echo "-- detected docker Python3 version ${DOCKER_PYTHON3_VERSION}"

## make sure maj.min version matches
if [ "${DOCKER_PYTHON3_VERSION%.*}" -ne "${PYTHON3_VERSION%.*}" ]; then
echo "ERROR: Python maj.min versions do not match, Docker has ${DOCKER_PYTHON3_VERSION%.*} but desired version is ${PYTHON3_VERSION%.*}."
exit 1
fi

# check from where script is invoked
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"

echo "Executing buildwheel script located in $CWD"
echo "-- Executing buildwheel script located in $CWD"
pushd $CWD > /dev/null
cd .. # go to root of repo

# start code here...

LOCAL_BUILD_FOLDER=build-lambda
SRC_FOLDER=tuplex
DOCKER_IMAGE=tuplex/ci

# convert to absolute paths
get_abs_filename() {
Expand All @@ -31,9 +44,10 @@ get_abs_filename() {

LOCAL_BUILD_FOLDER=$(get_abs_filename $LOCAL_BUILD_FOLDER)
SRC_FOLDER=$(get_abs_filename $SRC_FOLDER)
echo "Tuplex source: $SRC_FOLDER"
echo "Building lambda in: $LOCAL_BUILD_FOLDER"

LLVM_ROOT_PATH=/opt/llvm-16.0.6
echo "-- Tuplex source: $SRC_FOLDER"
echo "-- Building lambda in: $LOCAL_BUILD_FOLDER"
echo "-- LLVM folder: ${LLVM_ROOT_PATH}"
mkdir -p $LOCAL_BUILD_FOLDER

echo "starting docker (this might take a while...)"
Expand All @@ -49,12 +63,12 @@ echo "starting docker (this might take a while...)"
# only release works, b.c. of size restriction
BUILD_TYPE=Release

docker run --name lambda --rm -v $SRC_FOLDER:/code/tuplex -v $LOCAL_BUILD_FOLDER:/build tuplex/ci bash -c "export LD_LIBRARY_PATH=/opt/lambda-python/lib:\$LD_LIBRARY_PATH && /opt/lambda-python/bin/python${PYTHON3_MAJMIN} -m pip install cloudpickle numpy && cd /build && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILD_FOR_LAMBDA=ON -DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON -DPYTHON3_EXECUTABLE=/opt/lambda-python/bin/python${PYTHON3_MAJMIN} -DBOOST_ROOT=/opt/boost/python${PYTHON3_MAJMIN}/ -GNinja /code/tuplex && cmake --build . --target tplxlam && python${PYTHON3_MAJMIN} /code/tuplex/python/zip_cc_runtime.py --input /build/dist/bin/tplxlam --runtime /build/dist/bin/tuplex_runtime.so --python /opt/lambda-python/bin/python${PYTHON3_MAJMIN} --output /build/tplxlam.zip"
docker run --name lambda --rm -v $SRC_FOLDER:/code/tuplex -v $LOCAL_BUILD_FOLDER:/build ${DOCKER_IMAGE} bash -c "export LD_LIBRARY_PATH=/opt/lambda-python/lib:/opt/lib:/opt/lib64:\$LD_LIBRARY_PATH && /opt/lambda-python/bin/python${PYTHON3_MAJMIN} -m pip install cloudpickle numpy && cd /build && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DLLVM_ROOT_DIR=${LLVM_ROOT_PATH} -DBUILD_FOR_LAMBDA=ON -DBUILD_WITH_AWS=ON -DBUILD_WITH_ORC=ON -DPYTHON3_EXECUTABLE=/opt/lambda-python/bin/python${PYTHON3_MAJMIN} -DBOOST_ROOT=/opt/boost/python${PYTHON3_MAJMIN}/ -GNinja /code/tuplex && cmake --build . --target runtime && cmake --build . --target tplxlam && python${PYTHON3_MAJMIN} /code/tuplex/python/zip_cc_runtime.py --input /build/dist/bin/tplxlam --runtime /build/dist/bin/tuplex_runtime.so --python /opt/lambda-python/bin/python${PYTHON3_MAJMIN} --output /build/tplxlam.zip"
DOCKER_EXIT_CODE=$?
if [ "${DOCKER_EXIT_CODE}" -eq "0" ]; then
echo "docker command run, zipped Lambda file can be found in: ${LOCAL_BUILD_FOLDER}/tplxlam.zip"
echo "-- docker command run, zipped Lambda file can be found in: ${LOCAL_BUILD_FOLDER}/tplxlam.zip"
else
echo "build failed"
echo "ERROR: build failed"
popd > /dev/null
exit 1
fi
Expand Down
73 changes: 34 additions & 39 deletions scripts/docker/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,54 @@
# (c) 2017-2022 Tuplex team
FROM quay.io/pypa/manylinux2014_x86_64


MAINTAINER "Tuplex project@Brown"

# select core versions to use when building CI image here
ARG PYTHON_VERSION=3.11.5
ARG CMAKE_VERSION=3.27.5
ARG BOOST_VERSION=1.79.0

# image is centos based, so use yum as package manager
# --> install_llvm uses most recent 16 release.

# set link to desired python version, note that ${PYTHON_VERSION%.*} gives for e.g. 3.x.y -> 3.x
RUN ln -sf /usr/local/bin/python${PYTHON_VERSION%.*} /usr/local/bin/python3 && /usr/local/bin/python3 --version

RUN yum update -y && yum install -y dnf && dnf install -y git autoconf zip wget

# add script files from local dir
RUN mkdir -p /opt/sbin

ADD install_cmake.sh /opt/sbin/install_cmake.sh
RUN bash /opt/sbin/install_cmake.sh amd64 linux ${CMAKE_VERSION} /usr/local

ADD install_boost.sh /opt/sbin/install_boost.sh
ADD install_tuplex_reqs.sh /opt/sbin/install_tuplex_reqs.sh
ADD install_llvm.sh /opt/sbin/install_llvm.sh

# cmake not required to be installed, because recent image has cmake 3.20
# it uses gcc 9.3.1
ADD install_llvm.sh /opt/sbin/install_llvm.sh

# CentOS/RHEL does not use OpenSSL for the system curl, however AWSSDK must use OpenSSL backed curl.
ADD install_curl.sh /opt/sbin/install_curl.sh

# image is centos based, so use yum as package manager
# --> install_llvm uses most recent 9 release.

RUN yum update -y
RUN yum install -y wget

# llvm-9 on yum repo might be broken, use manually built llvm
RUN bash /opt/sbin/install_llvm.sh

# install curl now
RUN bash /opt/sbin/install_curl.sh

# install boost-python for 3.7, 3.8, 3.9, 3.10
RUN bash /opt/sbin/install_boost.sh /opt/python/cp37-cp37m/bin/python3.7 /opt/boost/python3.7
RUN bash /opt/sbin/install_boost.sh /opt/python/cp38-cp38//bin/python3.8 /opt/boost/python3.8
RUN bash /opt/sbin/install_boost.sh /opt/python/cp39-cp39/bin/python3.9 /opt/boost/python3.9
RUN bash /opt/sbin/install_boost.sh /opt/python/cp310-cp310/bin/python3.10 /opt/boost/python3.10

# install boost-python for given version
RUN bash /opt/sbin/install_boost.sh /usr/local/bin/python3 /opt/boost/python${PYTHON_VERSION%.*} ${BOOST_VERSION}

# Update pip versions
RUN python3.7 -m pip install --upgrade pip setuptools wheel
RUN python3.8 -m pip install --upgrade pip setuptools wheel
RUN python3.9 -m pip install --upgrade pip setuptools wheel
RUN python3.10 -m pip install --upgrade pip setuptools wheel

# matrix?
RUN python3.7 -m pip install 'cloudpickle<2.0' cython numpy pandas
RUN python3.8 -m pip install 'cloudpickle<2.0' cython numpy pandas
RUN python3.9 -m pip install 'cloudpickle<2.0' numpy pandas
RUN python3.10 -m pip install 'cloudpickle>2.0' numpy pandas

# tuplex requirements
RUN /usr/local/bin/python3 -m pip install --upgrade pip setuptools wheel

# Tuplex requirements, installs python version specific requirements as well
ADD install_tuplex_reqs.sh /opt/sbin/install_tuplex_reqs.sh
RUN bash /opt/sbin/install_tuplex_reqs.sh

# add lambda-specific Python 3.8 (full python install)
# add lambda-specific Python (full python install), for correct shipping Python must be built with correct flags
ADD install_lambda_python.sh /opt/sbin/install_lambda_python.sh
RUN bash /opt/sbin/install_lambda_python.sh
RUN bash /opt/sbin/install_lambda_python.sh ${PYTHON_VERSION}

# install llvm, use here script which uses 16.0.6 to enable recent CPU architectures
RUN bash /opt/sbin/install_llvm.sh

## MongoDB community edition for WebUI testing
ADD mongodb-org-5.0.repo /etc/yum.repos.d/mongodb-org-5.0.repo
Expand All @@ -66,11 +62,10 @@ RUN yum update -y && yum install -y mongodb-org
RUN bash /opt/sbin/install_curl.sh

# remove all the tmp stuff
RUN rm -rf /tmp/*

# remove temp stuff based on https://www.getpagespeed.com/server-setup/clear-disk-space-centos
RUN curl -Ls http://bit.ly/clean-centos-disk-space | bash
RUN rm -rf /tmp/* && curl -Ls http://bit.ly/clean-centos-disk-space | bash && dnf clean all && rm -rf /var/cache/yum

# install additional libraries for debugging
RUN yum install -y centos-release-scl-rh devtoolset-11-libtsan-devel devtoolset-10-libtsan-devel
RUN yum install -y devtoolset-11-libasan-devel devtoolset-10-libasan-devel
# uncomment following to install optional packages for debugging
# RUN yum install -y devtoolset-10-gdb
# RUN yum install -y centos-release-scl-rh devtoolset-11-libtsan-devel devtoolset-10-libtsan-devel
# RUN yum install -y devtoolset-11-libasan-devel devtoolset-10-libasan-devel
Loading