-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add scripts to build asm/wasm and portable linux + add github action to draft release on tag #60
Conversation
This gets us back to glibc 2.27 (ubuntu 18.04) -- debian stretch would be nicer, but the default build tools (c++1x, cmake) gets slightly more interesting. The output binaries seem like they could be smaller...
objdump says we only need 2.14, and the cimbar binary runs on centos7... I see this as an absolute win
@@ -14,6 +14,9 @@ jobs: | |||
os: ubuntu-18.04 | |||
env: CXX="g++-7" CC="gcc-7" | |||
|
|||
- name: "linux gcc9" | |||
os: ubuntu-latest |
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.
Also adding ubuntu-latest, which (at the moment) seems to be gcc9.
@@ -0,0 +1,31 @@ | |||
#!/bin/sh | |||
## targeting old glibc | |||
# docker run --mount type=bind,source="$(pwd)",target="/usr/src/app" -it ubuntu:16.04 |
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 isn't fully automated yet, but the objdump -T <binfile> | grep GLIBC_ | awk '{print $(NF-1)}' | sort -V
output suggests cimbar/cimbar_send built this way will work on glibc 2.14(!) and up. 16.04 is 2.23, so that's probably the more trustworthy number -- but who knows.
That said, I did test on centos7 a bit, and it works. So that's cool.
# https://gist.github.com/jlblancoc/99521194aba975286c80f93e47966dc5 | ||
apt update | ||
apt install -y software-properties-common | ||
add-apt-repository -y ppa:ubuntu-toolchain-r/test |
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.
For g++7
@@ -0,0 +1,23 @@ | |||
#!/bin/sh | |||
#docker run --mount type=bind,source="$(pwd)",target="/usr/src/app" -it emscripten/emsdk:latest |
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'm slightly nervous about using :latest
here. We'll see.
@@ -51,6 +51,10 @@ namespace image_hash | |||
uint64_t mval = (*hax) & 0x101010101ULL; | |||
const uint8_t* cv = reinterpret_cast<const uint8_t*>(&mval); | |||
uint8_t val = cv[0] << 4 | cv[1] << 3 | cv[2] << 2 | cv[3] << 1 | cv[4]; | |||
// TODO: | |||
/*if (bigEndian) |
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.
Everything I'm targeting right now is littleendian, but this little optimization/hack will need some extra care for other platforms...
5fbface Merge pull request #60 from sz3/ci-package 9d52131 Draft a github release (with bits!) when a new tag is pushed 2010df7 It's still gcc9 1686eca Build on new ubuntu? 4ab275a a script to build cimbar.js bd87003 Ubuntu 16.04 build for glibc >= 2.23. Or 2.14(!?) 7bb1bc8 -DBUILD_PORTABLE_LINUX for static linking against opencv and libc++ 729eb7e Merge pull request #59 from sz3/bugfix-misc 9e0dae0 Compile time check is fine, I guess c05e3b5 hash difference aside, the binary differences are minor e698786 Update concurrentqueue (1.0.3) fec665f Update fmt (8.1.1) 0f2665a Upgrade intx cc6abee Update picosha2 and stb_image 39b37d9 Update wirehair 82ed9e9 oof 28559cb I think we need calib3d now? 178e02a Make CMakeLists smart enough to find opencv4 b0091d1 new catch2 to make compiler happy 52547ae Include to make g++11 happy 7c545bb cerr c5f7676 Bugfix (maybe): properly clean up old decodes f752be4 Merge pull request #58 from sz3/service-worker 19c7904 No PWA for now ef6df87 Merge pull request #57 from sz3/css-fix 8103bf0 Possibly functional? 74ceae3 add favicon... 8fa1509 Cache more stuff? clear old caches? e20a3cd WIP? cache please? 99eb349 Merge branch 'css-fix' into sw 8d4cbc9 Try using a button element? a7f663a Set zoom on the canvas element, not the whole page? d0dffa2 Slightly more responsive to window size changes 9e8e552 Fix the background css 989796b service worker attempt (doesn't work) git-subtree-dir: app/src/cpp/libcimbar git-subtree-split: 5fbface
I've been using a local script to do the wasm/asm part, but it's about time it made it into the repo.
The packaging scripts are designed to run in a docker container (and the CI will run it the same way) for the sake of my general sanity.