From a5f1b3098a592dbf72db9fbb48ca972622f1e309 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 14:14:05 +0200 Subject: [PATCH 01/13] Update LICENSE copyright dates and add @bensuperpc Update LICENSE copyright dates and add @bensuperpc Signed-off-by: Bensuperpc --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6f3c997..00affdc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015, 2016, 2017, 2018 Steeve Morin, Rob Burns, Matthew McCormick, Jean-Christophe-Fillion-Robin +Copyright (c) 2015, 2016, 2017, 2018, 2021 Steeve Morin, Rob Burns, Matthew McCormick, Jean-Christophe-Fillion-Robin, Bensuperpc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 0fc1c34f29bb53befa7c8056efef2422eedb4e51 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Wed, 18 May 2022 14:48:03 +0200 Subject: [PATCH 02/13] Update CONTRIBUTING.md and README.md Signed-off-by: Bensuperpc --- CONTRIBUTING.md | 74 ++++++++++++++++++++++++++++++++++++------------- README.md | 2 +- 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4541204..816af3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -189,7 +189,7 @@ Once this part is finished, there must be 3 files in the **linux-arm64** folder: - **Dockerfile.in**, the docker file. - **Toolchain.cmake**, the CMake file for the toolchains. -### Makefile and CI +### Makefile For this last part, we will see how to add the image to the [Makefile](Makefile) and to a github action. @@ -198,14 +198,14 @@ You need to add the image/folder name (**linux-arm64**) to the **STANDARD_IMAGES ```make # These images are built using the "build implicit rule" STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \ - linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ - linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-m68k-uclibc linux-s390x linux-x64-tinycc \ - linux-armv6 linux-armv6-lts linux-armv6-musl linux-arm64-lts \ - linux-armv7l-musl linux-armv7 linux-armv7a linux-armv7-lts linux-x86_64-full \ - linux-mips linux-ppc64le linux-riscv64 linux-riscv32 linux-xtensa-uclibc \ - web-wasi \ - windows-static-x86 windows-static-x64 windows-static-x64-posix windows-armv7 \ - windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64 + linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ + linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-m68k-uclibc linux-s390x linux-x64-tinycc \ + linux-armv6 linux-armv6-lts linux-armv6-musl linux-arm64-lts \ + linux-armv7l-musl linux-armv7 linux-armv7a linux-armv7-lts linux-x86_64-full \ + linux-mips linux-ppc64le linux-riscv64 linux-riscv32 linux-xtensa-uclibc \ + web-wasi \ + windows-static-x86 windows-static-x64 windows-static-x64-posix windows-armv7 \ + windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64 ``` You need to add the image/folder name (**linux-arm64**) to the **GEN_IMAGES** variable in the [Makefile](Makefile): @@ -213,18 +213,54 @@ You need to add the image/folder name (**linux-arm64**) to the **GEN_IMAGES** va ```make # Generated Dockerfiles. GEN_IMAGES = android-arm android-arm64 \ - linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ - manylinux2014-x64 manylinux2014-x86 \ - manylinux2014-aarch64 linux-arm64-lts \ - web-wasm web-wasi linux-mips windows-arm64 windows-armv7 \ - windows-static-x86 windows-static-x64 windows-static-x64-posix \ - windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \ - linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-x86_64-full \ - linux-armv6 linux-armv6-lts linux-armv6-musl \ - linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-ppc64le linux-s390x \ - linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-x64-tinycc linux-xtensa-uclibc + linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ + manylinux2014-x64 manylinux2014-x86 \ + manylinux2014-aarch64 linux-arm64-lts \ + web-wasm web-wasi linux-mips windows-arm64 windows-armv7 \ + windows-static-x86 windows-static-x64 windows-static-x64-posix \ + windows-shared-x86 windows-shared-x64 windows-shared-x64-posix \ + linux-armv7 linux-armv7a linux-armv7l-musl linux-armv7-lts linux-x86_64-full \ + linux-armv6 linux-armv6-lts linux-armv6-musl \ + linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-ppc64le linux-s390x \ + linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-x64-tinycc linux-xtensa-uclibc ``` +### Image building and testing + +You can now start building the image: + +```bash +make linux-arm64 +``` + +When finished, you can test it: + +```bash +make linux-arm64.test +``` + +If you want to go a little further in the tests: + +```bash +docker run --rm linux-arm64 > ./linux-arm64 +chmod +x ./linux-arm64 +``` + +And then run the commands to build a project (you must be in the directory of your project to build): + +```bash +./linux-arm64 make +``` + +With CMake + Ninja: + +```bash +./linux-arm64 cmake -Bbuild -S. -GNinja +./linux-arm64 ninja -Cbuild +``` + +### CI (github action) + To finish, you have to add to [Github Action](.github/workflows/main.yml) the image/folder name: ```yml diff --git a/README.md b/README.md index 9589a07..c096b57 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Cross compiling toolchains in Docker images. ## Examples 1. `dockcross make`: Build the *Makefile* in the current directory. -2. `dockcross cmake -Bbuild -H. -GNinja`: Run CMake with a build directory `./build` for a *CMakeLists.txt* file in the current directory and generate `ninja` build configuration files. +2. `dockcross cmake -Bbuild -S. -GNinja`: Run CMake with a build directory `./build` for a *CMakeLists.txt* file in the current directory and generate `ninja` build configuration files. 3. `dockcross ninja -Cbuild`: Run ninja in the `./build` directory. 4. `dockcross bash -c '$CC test/C/hello.c -o hello'`: Build the *hello.c* file with the compiler identified with the `CC` environmental variable in the build environment. 5. `dockcross bash`: Run an interactive shell in the build environment. From 3d5142d6ad75316d4e4603b225a72aa7d0af7a73 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 01:03:41 +0200 Subject: [PATCH 03/13] Fix error with CI Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 43 ++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ea055a..0c6be13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,21 +18,35 @@ jobs: name: base runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: checkout code + uses: actions/checkout@v3 + with: + submodules: "recursive" + fetch-depth: 1 + - name: build - run: make base + uses: nick-fields/retry@v2 + with: + timeout_seconds: 20 + max_attempts: 5 + retry_on: error + command: make base + - name: test run: make base.test + - name: archive base run: | mkdir -p cache docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz + - name: save base uses: actions/upload-artifact@v3 with: name: cache path: ./cache retention-days: 1 + - name: deploy if: github.ref == 'refs/heads/master' run: | @@ -833,17 +847,31 @@ jobs: cpython_arg: "", } steps: - - uses: actions/checkout@v3 + - name: checkout code + uses: actions/checkout@v3 + with: + submodules: "recursive" + fetch-depth: 1 + - uses: actions/download-artifact@v3 with: name: cache path: ./cache + - name: load base run: xz -d -k < ./cache/base.tar.xz | docker load + - name: build - run: make ${{ matrix.arch_name.image }} + uses: nick-fields/retry@v2 + with: + timeout_seconds: 20 + max_attempts: 5 + retry_on: error + command: make ${{ matrix.arch_name.image }} + - name: basic test run: make ${{ matrix.arch_name.image }}.test + # Updated on 28/08/2021 - name: stockfish build test if: ${{ matrix.arch_name.stockfish == 'yes' }} @@ -854,6 +882,7 @@ jobs: ./../../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} build ${{ matrix.arch_name.stockfish_arg }} -j2 cd ../.. rm -rf Stockfish + # Updated on 28/08/2021 - name: ninja build test if: ${{ matrix.arch_name.ninja == 'yes' }} @@ -861,6 +890,7 @@ jobs: git clone --depth 1 --branch v1.10.2 https://github.com/ninja-build/ninja.git cd ninja ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.ninja_arg }} + # Updated on 28/08/2021 - name: openssl build test if: ${{ matrix.arch_name.openssl == 'yes' }} @@ -873,6 +903,7 @@ jobs: ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 cd .. rm -rf openssl + # Updated on 28/08/2021 - name: C build test if: ${{ matrix.arch_name.C == 'yes' }} @@ -883,6 +914,7 @@ jobs: ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C_arg }} cd .. rm -rf C + # Updated on 28/08/2021 - name: C-Plus-Plus build test if: ${{ matrix.arch_name.C-Plus-Plus == 'yes' }} @@ -893,6 +925,7 @@ jobs: ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C-Plus-Plus_arg }} cd .. rm -rf C-Plus-Plus + # Updated on 28/08/2021 - name: fmt build test if: ${{ matrix.arch_name.fmt == 'yes' }} @@ -902,6 +935,7 @@ jobs: ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.fmt_arg }} -DFMT_DOC=OFF cd .. rm -rf fmt + # Updated on 05/10/2021 - name: cpython build test if: ${{ matrix.arch_name.cpython == 'yes' }} @@ -912,6 +946,7 @@ jobs: ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 cd .. rm -rf cpython + - name: deploy if: github.ref == 'refs/heads/master' run: | From a0c458c8c16269ec0e28644af7ed461470c592b9 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 01:12:04 +0200 Subject: [PATCH 04/13] Update CI tests Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ea055a..2ca73e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -844,28 +844,28 @@ jobs: run: make ${{ matrix.arch_name.image }} - name: basic test run: make ${{ matrix.arch_name.image }}.test - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: stockfish build test if: ${{ matrix.arch_name.stockfish == 'yes' }} run: | - git clone --depth 1 --branch sf_14 https://github.com/official-stockfish/Stockfish.git + git clone --depth 1 --branch sf_15 https://github.com/official-stockfish/Stockfish.git cd Stockfish/src ./../../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} net ./../../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} build ${{ matrix.arch_name.stockfish_arg }} -j2 cd ../.. rm -rf Stockfish - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: ninja build test if: ${{ matrix.arch_name.ninja == 'yes' }} run: | - git clone --depth 1 --branch v1.10.2 https://github.com/ninja-build/ninja.git + git clone --depth 1 --branch v1.11.0 https://github.com/ninja-build/ninja.git cd ninja ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.ninja_arg }} - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: openssl build test if: ${{ matrix.arch_name.openssl == 'yes' }} run: | - git clone --depth 1 --branch OpenSSL_1_1_1k https://github.com/openssl/openssl.git + git clone --depth 1 --branch OpenSSL_1_1_1o https://github.com/openssl/openssl.git cd openssl wget https://raw.githubusercontent.com/mavlink/MAVSDK/main/third_party/openssl/dockcross-android.patch patch -p 0 < dockcross-android.patch @@ -873,40 +873,40 @@ jobs: ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 cd .. rm -rf openssl - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: C build test if: ${{ matrix.arch_name.C == 'yes' }} run: | git clone https://github.com/TheAlgorithms/C.git cd C - git checkout cc241f58c253c533ac94e07151ef91a5ef7e5719 + git checkout 2314a195862243e09c485a66194866517a6f8c31 ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C_arg }} cd .. rm -rf C - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: C-Plus-Plus build test if: ${{ matrix.arch_name.C-Plus-Plus == 'yes' }} run: | git clone https://github.com/TheAlgorithms/C-Plus-Plus.git cd C-Plus-Plus - git checkout c3b07aed2240e5364e1a49d091a00b61f520e653 + git checkout 37a29008e6b77921a97a89ca8b7fd9e700aeccd0 ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C-Plus-Plus_arg }} cd .. rm -rf C-Plus-Plus - # Updated on 28/08/2021 + # Updated on 19/05/2022 - name: fmt build test if: ${{ matrix.arch_name.fmt == 'yes' }} run: | - git clone --depth 1 --branch 8.0.1 https://github.com/fmtlib/fmt.git + git clone --depth 1 --branch 8.1.1 https://github.com/fmtlib/fmt.git cd fmt ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.fmt_arg }} -DFMT_DOC=OFF cd .. rm -rf fmt - # Updated on 05/10/2021 + # Updated on 19/05/2022 - name: cpython build test if: ${{ matrix.arch_name.cpython == 'yes' }} run: | - git clone --depth 1 --branch v3.9.2 https://github.com/python/cpython.git + git clone --depth 1 --branch v3.10.4 https://github.com/python/cpython.git cd cpython ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} ./configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no --disable-ipv6 ${{ matrix.arch_name.cpython_arg }} --build=x86_64-linux-gnu --enable-shared ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 From 63514041f6819c79136f621138efea8060441411 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 01:20:36 +0200 Subject: [PATCH 05/13] Fix error Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c6be13..d4d9400 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,8 +27,8 @@ jobs: - name: build uses: nick-fields/retry@v2 with: - timeout_seconds: 20 - max_attempts: 5 + retry_wait_seconds: 40 + max_attempts: 3 retry_on: error command: make base @@ -864,8 +864,8 @@ jobs: - name: build uses: nick-fields/retry@v2 with: - timeout_seconds: 20 - max_attempts: 5 + retry_wait_seconds: 20 + max_attempts: 3 retry_on: error command: make ${{ matrix.arch_name.image }} From c0681806653ead85dc380bb2db8b456aa5f66589 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 01:27:21 +0200 Subject: [PATCH 06/13] Add timeout on CI Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4d9400..19069cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,7 @@ jobs: - name: build uses: nick-fields/retry@v2 with: + timeout_minutes: 120 retry_wait_seconds: 40 max_attempts: 3 retry_on: error @@ -864,6 +865,7 @@ jobs: - name: build uses: nick-fields/retry@v2 with: + timeout_minutes: 360 retry_wait_seconds: 20 max_attempts: 3 retry_on: error From 2ff17c20e8393f35288d6756a84a8e769d328c8f Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 08:10:02 +0200 Subject: [PATCH 07/13] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ca73e0..a416a27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -906,7 +906,7 @@ jobs: - name: cpython build test if: ${{ matrix.arch_name.cpython == 'yes' }} run: | - git clone --depth 1 --branch v3.10.4 https://github.com/python/cpython.git + git clone --depth 1 --branch v3.9.13 https://github.com/python/cpython.git cd cpython ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} ./configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no --disable-ipv6 ${{ matrix.arch_name.cpython_arg }} --build=x86_64-linux-gnu --enable-shared ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j2 From 7876c21e62bcd8b459e9060b6bf19c33f799c7a4 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Thu, 19 May 2022 11:05:42 +0200 Subject: [PATCH 08/13] Add retry on deploy step Add retry on deploy step Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 19069cc..501f123 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,9 +50,15 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - run: | - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} - docker image push dockcross/base --all-tags + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + retry_wait_seconds: 30 + max_attempts: 4 + retry_on: error + command: | + docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} + docker image push dockcross/base --all-tags image: name: ${{ matrix.arch_name.image }} @@ -951,6 +957,12 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - run: | - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} - docker image push dockcross/${{ matrix.arch_name.image }} --all-tags + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + retry_wait_seconds: 30 + max_attempts: 4 + retry_on: error + command: | + docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} + docker image push dockcross/${{ matrix.arch_name.image }} --all-tags From e5cb29c74f2c3648edb33e7eb30aea6159aac286 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 20 May 2022 10:04:04 +0200 Subject: [PATCH 09/13] Update Windows ARM Update windows ARM Signed-off-by: Bensuperpc --- windows-arm64/Dockerfile.in | 2 +- windows-armv7/Dockerfile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/windows-arm64/Dockerfile.in b/windows-arm64/Dockerfile.in index 493bf3d..6876f4d 100644 --- a/windows-arm64/Dockerfile.in +++ b/windows-arm64/Dockerfile.in @@ -6,7 +6,7 @@ ENV XCC_PREFIX /usr/xcc ENV CROSS_TRIPLE aarch64-w64-mingw32 ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross -ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz +ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20220323/llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64.tar.xz ENV DOWNLOAD_URL=${DOWNLOAD_URL} RUN mkdir -p ${CROSS_ROOT} && wget -qO- "${DOWNLOAD_URL}" | tar xJvf - --strip 1 -C ${CROSS_ROOT}/ > /dev/null diff --git a/windows-armv7/Dockerfile.in b/windows-armv7/Dockerfile.in index 25d11f6..fffed5e 100644 --- a/windows-armv7/Dockerfile.in +++ b/windows-armv7/Dockerfile.in @@ -6,7 +6,7 @@ ENV XCC_PREFIX /usr/xcc ENV CROSS_TRIPLE armv7-w64-mingw32 ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE}-cross -ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20210423/llvm-mingw-20210423-msvcrt-ubuntu-18.04-x86_64.tar.xz +ARG DOWNLOAD_URL=https://github.com/mstorsjo/llvm-mingw/releases/download/20220323/llvm-mingw-20220323-msvcrt-ubuntu-18.04-x86_64.tar.xz ENV DOWNLOAD_URL=${DOWNLOAD_URL} RUN mkdir -p ${CROSS_ROOT} && wget -qO- "${DOWNLOAD_URL}" | tar xJvf - --strip 1 -C ${CROSS_ROOT}/ > /dev/null From 228e4c18ccfdc58a117780e1a2d52f9cf9a23aa4 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 20 May 2022 12:54:08 +0200 Subject: [PATCH 10/13] Update with better retry methods Update with better retry methods Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88a847e..cff7a1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,13 +25,7 @@ jobs: fetch-depth: 1 - name: build - uses: nick-fields/retry@v2 - with: - timeout_minutes: 120 - retry_wait_seconds: 40 - max_attempts: 3 - retry_on: error - command: make base + run: for i in {1..3}; do make base && break || sleep 30; done - name: test run: make base.test @@ -39,7 +33,7 @@ jobs: - name: archive base run: | mkdir -p cache - docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz + docker save dockcross/base:latest | xz -e7 -T0 > ./cache/base.tar.xz - name: save base uses: actions/upload-artifact@v3 @@ -50,13 +44,7 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - uses: nick-fields/retry@v2 - with: - timeout_minutes: 30 - retry_wait_seconds: 30 - max_attempts: 4 - retry_on: error - command: | + run: | docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} docker image push dockcross/base --all-tags @@ -869,13 +857,7 @@ jobs: run: xz -d -k < ./cache/base.tar.xz | docker load - name: build - uses: nick-fields/retry@v2 - with: - timeout_minutes: 360 - retry_wait_seconds: 20 - max_attempts: 3 - retry_on: error - command: make ${{ matrix.arch_name.image }} + run: for i in {1..3}; do make ${{ matrix.arch_name.image }} && break || sleep 30; done - name: basic test run: make ${{ matrix.arch_name.image }}.test @@ -957,12 +939,6 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - uses: nick-fields/retry@v2 - with: - timeout_minutes: 30 - retry_wait_seconds: 30 - max_attempts: 4 - retry_on: error - command: | + run: | docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} docker image push dockcross/${{ matrix.arch_name.image }} --all-tags From 91ecbfe91e832385fd2b9fc2a53c4fa2f5e7e8d4 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 20 May 2022 13:07:31 +0200 Subject: [PATCH 11/13] Remove retry from CI Remove retry from CI Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cff7a1e..a585a13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 1 - name: build - run: for i in {1..3}; do make base && break || sleep 30; done + run: make base - name: test run: make base.test @@ -857,7 +857,7 @@ jobs: run: xz -d -k < ./cache/base.tar.xz | docker load - name: build - run: for i in {1..3}; do make ${{ matrix.arch_name.image }} && break || sleep 30; done + run: make ${{ matrix.arch_name.image }} - name: basic test run: make ${{ matrix.arch_name.image }}.test From b90f7052ec7454fbedbf095d7c1913d3001c68ab Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Fri, 20 May 2022 13:27:06 +0200 Subject: [PATCH 12/13] Return to 9 compress level, insufficient time reduction Signed-off-by: Bensuperpc --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a585a13..6de5bee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: - name: archive base run: | mkdir -p cache - docker save dockcross/base:latest | xz -e7 -T0 > ./cache/base.tar.xz + docker save dockcross/base:latest | xz -e9 -T0 > ./cache/base.tar.xz - name: save base uses: actions/upload-artifact@v3 From 014fd62f30591c60b2b70d8b82f3f89257d6d089 Mon Sep 17 00:00:00 2001 From: "larry.espenshade" Date: Tue, 24 May 2022 09:21:42 -0400 Subject: [PATCH 13/13] bump to new release of flatcc, use version tags --- common/common.docker | 2 +- imagefiles/build-and-install-flatcc.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common/common.docker b/common/common.docker index 9edbbc6..11576b6 100644 --- a/common/common.docker +++ b/common/common.docker @@ -2,7 +2,7 @@ WORKDIR /usr/src ARG GIT_VERSION=2.32.0 ARG CMAKE_VERSION=3.21.1 -ARG FLATCC_VERSION=d90ed18ad09824297ffd5fbc578ccb1666d13890 +ARG FLATCC_VERSION=0.6.1 # Image build scripts COPY \ diff --git a/imagefiles/build-and-install-flatcc.sh b/imagefiles/build-and-install-flatcc.sh index 9edcaef..237fd94 100755 --- a/imagefiles/build-and-install-flatcc.sh +++ b/imagefiles/build-and-install-flatcc.sh @@ -14,12 +14,10 @@ fi cd /usr/src -git clone https://github.com/dvidelabs/flatcc.git +git clone https://github.com/dvidelabs/flatcc.git -b v$FLATCC_VERSION cd flatcc -git reset --hard $FLATCC_COMMIT - cmake -DFLATCC_INSTALL=on && make install > /dev/null ./scripts/cleanall.sh