From caa52c98d788c27ac9f53bef99621c35ca3ac745 Mon Sep 17 00:00:00 2001 From: neodiX42 Date: Thu, 27 Oct 2022 08:13:50 +0200 Subject: [PATCH] Fix timeout issue for Github action Docker Compile Ubuntu x86-64 & arm64 (#501) * fix gh action timeout; delete old actions; * fix gh action timeout; delete old actions; --- .github/script/amd64-18.04.Dockerfile | 3 +- .github/script/amd64-20.04.Dockerfile | 3 +- .github/script/amd64-22.04.Dockerfile | 3 +- .github/script/arm64-18.04.Dockerfile | 3 +- .github/script/arm64-20.04.Dockerfile | 3 +- .github/script/arm64-22.04.Dockerfile | 3 +- .github/workflows/docker-compile-ubuntu.yml | 1 + .github/workflows/docker-ubuntu-image.yml | 2 +- .github/workflows/macos-10.15-compile.yml | 6 +- .github/workflows/macos-10.15-tonlib-java.yml | 60 ---------------- .github/workflows/ubuntu-18.04-compile.yml | 6 +- .../workflows/ubuntu-18.04-tonlib-java.yml | 50 ------------- .github/workflows/windows2019x64-compile.yml | 6 +- .../workflows/windows2019x64-tonlib-java.yml | 71 ------------------- 14 files changed, 21 insertions(+), 199 deletions(-) delete mode 100644 .github/workflows/macos-10.15-tonlib-java.yml delete mode 100644 .github/workflows/ubuntu-18.04-tonlib-java.yml delete mode 100644 .github/workflows/windows2019x64-tonlib-java.yml diff --git a/.github/script/amd64-18.04.Dockerfile b/.github/script/amd64-18.04.Dockerfile index c68d675b..e11678b0 100644 --- a/.github/script/amd64-18.04.Dockerfile +++ b/.github/script/amd64-18.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/script/amd64-20.04.Dockerfile b/.github/script/amd64-20.04.Dockerfile index 35a178f2..eb7fa890 100644 --- a/.github/script/amd64-20.04.Dockerfile +++ b/.github/script/amd64-20.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/script/amd64-22.04.Dockerfile b/.github/script/amd64-22.04.Dockerfile index 72190295..68d1f652 100644 --- a/.github/script/amd64-22.04.Dockerfile +++ b/.github/script/amd64-22.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/script/arm64-18.04.Dockerfile b/.github/script/arm64-18.04.Dockerfile index eada8c8b..4c9dad65 100644 --- a/.github/script/arm64-18.04.Dockerfile +++ b/.github/script/arm64-18.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/script/arm64-20.04.Dockerfile b/.github/script/arm64-20.04.Dockerfile index 5192f3c6..7d089b01 100644 --- a/.github/script/arm64-20.04.Dockerfile +++ b/.github/script/arm64-20.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/script/arm64-22.04.Dockerfile b/.github/script/arm64-22.04.Dockerfile index b445d85f..0d68a660 100644 --- a/.github/script/arm64-22.04.Dockerfile +++ b/.github/script/arm64-22.04.Dockerfile @@ -13,5 +13,6 @@ RUN mkdir /ton/build WORKDIR /ton/build ENV CC clang ENV CXX clang++ +ENV CCACHE_DISABLE 1 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 +RUN ninja tonlibjson blockchain-explorer fift func validator-engine validator-engine-console create-state generate-random-id create-hardfork dht-server lite-client \ No newline at end of file diff --git a/.github/workflows/docker-compile-ubuntu.yml b/.github/workflows/docker-compile-ubuntu.yml index ed4bb273..d003b786 100644 --- a/.github/workflows/docker-compile-ubuntu.yml +++ b/.github/workflows/docker-compile-ubuntu.yml @@ -6,6 +6,7 @@ jobs: build: strategy: fail-fast: false + max-parallel: 3 matrix: arch: [amd64, arm64] ver: [18.04, 20.04, 22.04] diff --git a/.github/workflows/docker-ubuntu-image.yml b/.github/workflows/docker-ubuntu-image.yml index ad83c099..f62838c9 100644 --- a/.github/workflows/docker-ubuntu-image.yml +++ b/.github/workflows/docker-ubuntu-image.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-18.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/macos-10.15-compile.yml b/.github/workflows/macos-10.15-compile.yml index 5f2d94b0..c002a63b 100644 --- a/.github/workflows/macos-10.15-compile.yml +++ b/.github/workflows/macos-10.15-compile.yml @@ -1,8 +1,6 @@ name: C/C++ CI macOS-10.15 Compile -on: - workflow_dispatch: - push: +on: [push,workflow_dispatch,workflow_call] jobs: build: @@ -11,7 +9,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'recursive' - name: Compile OpenSSL diff --git a/.github/workflows/macos-10.15-tonlib-java.yml b/.github/workflows/macos-10.15-tonlib-java.yml deleted file mode 100644 index e5199f58..00000000 --- a/.github/workflows/macos-10.15-tonlib-java.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: macOS-10.15 tonlib-java - - -on: - workflow_dispatch: - push: - branches: - - 'wallets' -jobs: - build: - - runs-on: macos-10.15 - - steps: - - name: Check out repository - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: Compile OpenSSL - run: | - git clone https://github.com/openssl/openssl openssl_1_1_1 - cd openssl_1_1_1 - git checkout OpenSSL_1_1_1-stable - ./Configure --prefix=/usr/local/macos darwin64-x86_64-cc -static -mmacosx-version-min=10.15 - make build_libs -j4 - - - name: Configure & Build - run: | - rootPath=`pwd` - - export CC=$(which clang) - export CXX=$(which clang++) - export CCACHE_DISABLE=1 - - export JAVA_AWT_LIBRARY=NotNeeded - export JAVA_JVM_LIBRARY=NotNeeded - export JAVA_INCLUDE_PATH=${JAVA_HOME}/include - export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include - export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/darwin - - cd example/android/ - mkdir build - cd build - - cmake -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=$rootPath/openssl_1_1_1/include -DOPENSSL_CRYPTO_LIBRARY=$rootPath/openssl_1_1_1/libcrypto.a -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DTON_ONLY_TONLIB=ON .. - cmake --build . --target prepare_cross_compiling - cmake --build . --target native-lib --config Release - - - name: find & copy binaries - run: | - mkdir -p artifacts/tonlib-java - cp example/android/src/drinkless/org/ton/TonApi.java artifacts/tonlib-java/ - cp example/android/build/libnative-lib.dylib artifacts/tonlib-java/ - - - name: Upload artifacts - uses: actions/upload-artifact@master - with: - name: tonlib-macos-java - path: artifacts diff --git a/.github/workflows/ubuntu-18.04-compile.yml b/.github/workflows/ubuntu-18.04-compile.yml index e215c7bd..57b97ee5 100644 --- a/.github/workflows/ubuntu-18.04-compile.yml +++ b/.github/workflows/ubuntu-18.04-compile.yml @@ -1,6 +1,6 @@ -name: C/C++ CI Ubuntu 18.04 Compile +name: Ubuntu 18.04 Compile -on: [push,workflow_dispatch] +on: [push,workflow_dispatch,workflow_call] jobs: build: @@ -9,7 +9,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'recursive' diff --git a/.github/workflows/ubuntu-18.04-tonlib-java.yml b/.github/workflows/ubuntu-18.04-tonlib-java.yml deleted file mode 100644 index 8c746b26..00000000 --- a/.github/workflows/ubuntu-18.04-tonlib-java.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Ubuntu 18.04 tonlib-java - -on: - workflow_dispatch: - push: - branches: - - 'wallets' - -jobs: - build: - - runs-on: ubuntu-18.04 - - steps: - - name: Check out repository - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: Install libraries - run: | - sudo apt update - sudo apt install -y build-essential git make cmake clang libgflags-dev zlib1g-dev libssl-dev libreadline-dev libmicrohttpd-dev pkg-config libgsl-dev python3 python3-dev ninja-build - - - name: Configure & Build - run: | - export JAVA_AWT_LIBRARY=NotNeeded - export JAVA_JVM_LIBRARY=NotNeeded - export JAVA_INCLUDE_PATH=${JAVA_HOME}/include - export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include - export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux - - cd example/android/ - mkdir build - cd build - cmake -DTON_ONLY_TONLIB=ON .. - cmake --build . --target prepare_cross_compiling - cmake --build . --target native-lib - - - name: find & copy binaries - run: | - mkdir -p artifacts/tonlib-java - cp example/android/src/drinkless/org/ton/TonApi.java artifacts/tonlib-java/ - cp example/android/build/libnative-lib.so artifacts/tonlib-java/ - - - name: Upload artifacts - uses: actions/upload-artifact@master - with: - name: tonlib-ubuntu-java - path: artifacts \ No newline at end of file diff --git a/.github/workflows/windows2019x64-compile.yml b/.github/workflows/windows2019x64-compile.yml index f1dce51c..4f763d4d 100644 --- a/.github/workflows/windows2019x64-compile.yml +++ b/.github/workflows/windows2019x64-compile.yml @@ -1,8 +1,6 @@ name: Windows Server 2019 x64 Compile -on: - workflow_dispatch: - push: +on: [push,workflow_dispatch,workflow_call] defaults: run: @@ -19,7 +17,7 @@ jobs: systeminfo | findstr /B /C:"OS Name" /C:"OS Version" - name: Check out current repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: 'recursive' diff --git a/.github/workflows/windows2019x64-tonlib-java.yml b/.github/workflows/windows2019x64-tonlib-java.yml deleted file mode 100644 index f03212b8..00000000 --- a/.github/workflows/windows2019x64-tonlib-java.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Windows 2019 tonlib-java - -on: - workflow_dispatch: - push: - branches: - - 'wallets' - -defaults: - run: - shell: cmd - -jobs: - build: - - runs-on: windows-2019 - - steps: - - name: Get Current OS version - run: | - systeminfo | findstr /B /C:"OS Name" /C:"OS Version" - - name: Check out current repository - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: Check out zlib repository - uses: actions/checkout@v2 - with: - repository: desktop-app/zlib - path: zlib - - - name: Setup msbuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - - - name: Compile zlib Win64 - run: | - cd zlib\contrib\vstudio\vc14 - msbuild zlibstat.vcxproj /p:Configuration=ReleaseWithoutAsm /p:platform=x64 -p:PlatformToolset=v142 - - - name: Install precompiled OpenSSL Win64 - run: | - curl -Lo openssl-1.1.1o.zip https://github.com/neodiX42/precompiled-openssl-win64/raw/main/openssl-1.1.1o.zip - jar xf openssl-1.1.1o.zip - - - name: Configure & Build - run: | - set JAVA_AWT_LIBRARY=NotNeeded - set JAVA_JVM_LIBRARY=NotNeeded - set JAVA_INCLUDE_PATH=${JAVA_HOME}/include - set JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include - set JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/win32 - - set root=%cd% - echo %root% - cd example/android - mkdir build - cd build - cmake -DZLIB_FOUND=1 -DZLIB_INCLUDE_DIR=%root%\zlib -DZLIB_LIBRARY=%root%\zlib\contrib\vstudio\vc14\x64\ZlibStatReleaseWithoutAsm\zlibstat.lib -DOPENSSL_FOUND=1 -DOPENSSL_INCLUDE_DIR=%root%/openssl-1.1/x64/include -DOPENSSL_CRYPTO_LIBRARY=%root%/openssl-1.1/x64/lib/libcrypto.lib -DTON_ONLY_TONLIB=ON -DCMAKE_CXX_FLAGS="/DTD_WINDOWS=1 /EHsc /bigobj /W0" .. - cmake --build . --target native-lib --config Release - - - name: Find & copy binaries - run: | - mkdir tonlib-java - cp example/android/build/Release/native-lib.dll tonlib-java/ - - - name: Upload artifacts - uses: actions/upload-artifact@master - with: - name: tonlib-win64-java - path: tonlib-java