forked from curl/curl
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bd68c7
commit 615adce
Showing
21 changed files
with
403 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Publish coco lib for mac | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build_mac_images: | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
matrix: | ||
profile: [ "ios_armv7", "ios_armv8", "ios_x86", "ios_x86_64", "macos_x86_64" ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure | ||
run: | | ||
brew install cmake | ||
brew install autoconf | ||
brew install automake | ||
brew install libtool | ||
brew install cmocka | ||
brew install pkg-config | ||
brew install conan@1 | ||
- name: Conan overwrite | ||
run: | | ||
echo "Overwriting conan to conan@1" | ||
brew link --overwrite conan@1 | ||
- name: Copy pofiles to conan | ||
run: | | ||
conan profile new --detect default | ||
cp toolchains/apple/profiles/* $HOME/.conan/profiles | ||
- name: Add elear conan server | ||
run: | | ||
conan remote add conan_server http://conan.elear.solutions | ||
cat $HOME/.conan/remotes.json | ||
- name: Determine variant | ||
run: | | ||
release_version="master" | ||
- name: Determine version | ||
run: | | ||
echo "package_name=$(grep -e "name.=." ./conanfile.py | awk -F\" '{print $2}')" >> $GITHUB_ENV | ||
echo "package_version=$(grep -e "version.=." ./conanfile.py | awk -F\" '{print $2}')" >> $GITHUB_ENV | ||
- name: Conan build & upload | ||
env: | ||
CONAN_LOGIN_USERNAME: "jenkins" | ||
CONAN_PASSWORD: "tuXAC399nZ4wp6s81urg" | ||
package_username: "jenkins" | ||
run: | | ||
conan install . jenkins/master -if=build -r=conan_server --profile=${{ matrix.profile }} | ||
conan build . -bf=build | ||
conan export-pkg . jenkins/master -bf=build -f | ||
conan upload $package_name/$package_version@jenkins/master --all -r=conan_server --confirm |
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,29 @@ | ||
## Toolchains and use cases | ||
|
||
- Apple toolchain is for iOS (arm, arm64, x86, x86_64) & macOS (x86_64) | ||
- Android toolchain is for Android (arm, arm64, x86, x86_64) | ||
- Linux toolchain is for general purpose linux machines (alpine & ubuntu) | ||
- Goke toolchain is for building cameras | ||
- OpenWrt toolchain is for gateways | ||
|
||
## Apple toolchain info | ||
|
||
- Apple toolchains are not actually toolchains | ||
- The profiles provided are meant to be copied to ```$HOME/.conan/profiles``` folder | ||
- Depending on the necessity, appropriate profile must be used | ||
|
||
## Building | ||
- Some toolchains need additional files to be added which are available to download [here](https://drive.google.com/drive/folders/1V0Ol2-PnoEkpx0Z7W4DyQtb5CKidXbL3) | ||
- For building android toolchain, download the ```android-ndk-r25c-linux.tar.gz``` and place it in the ```android``` folder | ||
- For building goke toolchain, download the ```toolchain_goke_armv6.tar.gz``` and place it in the ```linux/goke``` folder | ||
- For building openwrt toolchain, download the ```toolchain_openwrt_mips.tar.gz``` and place it in the ```linux/openwrt``` folder | ||
- Docker command for building the toolchains: ```docker build . -t docker-reg.elear.solutions/dev/tools/<toolchain_name>:<version>``` | ||
- Docker command for pushing to docker registry: ```docker push docker-reg.elear.solutions/dev/tools/<toolchain_name>:<version>``` | ||
|
||
toolchain | toolchain name | ||
----------|-------------- | ||
android | toolchain_android | ||
ubuntu | toolchain_ubuntu | ||
alpine | toolchain_alpine | ||
goke | toolchain_goke_armv6 | ||
openwrt | toolchain_openwrt_mips |
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,31 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ADD android-ndk-r25c-linux.tar.gz /opt/ | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
make \ | ||
cmake \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
curl \ | ||
python3 \ | ||
pkg-config \ | ||
ncurses-dev \ | ||
texinfo \ | ||
ca-certificates-java \ | ||
openjdk-8-jdk \ | ||
git | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py && \ | ||
python3 /tmp/get-pip.py && \ | ||
pip3 install conan==1.60.1 | ||
|
||
RUN conan remote add conan_server http://conan.elear.solutions | ||
|
||
COPY ./profiles/ /root/.conan/profiles/ | ||
|
||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ | ||
ENV ANDROID_NDK /opt/android-ndk-r25c/ | ||
ENV CONAN_DEFAULT_PROFILE_PATH /root/.conan/profiles/android_armv8 |
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,10 @@ | ||
include(android_base) | ||
|
||
[settings] | ||
os=Android | ||
os.api_level=19 | ||
arch=armv7 | ||
|
||
[env] | ||
CC=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang | ||
CXX=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang++ |
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,10 @@ | ||
include(android_base) | ||
|
||
[settings] | ||
os=Android | ||
os.api_level=21 | ||
arch=armv8 | ||
|
||
[env] | ||
CC=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang | ||
CXX=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ |
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,15 @@ | ||
[settings] | ||
compiler=clang | ||
compiler.version=14 | ||
compiler.libcxx=c++_shared | ||
build_type=Release | ||
|
||
[env] | ||
CONAN_CMAKE_FIND_ROOT_PATH=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot | ||
AR=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar | ||
AS=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as | ||
RANLIB=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib | ||
LD=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/ld | ||
STRIP=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip | ||
CFLAGS=--sysroot=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot | ||
CXXFLAGS=--sysroot=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot |
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,10 @@ | ||
include(android_base) | ||
|
||
[settings] | ||
os=Android | ||
os.api_level=19 | ||
arch=x86 | ||
|
||
[env] | ||
CC=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android19-clang | ||
CXX=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android19-clang++ |
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,10 @@ | ||
include(android_base) | ||
|
||
[settings] | ||
os=Android | ||
os.api_level=21 | ||
arch=x86_64 | ||
|
||
[env] | ||
CC=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang | ||
CXX=/opt/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang++ |
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,6 @@ | ||
include(macos_x86_64) | ||
|
||
[settings] | ||
os=iOS | ||
os.version=10.0 | ||
arch=armv7 |
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,6 @@ | ||
include(macos_x86_64) | ||
|
||
[settings] | ||
os=iOS | ||
os.version=10.0 | ||
arch=armv8 |
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,6 @@ | ||
include(macos_x86_64) | ||
|
||
[settings] | ||
os=iOS | ||
os.version=10.0 | ||
arch=x86 |
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,6 @@ | ||
include(macos_x86_64) | ||
|
||
[settings] | ||
os=iOS | ||
os.version=10.0 | ||
arch=x86_64 |
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,7 @@ | ||
include(default) | ||
|
||
[build_requires] | ||
darwin-toolchain/1.0.8@theodelrieu/stable | ||
|
||
[settings] | ||
arch=x86_64 |
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 @@ | ||
FROM alpine:3.9 | ||
|
||
RUN apk update && \ | ||
apk add --no-cache \ | ||
binutils \ | ||
make \ | ||
cmake \ | ||
libgcc \ | ||
musl-dev \ | ||
gcc \ | ||
g++ \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
linux-headers \ | ||
lua \ | ||
lua-dev \ | ||
openssl \ | ||
curl \ | ||
python3 \ | ||
pkgconfig \ | ||
ncurses-dev \ | ||
texinfo \ | ||
postgresql-dev \ | ||
git \ | ||
curl-dev \ | ||
openssl-dev \ | ||
zlib-dev | ||
|
||
RUN curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o /tmp/get-pip.py && \ | ||
python3 /tmp/get-pip.py && \ | ||
pip3 install conan==1.60.1 | ||
|
||
RUN conan remote add conan_server http://conan.elear.solutions && \ | ||
conan profile new --detect default | ||
|
||
COPY ./profiles/ /root/.conan/profiles/ | ||
|
||
ENV CONAN_DEFAULT_PROFILE_PATH /root/.conan/profiles/alpine_x86_64 |
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,5 @@ | ||
include(default) | ||
|
||
[settings] | ||
os=Linux | ||
arch=x86_64 |
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,40 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ADD toolchain_goke_armv6.tar.gz /opt/ | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
build-essential \ | ||
make \ | ||
cmake \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
curl \ | ||
python3 \ | ||
pkg-config \ | ||
ncurses-dev \ | ||
texinfo \ | ||
upx \ | ||
git | ||
|
||
RUN dpkg --add-architecture i386 | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
libc6:i386 \ | ||
libncurses5:i386 \ | ||
libstdc++6:i386 \ | ||
zlib1g:i386 | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py && \ | ||
python3 /tmp/get-pip.py && \ | ||
pip3 install conan==1.60.1 | ||
|
||
RUN conan remote add conan_server http://conan.elear.solutions && \ | ||
conan profile new --detect default | ||
|
||
COPY ./profiles/ /root/.conan/profiles/ | ||
|
||
ENV COCO_BIT_ALIGNMENT 14 | ||
ENV CONAN_DEFAULT_PROFILE_PATH /root/.conan/profiles/goke_armv6 |
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,20 @@ | ||
[settings] | ||
os=Linux | ||
arch=armv6 | ||
compiler=gcc | ||
compiler.version=4.6 | ||
compiler.libcxx=libstdc++ | ||
build_type=Release | ||
|
||
[env] | ||
CONAN_CMAKE_FIND_ROOT_PATH=/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/sysroot/ | ||
AR=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-ar | ||
AS=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-as | ||
RANLIB=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-ranlib | ||
CC=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-gcc | ||
CXX=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-g++ | ||
LD=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-ld | ||
STRIP=/opt/toolchain_goke_armv6/4.6.1/usr/bin/arm-goke-linux-uclibcgnueabi-strip | ||
CFLAGS=--sysroot=/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/sysroot -I/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/include -L/usr/local/lib -I/usr/local/include | ||
CXXFLAGS=--sysroot=/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/sysroot -I/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/include -L/usr/local/lib -I/usr/local/include | ||
LDFLAGS=-L/opt/toolchain_goke_armv6/4.6.1/usr/arm-goke-linux-uclibcgnueabi/sysroot/usr/lib |
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,32 @@ | ||
FROM debian:11.7 | ||
|
||
ADD toolchain_openwrt_mips.tar.gz /opt/ | ||
|
||
RUN apt update && \ | ||
apt install -y \ | ||
build-essential \ | ||
make \ | ||
cmake \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
curl \ | ||
python3 \ | ||
python3-distutils \ | ||
pkg-config \ | ||
ncurses-dev \ | ||
texinfo \ | ||
upx \ | ||
git | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py && \ | ||
python3 /tmp/get-pip.py && \ | ||
pip3 install conan==1.60.1 | ||
|
||
RUN conan remote add conan_server http://conan.elear.solutions && \ | ||
conan profile new --detect default | ||
|
||
COPY ./profiles/ /root/.conan/profiles/ | ||
|
||
ENV COCO_BIT_ALIGNMENT 13 | ||
ENV CONAN_DEFAULT_PROFILE_PATH /root/.conan/profiles/openwrt_mips |
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,19 @@ | ||
[settings] | ||
os=Linux | ||
arch=mips | ||
compiler=gcc | ||
compiler.version=4.8 | ||
compiler.libcxx=libstdc++ | ||
build_type=Release | ||
|
||
[env] | ||
AR=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-ar | ||
AS=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-as | ||
RANLIB=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-ranlib | ||
LD=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-ld | ||
STRIP=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-strip | ||
CC=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-gcc | ||
CXX=/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-g++ | ||
CFLAGS=-I/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2 | ||
CXXFLAGS=-I/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2 | ||
LDFLAGS=-L/opt/OpenWrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib |
Oops, something went wrong.