diff --git a/.github/script/amd64-18.04.Dockerfile b/.github/script/amd64-18.04.Dockerfile new file mode 100644 index 00000000..c68d675b --- /dev/null +++ b/.github/script/amd64-18.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:18.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/script/amd64-20.04.Dockerfile b/.github/script/amd64-20.04.Dockerfile new file mode 100644 index 00000000..35a178f2 --- /dev/null +++ b/.github/script/amd64-20.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/script/amd64-22.04.Dockerfile b/.github/script/amd64-22.04.Dockerfile new file mode 100644 index 00000000..72190295 --- /dev/null +++ b/.github/script/amd64-22.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:22.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/script/arm64-18.04.Dockerfile b/.github/script/arm64-18.04.Dockerfile new file mode 100644 index 00000000..eada8c8b --- /dev/null +++ b/.github/script/arm64-18.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:18.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTON_ARCH= .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/script/arm64-20.04.Dockerfile b/.github/script/arm64-20.04.Dockerfile new file mode 100644 index 00000000..5192f3c6 --- /dev/null +++ b/.github/script/arm64-20.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTON_ARCH= .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/script/arm64-22.04.Dockerfile b/.github/script/arm64-22.04.Dockerfile new file mode 100644 index 00000000..b445d85f --- /dev/null +++ b/.github/script/arm64-22.04.Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:22.04 + +RUN apt update +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata +RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev ninja-build + +WORKDIR / + +RUN git clone --recurse-submodules https://github.com/ton-blockchain/ton.git + +WORKDIR /ton +RUN mkdir /ton/build +WORKDIR /ton/build +ENV CC clang +ENV CXX clang++ +RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTON_ARCH= .. +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server create-state lite-client \ No newline at end of file diff --git a/.github/workflows/docker-compile-ubuntu.yml b/.github/workflows/docker-compile-ubuntu.yml new file mode 100644 index 00000000..ed4bb273 --- /dev/null +++ b/.github/workflows/docker-compile-ubuntu.yml @@ -0,0 +1,47 @@ +name: Docker Compile Ubuntu x86-64 & arm64 + +on: [push,workflow_dispatch] + +jobs: + build: + strategy: + fail-fast: false + matrix: + arch: [amd64, arm64] + ver: [18.04, 20.04, 22.04] + + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build with docker buildx + run: | + mkdir build-${{matrix.ver}}-${{matrix.arch}} + docker buildx build --platform=linux/${{matrix.arch}} --progress=plain --load . -t build-${{matrix.ver}}-${{matrix.arch}} -f .github/script/${{matrix.arch}}-${{matrix.ver}}.Dockerfile + container_id=$(docker create --platform=linux/${{matrix.arch}} build-${{matrix.ver}}-${{matrix.arch}}) + docker cp $container_id:/ton/build/dht-server/dht-server build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/validator-engine/validator-engine build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/validator-engine-console/validator-engine-console build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/crypto/fift build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/crypto/func build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/crypto/create-state build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/create-hardfork/create-hardfork build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/blockchain-explorer/blockchain-explorer build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/lite-client/lite-client build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/utils/generate-random-id build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/build/tonlib/libtonlibjson.so.0.5 build-${{matrix.ver}}-${{matrix.arch}}/tonlibjson.so + docker cp -a $container_id:/ton/crypto/smartcont build-${{matrix.ver}}-${{matrix.arch}}/ + docker cp -a $container_id:/ton/crypto/fift/lib build-${{matrix.ver}}-${{matrix.arch}}/ + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: ton-ubuntu-${{matrix.ver}}-${{matrix.arch}} + path: build-${{matrix.ver}}-${{matrix.arch}}