add deleop of ubuntu2004.
This commit is contained in:
parent
3312cf8ba5
commit
6e555579e2
29
.drone.yml
29
.drone.yml
|
@ -12,24 +12,13 @@ steps:
|
||||||
username: 168062547@qq.com
|
username: 168062547@qq.com
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
- name: wechat
|
- name: deploy-ubuntu2004
|
||||||
image: lizheming/drone-wechat
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
corpid:
|
registry: registry.cn-shenzhen.aliyuncs.com
|
||||||
from_secret: wechat_corpid
|
repo: registry.cn-shenzhen.aliyuncs.com/amass_toolset/develop
|
||||||
corp_secret:
|
tags: ubuntu2004
|
||||||
from_secret: wechat_corp_secret
|
dockerfile: ubuntu.dockerfile
|
||||||
agent_id:
|
username: 168062547@qq.com
|
||||||
from_secret: agent_id
|
password:
|
||||||
to_user: '@all'
|
from_secret: docker_password
|
||||||
to_tag: ${DRONE_REPO_NAME}
|
|
||||||
msg_url: ${DRONE_BUILD_LINK}
|
|
||||||
safe: 1
|
|
||||||
btn_txt: more
|
|
||||||
title: ${DRONE_REPO_NAME}
|
|
||||||
message: >
|
|
||||||
{%if success %}
|
|
||||||
build {{build.number}} succeeded. Good job.
|
|
||||||
{% else %}
|
|
||||||
build {{build.number}} failed. Fix me please.
|
|
||||||
{% endif %}
|
|
31
resources/raspberrypi.cmake
Normal file
31
resources/raspberrypi.cmake
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
include_guard(GLOBAL)
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||||
|
|
||||||
|
|
||||||
|
set(COMPILER_ROOT /opt/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf)
|
||||||
|
set(CMAKE_SYSROOT /opt/RaspberryPi/sysroot)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${COMPILER_ROOT}/bin/arm-none-linux-gnueabihf-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER ${COMPILER_ROOT}/bin/arm-none-linux-gnueabihf-g++)
|
||||||
|
set(CMAKE_ASM_COMPILER ${COMPILER_ROOT}/bin/arm-none-linux-gnueabihf-as)
|
||||||
|
|
||||||
|
set(RUNTIME_PATH ${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf)
|
||||||
|
set(CROSSLINK
|
||||||
|
-Wl,-rpath=${RUNTIME_PATH}
|
||||||
|
-Wl,-rpath-link=${RUNTIME_PATH}
|
||||||
|
-Wl,-rpath=${CMAKE_SYSROOT}/lib
|
||||||
|
-Wl,-rpath=${CMAKE_SYSROOT}/lib/arm-linux-gnueabihf
|
||||||
|
ssl
|
||||||
|
crypto stdc++fs dl m
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
list(APPEND CMAKE_C_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard -I${CMAKE_SYSROOT}/usr/include/arm-linux-gnueabihf")
|
||||||
|
list(APPEND CMAKE_CXX_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard -I${CMAKE_SYSROOT}/usr/include/arm-linux-gnueabihf -I${CMAKE_SYSROOT}/usr/include/freetype2 -L${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf")
|
||||||
|
|
||||||
|
|
||||||
|
set(ENV{PKG_CONFIG_PATH} "")
|
||||||
|
set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig:${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig:${CMAKE_SYSROOT}/opt/vc/lib/pkgconfig)
|
||||||
|
set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
|
||||||
|
|
34
resources/sysroot-relativelinks.py
Normal file
34
resources/sysroot-relativelinks.py
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
# source: https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
|
||||||
|
|
||||||
|
# Take a sysroot directory and turn all the absolute symlinks and turn them into
|
||||||
|
# relative ones such that the sysroot is usable within another system.
|
||||||
|
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage is " + sys.argv[0] + "<directory>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
topdir = sys.argv[1]
|
||||||
|
topdir = os.path.abspath(topdir)
|
||||||
|
|
||||||
|
def handlelink(filePath, subdir):
|
||||||
|
link = os.readlink(filePath)
|
||||||
|
if link[0] != "/":
|
||||||
|
return
|
||||||
|
if link.startswith(topdir):
|
||||||
|
return
|
||||||
|
|
||||||
|
newLink = os.path.relpath(topdir+link, subdir)
|
||||||
|
|
||||||
|
print("\t%s replacing %s => %s" % (filePath, link, newLink))
|
||||||
|
os.unlink(filePath)
|
||||||
|
os.symlink(newLink, filePath)
|
||||||
|
|
||||||
|
for subdir, dirs, files in os.walk(topdir):
|
||||||
|
for file in files:
|
||||||
|
filePath = os.path.join(subdir, file)
|
||||||
|
if os.path.islink(filePath):
|
||||||
|
handlelink(filePath, subdir)
|
62
ubuntu.dockerfile
Normal file
62
ubuntu.dockerfile
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
LABEL maintainer 168062547@qq.com
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
|
||||||
|
sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install -y wget git cmake ninja-build pkg-config \
|
||||||
|
libssl-dev libcurl4-openssl-dev libffmpeg-ocaml-dev libfreetype-dev libalsa-ocaml-dev \
|
||||||
|
liblzma-dev libx264-dev gcc g++
|
||||||
|
|
||||||
|
WORKDIR /home/temp
|
||||||
|
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz && \
|
||||||
|
wget https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz && \
|
||||||
|
wget https://github.com/tfussell/xlnt/archive/refs/tags/v1.5.0.tar.gz -O xlnt-1.5.0.tar.gz
|
||||||
|
|
||||||
|
RUN tar xvf boost_1_81_0.tar.gz && \
|
||||||
|
tar xvf zeromq-4.3.4.tar.gz && \
|
||||||
|
tar xvf xlnt-1.5.0.tar.gz
|
||||||
|
|
||||||
|
WORKDIR /home/temp/boost_1_81_0
|
||||||
|
RUN ./bootstrap.sh --prefix=/opt/Libraries/boost_1_81_0
|
||||||
|
RUN ./b2 install -q --prefix=/opt/Libraries/boost_1_81_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC
|
||||||
|
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/Libraries/boost_1_81_0/lib"
|
||||||
|
|
||||||
|
WORKDIR /home/temp/zeromq-4.3.4/build
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/zeromq-4.3.4_debug \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
RUN rm -fr ./*
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/zeromq-4.3.4_release \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
|
||||||
|
WORKDIR /home/temp/xlnt-1.5.0/build
|
||||||
|
RUN sed -i '1s/^/#include <limits>\n/' ../source/detail/number_format/number_formatter.cpp
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/xlnt-1.5.0_debug \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
RUN rm -fr ./*
|
||||||
|
RUN cmake \
|
||||||
|
-G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/opt/Libraries/xlnt-1.5.0_release \
|
||||||
|
..
|
||||||
|
RUN ninja install
|
||||||
|
RUN bash -c "sed -i -e 's/set_and_check(XLNT_INCLUDE_DIR \"include\")/# set_and_check(XLNT_INCLUDE_DIR \"include\")/g' /opt/Libraries/xlnt-1.5.0_debug/lib/cmake/xlnt/XlntConfig.cmake &&\
|
||||||
|
sed -i -e 's/set_and_check(XLNT_INCLUDE_DIR \"include\")/# set_and_check(XLNT_INCLUDE_DIR \"include\")/g' /opt/Libraries/xlnt-1.5.0_release/lib/cmake/xlnt/XlntConfig.cmake"
|
||||||
|
WORKDIR /
|
||||||
|
RUN rm -fr /home/temp
|
||||||
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
|
# docker build -f ubuntu.dockerfile -t develop:22.04 .
|
Loading…
Reference in New Issue
Block a user