-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
24 changed files
with
302 additions
and
263 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,15 @@ | ||
### How to build image (Debian Bookworm example). | ||
``` | ||
docker build \ | ||
--build-arg BUILD_NUMBER=69 \ | ||
--file .github/docker/debian/bookworm/amd64/Dockerfile \ | ||
--progress=plain \ | ||
--tag artifacts:latest \ | ||
--ulimit nofile=1024000:1024000 \ | ||
. | ||
``` | ||
|
||
### How to dump artifacts from image to current directory. | ||
``` | ||
docker save artifacts:latest | tar --ignore-command-error --strip-components=2 --to-command='tar -vxf -' -xf - | ||
``` |
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,79 @@ | ||
FROM --platform=linux/amd64 debian:bookworm AS builder | ||
|
||
ARG BUILD_NUMBER=42 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV PYENV_VERSION_TAG=v2.4.0 | ||
ENV PYTHON_VERSION=2.7.18 | ||
ENV V8_GIT_VERSION=6.1.298 | ||
ENV BUILD_DIR=/data/BUILD | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
devscripts \ | ||
git \ | ||
libbz2-dev \ | ||
libffi-dev \ | ||
libglib2.0-dev \ | ||
liblzma-dev \ | ||
libncurses5 \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
llvm \ | ||
lsb-release \ | ||
make \ | ||
ninja-build \ | ||
tk-dev \ | ||
wget \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& update-ca-certificates --fresh \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PYENV_ROOT "/opt/pyenv" | ||
ENV PATH "$PYENV_ROOT/shims:$PYENV_ROOT/bin:$BUILD_DIR/depot_tools:$PATH" | ||
|
||
RUN git clone --depth 1 --branch $PYENV_VERSION_TAG https://github.com/pyenv/pyenv.git $PYENV_ROOT \ | ||
&& sed -i 's|PATH="/|PATH="$PYENV_ROOT/bin/:/|g' /etc/profile \ | ||
&& $PYENV_ROOT/bin/pyenv init - | tee -a /etc/profile \ | ||
&& echo "export PATH=\"$BUILD_DIR/depot_tools:${PATH}\"" | tee -a /etc/profile | ||
|
||
RUN pyenv install $PYTHON_VERSION \ | ||
&& pyenv global $PYTHON_VERSION | ||
|
||
ENTRYPOINT ["/bin/bash", "-l"] | ||
|
||
WORKDIR $BUILD_DIR | ||
|
||
COPY ./stub-gclient-spec $BUILD_DIR/.gclient | ||
|
||
RUN git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git \ | ||
&& gclient sync --verbose -r $V8_GIT_VERSION \ | ||
&& cd v8 \ | ||
&& gn gen out.gn --args="is_debug=true symbol_level=2 blink_symbol_level=1 v8_symbol_level=1 v8_static_library=true is_component_build=false v8_enable_i18n_support=false v8_use_external_startup_data=false" \ | ||
&& gn args out.gn --list | tee out.gn/gn_args.txt \ | ||
&& ninja -v d8 -C out.gn | ||
|
||
COPY ./debian $BUILD_DIR/debian | ||
|
||
RUN sed -i -e "s/GIT_VERSION/$V8_GIT_VERSION/g" debian/v8-6.1_static.pc \ | ||
&& sed -i -e "s/GIT_VERSION/$V8_GIT_VERSION/g" debian/changelog \ | ||
&& sed -i -e "s/DATE/$(env LC_ALL=en_US.utf8 date '+%a, %d %b %Y %H:%M:%S %z')/g" debian/changelog \ | ||
&& sed -i -e "s/DISTRO/$(lsb_release -sc | tr -d '\n')/g" debian/changelog \ | ||
&& sed -i -e "s/BUILD_NUMBER/$BUILD_NUMBER/g" debian/changelog \ | ||
&& debuild -b -us -uc \ | ||
&& mkdir ../OUT \ | ||
&& mv -v ../*.deb ../OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
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,79 @@ | ||
FROM --platform=linux/amd64 debian:bullseye AS builder | ||
|
||
ARG BUILD_NUMBER=42 | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV PYENV_VERSION_TAG=v2.4.0 | ||
ENV PYTHON_VERSION=2.7.18 | ||
ENV V8_GIT_VERSION=6.1.298 | ||
ENV BUILD_DIR=/data/BUILD | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
devscripts \ | ||
git \ | ||
libbz2-dev \ | ||
libffi-dev \ | ||
libglib2.0-dev \ | ||
liblzma-dev \ | ||
libncurses5 \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libssl-dev \ | ||
llvm \ | ||
lsb-release \ | ||
make \ | ||
ninja-build \ | ||
tk-dev \ | ||
wget \ | ||
xz-utils \ | ||
zlib1g-dev \ | ||
&& apt-get clean \ | ||
&& update-ca-certificates --fresh \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PYENV_ROOT "/opt/pyenv" | ||
ENV PATH "$PYENV_ROOT/shims:$PYENV_ROOT/bin:$BUILD_DIR/depot_tools:$PATH" | ||
|
||
RUN git clone --depth 1 --branch $PYENV_VERSION_TAG https://github.com/pyenv/pyenv.git $PYENV_ROOT \ | ||
&& sed -i 's|PATH="/|PATH="$PYENV_ROOT/bin/:/|g' /etc/profile \ | ||
&& $PYENV_ROOT/bin/pyenv init - | tee -a /etc/profile \ | ||
&& echo "export PATH=\"$BUILD_DIR/depot_tools:${PATH}\"" | tee -a /etc/profile | ||
|
||
RUN pyenv install $PYTHON_VERSION \ | ||
&& pyenv global $PYTHON_VERSION | ||
|
||
ENTRYPOINT ["/bin/bash", "-l"] | ||
|
||
WORKDIR $BUILD_DIR | ||
|
||
COPY ./stub-gclient-spec $BUILD_DIR/.gclient | ||
|
||
RUN git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git \ | ||
&& gclient sync --verbose -r $V8_GIT_VERSION \ | ||
&& cd v8 \ | ||
&& gn gen out.gn --args="is_debug=true symbol_level=2 blink_symbol_level=1 v8_symbol_level=1 v8_static_library=true is_component_build=false v8_enable_i18n_support=false v8_use_external_startup_data=false" \ | ||
&& gn args out.gn --list | tee out.gn/gn_args.txt \ | ||
&& ninja -v d8 -C out.gn | ||
|
||
COPY ./debian $BUILD_DIR/debian | ||
|
||
RUN sed -i -e "s/GIT_VERSION/$V8_GIT_VERSION/g" debian/v8-6.1_static.pc \ | ||
&& sed -i -e "s/GIT_VERSION/$V8_GIT_VERSION/g" debian/changelog \ | ||
&& sed -i -e "s/DATE/$(env LC_ALL=en_US.utf8 date '+%a, %d %b %Y %H:%M:%S %z')/g" debian/changelog \ | ||
&& sed -i -e "s/DISTRO/$(lsb_release -sc | tr -d '\n')/g" debian/changelog \ | ||
&& sed -i -e "s/BUILD_NUMBER/$BUILD_NUMBER/g" debian/changelog \ | ||
&& debuild -b -us -uc \ | ||
&& mkdir ../OUT \ | ||
&& mv -v ../*.deb ../OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
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,64 @@ | ||
name: Build and Distribute | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.ref }} | ||
|
||
jobs: | ||
deb: | ||
name: 'DEB' | ||
permissions: | ||
id-token: write | ||
contents: read | ||
uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main | ||
strategy: | ||
# max-parallel: 1 | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- debian | ||
version: | ||
- bookworm | ||
- bullseye | ||
platform: | ||
- name: amd64 | ||
runner: ubuntu-latest | ||
with: | ||
RUNNER: ${{ matrix.platform.runner }} | ||
ARTIFACTS_PATTERN: '.*\.(deb)$' | ||
DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile | ||
MAINTAINER: 'Andrey Volk <[email protected]>' | ||
META_FILE_PATH_PREFIX: /var/www/libv8/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} | ||
PLATFORM: ${{ matrix.platform.name }} | ||
TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact | ||
UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} | ||
secrets: | ||
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} | ||
HOSTNAME: ${{ secrets.HOSTNAME }} | ||
PROXY_URL: ${{ secrets.PROXY_URL }} | ||
USERNAME: ${{ secrets.USERNAME }} | ||
TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} | ||
|
||
meta: | ||
name: 'Publish build data to meta-repo' | ||
if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }} | ||
needs: | ||
- deb | ||
permissions: | ||
id-token: write | ||
contents: read | ||
uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main | ||
with: | ||
META_CONTENT: '/var/www/libv8/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}' | ||
META_REPO: signalwire/bamboo_gha_trigger | ||
META_REPO_BRANCH: trigger/libv8/${{ github.ref_name }} | ||
secrets: | ||
GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} |
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
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 |
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,25 @@ | ||
Source: libv8-6.1 | ||
Priority: optional | ||
Maintainer: FreeSWITCH Solutions <[email protected]> | ||
Standards-Version: 3.9.6 | ||
Section: libs | ||
Homepage: https://developers.google.com/v8/ | ||
|
||
Package: libv8-6.1 | ||
Architecture: amd64 | ||
Depends: ${shlibs:Depends}, ${misc:Depends} | ||
Description: V8 JavaScript engine - runtime library | ||
V8 is a high performance JavaScript engine written in C++. | ||
It is used in the web browser Chromium. | ||
. | ||
This package provides libraries for V8. | ||
|
||
Package: libv8-6.1-dev | ||
Section: libdevel | ||
Architecture: amd64 | ||
Depends: libv8-6.1 (= ${binary:Version}), ${misc:Depends} | ||
Description: V8 JavaScript engine - development files for 6.1.x | ||
V8 is a high performance JavaScript engine written in C++. | ||
It is used in the web browser Chromium. | ||
. | ||
This package provide development headers for V8 6.1.x. |
File renamed without changes.
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,36 @@ | ||
#!/usr/bin/make -f | ||
|
||
BIN_PACKAGE_NAME := libv8-6.1 | ||
DEV_PACKAGE_NAME := libv8-6.1-dev | ||
V8_INCLUDE_DIR := v8/include | ||
V8_OUT_RELEASE_DIR := v8/out.gn | ||
|
||
%: | ||
dh $@ | ||
|
||
override_dh_update_autotools_config: | ||
# Override dh_update_autotools_config to do nothing | ||
|
||
override_dh_autoreconf: | ||
# Override dh_autoreconf to do nothing | ||
|
||
override_dh_auto_build: | ||
# Override dh_auto_build to do nothing | ||
|
||
override_dh_auto_test: | ||
# Override dh_auto_test to do nothing | ||
|
||
override_dh_strip: | ||
# Override dh_strip to do nothing | ||
|
||
override_dh_install: | ||
dh_install -p$(DEV_PACKAGE_NAME) debian/v8-6.1_static.pc usr/lib/pkgconfig/ | ||
dh_install -p$(DEV_PACKAGE_NAME) $(V8_INCLUDE_DIR)/*.h usr/include/v8-6.1/ | ||
dh_install -p$(DEV_PACKAGE_NAME) $(V8_INCLUDE_DIR)/libplatform/*.h usr/include/v8-6.1/libplatform/ | ||
dh_install -p$(DEV_PACKAGE_NAME) $(V8_OUT_RELEASE_DIR)/gn_args.txt usr/include/v8-6.1/ | ||
|
||
dh_install -p$(BIN_PACKAGE_NAME) $(V8_OUT_RELEASE_DIR)/d8 usr/lib/v8-6.1/ | ||
dh_install -p$(BIN_PACKAGE_NAME) $(V8_OUT_RELEASE_DIR)/obj/*.a usr/lib/v8-6.1/ | ||
dh_install -p$(BIN_PACKAGE_NAME) $(V8_OUT_RELEASE_DIR)/obj/src/inspector/*.a usr/lib/v8-6.1/src/inspector/ | ||
|
||
dh_install |
File renamed without changes.
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,2 @@ | ||
source: source-is-missing * | ||
libv8-6.1-dev: pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/v8-6.1_static.pc] |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.