From a553432acd6e6d2b55454300f09a007b7120b7b3 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Tue, 14 Jul 2026 17:21:06 +0200 Subject: [PATCH] Test decentralized --- .github/workflows/expired.yml | 18 +- .github/workflows/main.yml | 1549 ++--------------- .gitignore | 1 + .vscode/settings.json | 3 + CONTRIBUTING.md | 118 +- Dockerfile.in | 4 +- Makefile | 774 ++++---- Makefile.old | 440 +++++ android-arm/preset.mk | 13 + android-arm64/preset.mk | 13 + android-x86/Dockerfile | 3 +- android-x86/preset.mk | 15 + android-x86_64/Dockerfile | 3 +- android-x86_64/preset.mk | 15 + .../crosstool-ng.config | 6 +- bare-armv7emhf-nano_newlib/preset.mk | 14 + common/common.webassembly | 6 +- imagefiles/install-gosu-binary.sh | 20 +- imagefiles/wasmtime-pwd-threads.sh | 2 +- linux-arm64-full/preset.mk | 14 + linux-arm64-lts/crosstool-ng.config | 6 +- linux-arm64-lts/preset.mk | 14 + linux-arm64-musl/preset.mk | 14 + linux-arm64/preset.mk | 18 + linux-armv5-musl/crosstool-ng.config | 6 +- linux-armv5-musl/preset.mk | 13 + linux-armv5-uclibc/crosstool-ng.config | 6 +- linux-armv5-uclibc/preset.mk | 13 + linux-armv5/crosstool-ng.config | 6 +- linux-armv5/preset.mk | 13 + linux-armv6-lts/crosstool-ng.config | 6 +- linux-armv6-lts/preset.mk | 13 + linux-armv6-musl/preset.mk | 13 + linux-armv6/crosstool-ng.config | 6 +- linux-armv6/preset.mk | 13 + linux-armv7-lts/crosstool-ng.config | 6 +- linux-armv7-lts/preset.mk | 14 + linux-armv7/crosstool-ng.config | 6 +- linux-armv7/preset.mk | 14 + linux-armv7a-lts/crosstool-ng.config | 6 +- linux-armv7a-lts/preset.mk | 14 + linux-armv7a/preset.mk | 14 + linux-armv7l-musl/preset.mk | 14 + linux-i686/crosstool-ng.config | 6 +- linux-i686/preset.mk | 13 + linux-loongarch64/preset.mk | 15 + linux-m68k-uclibc/crosstool-ng.config | 6 +- linux-m68k-uclibc/preset.mk | 11 + linux-mips-lts/crosstool-ng.config | 6 +- linux-mips-lts/preset.mk | 13 + linux-mips-uclibc/Dockerfile.in | 3 +- linux-mips-uclibc/crosstool-ng.config | 6 +- linux-mips-uclibc/preset.mk | 13 + linux-mips/crosstool-ng.config | 6 +- linux-mips/preset.mk | 13 + linux-mipsel-lts/crosstool-ng.config | 6 +- linux-mipsel-lts/preset.mk | 11 + linux-ppc/preset.mk | 13 + linux-ppc64le-lts/crosstool-ng.config | 6 +- linux-ppc64le-lts/preset.mk | 14 + linux-ppc64le/preset.mk | 14 + linux-riscv32/crosstool-ng.config | 6 +- linux-riscv32/preset.mk | 13 + linux-riscv64/crosstool-ng.config | 6 +- linux-riscv64/preset.mk | 13 + linux-s390x/crosstool-ng.config | 6 +- linux-s390x/preset.mk | 13 + linux-x64-clang/preset.mk | 13 + linux-x64-tinycc/preset.mk | 15 + linux-x64/preset.mk | 13 + linux-x86/preset.mk | 13 + linux-x86_64-full/preset.mk | 14 + linux-xtensa-uclibc/crosstool-ng.config | 6 +- linux-xtensa-uclibc/preset.mk | 13 + manylinux2014-aarch64/crosstool-ng.config | 2 +- manylinux2014-aarch64/preset.mk | 25 + manylinux2014-x64/preset.mk | 27 + manylinux2014-x86/preset.mk | 26 + manylinux_2_28-aarch64/crosstool-ng.config | 2 +- manylinux_2_28-aarch64/preset.mk | 25 + manylinux_2_28-x64/preset.mk | 26 + manylinux_2_34-aarch64/crosstool-ng.config | 2 +- manylinux_2_34-aarch64/preset.mk | 25 + manylinux_2_34-x64/preset.mk | 21 + preset.mk | 19 + web-wasi-emulated-threads/Dockerfile.in | 6 +- .../download-build-install-wasi-sdk.sh | 16 + web-wasi-emulated-threads/preset.mk | 8 + web-wasi-threads/preset.mk | 12 + web-wasi/preset.mk | 8 + web-wasm/preset.mk | 25 + windows-arm64/preset.mk | 13 + windows-armv7/preset.mk | 13 + windows-shared-x64-posix/preset.mk | 13 + windows-shared-x64/preset.mk | 13 + windows-shared-x86/preset.mk | 10 + windows-static-x64-posix/preset.mk | 14 + windows-static-x64/preset.mk | 14 + windows-static-x86/preset.mk | 14 + 99 files changed, 2003 insertions(+), 1974 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 Makefile.old create mode 100644 android-arm/preset.mk create mode 100644 android-arm64/preset.mk create mode 100644 android-x86/preset.mk create mode 100644 android-x86_64/preset.mk create mode 100644 bare-armv7emhf-nano_newlib/preset.mk create mode 100644 linux-arm64-full/preset.mk create mode 100644 linux-arm64-lts/preset.mk create mode 100644 linux-arm64-musl/preset.mk create mode 100644 linux-arm64/preset.mk create mode 100644 linux-armv5-musl/preset.mk create mode 100644 linux-armv5-uclibc/preset.mk create mode 100644 linux-armv5/preset.mk create mode 100644 linux-armv6-lts/preset.mk create mode 100644 linux-armv6-musl/preset.mk create mode 100644 linux-armv6/preset.mk create mode 100644 linux-armv7-lts/preset.mk create mode 100644 linux-armv7/preset.mk create mode 100644 linux-armv7a-lts/preset.mk create mode 100644 linux-armv7a/preset.mk create mode 100644 linux-armv7l-musl/preset.mk create mode 100644 linux-i686/preset.mk create mode 100644 linux-loongarch64/preset.mk create mode 100644 linux-m68k-uclibc/preset.mk create mode 100644 linux-mips-lts/preset.mk create mode 100644 linux-mips-uclibc/preset.mk create mode 100644 linux-mips/preset.mk create mode 100644 linux-mipsel-lts/preset.mk create mode 100644 linux-ppc/preset.mk create mode 100644 linux-ppc64le-lts/preset.mk create mode 100644 linux-ppc64le/preset.mk create mode 100644 linux-riscv32/preset.mk create mode 100644 linux-riscv64/preset.mk create mode 100644 linux-s390x/preset.mk create mode 100644 linux-x64-clang/preset.mk create mode 100644 linux-x64-tinycc/preset.mk create mode 100644 linux-x64/preset.mk create mode 100644 linux-x86/preset.mk create mode 100644 linux-x86_64-full/preset.mk create mode 100644 linux-xtensa-uclibc/preset.mk create mode 100644 manylinux2014-aarch64/preset.mk create mode 100644 manylinux2014-x64/preset.mk create mode 100644 manylinux2014-x86/preset.mk create mode 100644 manylinux_2_28-aarch64/preset.mk create mode 100644 manylinux_2_28-x64/preset.mk create mode 100644 manylinux_2_34-aarch64/preset.mk create mode 100644 manylinux_2_34-x64/preset.mk create mode 100644 preset.mk create mode 100644 web-wasi-emulated-threads/preset.mk create mode 100644 web-wasi-threads/preset.mk create mode 100644 web-wasi/preset.mk create mode 100644 web-wasm/preset.mk create mode 100644 windows-arm64/preset.mk create mode 100644 windows-armv7/preset.mk create mode 100644 windows-shared-x64-posix/preset.mk create mode 100644 windows-shared-x64/preset.mk create mode 100644 windows-shared-x86/preset.mk create mode 100644 windows-static-x64-posix/preset.mk create mode 100644 windows-static-x64/preset.mk create mode 100644 windows-static-x86/preset.mk diff --git a/.github/workflows/expired.yml b/.github/workflows/expired.yml index 3dc9392..48704b5 100644 --- a/.github/workflows/expired.yml +++ b/.github/workflows/expired.yml @@ -1,7 +1,7 @@ name: 'Close stale issues and PRs' on: schedule: - - cron: '0 */8 * * *' + - cron: '0 */12 * * *' jobs: stale: runs-on: ubuntu-latest @@ -12,11 +12,11 @@ jobs: exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted' exempt-pr-milestones: 'bugfix,improvement,enhancement,help wanted' exempt-all-pr-assignees: true - stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.' - stale-pr-message: 'This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.' - close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity.' - close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity.' - days-before-issue-stale: 120 - days-before-pr-stale: 120 - days-before-issue-close: 30 - days-before-pr-close: 30 + stale-issue-message: 'This issue is stale because it has been open 240 days with no activity. Remove stale label or comment or this will be closed in 90 days.' + stale-pr-message: 'This PR is stale because it has been open 240 days with no activity. Remove stale label or comment or this will be closed in 90 days.' + close-issue-message: 'This issue was closed because it has been stale for 90 days with no activity.' + close-pr-message: 'This PR was closed because it has been stale for 90 days with no activity.' + days-before-issue-stale: 240 + days-before-pr-stale: 240 + days-before-issue-close: 90 + days-before-pr-close: 90 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ce1ac3..c4d3a4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,8 @@ on: env: OCI_EXE: docker + ORG: dockcross + BUILD_IMAGE_ARGS: --cache-from type=gha --cache-to type=gha,mode=max jobs: base: @@ -32,7 +34,7 @@ jobs: - name: archive base run: | mkdir -p cache - docker save dockcross/base:latest | xz -e6 -T0 > ./cache/base.tar.xz + docker save ${{ env.ORG }}/base:latest | xz -e6 -T0 > ./cache/base.tar.xz - name: save base uses: actions/upload-artifact@v7 @@ -50,16 +52,10 @@ jobs: - name: deploy if: github.ref == 'refs/heads/master' - run: | - docker image push dockcross/base --all-tags - - base-multiarch: - name: base-multiarch - runs-on: ${{ matrix.os }} - strategy: - max-parallel: 5 - matrix: - os: [ubuntu-22.04, ubuntu-22.04-arm] + run: make base.push + base-arm64: + name: base-arm64 + runs-on: ubuntu-22.04-arm steps: - name: checkout code uses: actions/checkout@v6 @@ -67,1312 +63,114 @@ jobs: submodules: "recursive" fetch-depth: 1 - - name: set host_arch - run: | - echo "HOST_ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')" >> $GITHUB_ENV + - name: build + run: make base - - name: build multiarch - run: | - make base-${{ env.HOST_ARCH }} - - - name: test multiarch - run: | - mkdir -p bin - make base-${{ env.HOST_ARCH }}.test + - name: test + run: make base.test - name: archive base run: | mkdir -p cache - docker save dockcross/base:latest-${{ env.HOST_ARCH }} | xz -e6 -T0 > ./cache/base-multiarch.tar.xz + docker save ${{ env.ORG }}/base:latest | xz -e6 -T0 > ./cache/base.tar.xz - name: save base uses: actions/upload-artifact@v7 with: - name: cache-${{ matrix.os }} + name: cache-arm64 path: ./cache retention-days: 3 - - name: Login to Docker Hub - if: github.ref == 'refs/heads/master' - uses: docker/login-action@v4 - with: - username: ${{ secrets.DOCKER_USER }} - password: ${{ secrets.DOCKER_PASS }} - - - name: deploy - if: github.ref == 'refs/heads/master' - run: | - docker image push dockcross/base --all-tags - images: - needs: [base, base-multiarch] + needs: [base, base-arm64] runs-on: ${{ matrix.os }} - env: - OCI_EXE: docker strategy: fail-fast: false matrix: os: [ubuntu-22.04, ubuntu-22.04-arm] arch_name: # Android images - - { - image: "android-arm", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7 COMP=ndk", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "android-arm no-shared", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "--host=arm-linux-androideabi --target=arm-linux-androideabi", - } - - { - image: "android-arm64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv8 COMP=ndk", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "android-arm64 no-shared", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "--host=aarch64-linux-android --target=aarch64-linux-android", - } - - { - image: "android-x86", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-32 COMP=ndk", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "android-x86 no-shared", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "--host=i686-linux-android --target=i686-linux-android", - } - - { - image: "android-x86_64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64 COMP=ndk", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "android-x86_64 no-shared", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "--host=x86_64-linux-android --target=x86_64-linux-android", - } - # inux arm64/armv8 images - - { - image: "linux-arm64", - multiarch: "yes", - stockfish: "yes", - stockfish_arg: "ARCH=armv8", - ninja: "yes", - ninja_arg: "", - openssl: "no", - openssl_arg: "linux-aarch64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "yes", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } - - { - image: "linux-arm64-lts", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv8", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } - - { - image: "linux-arm64-musl", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv8", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-linux-musl --target=aarch64-linux-musl", - } - - { - image: "linux-arm64-full", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv8", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-buildroot-linux-gnu --target=aarch64-buildroot-linux-gnu", - } - # Linux mipel images - - { - image: "linux-mipsel-lts", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } + - { image: "android-arm", multiarch: "" } + - { image: "android-arm64", multiarch: "" } + - { image: "android-x86", multiarch: "" } + - { image: "android-x86_64", multiarch: "" } + # Linux arm64/armv8 images + - { image: "linux-arm64", multiarch: "yes" } + - { image: "linux-arm64-lts", multiarch: "" } + - { image: "linux-arm64-musl", multiarch: "" } + - { image: "linux-arm64-full", multiarch: "" } + # Linux mipsel images + - { image: "linux-mipsel-lts", multiarch: "" } # Linux armv5 images - - { - image: "linux-armv5", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv5-unknown-linux-gnueabi --target=armv5-unknown-linux-gnueabi", - } - - { - image: "linux-armv5-musl", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv5-unknown-linux-musleabi --target=armv5-unknown-linux-musleabi", - } - - { - image: "linux-armv5-uclibc", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=arm-unknown-linux-uclibcgnueabi --target=arm-unknown-linux-uclibcgnueabi", - } + - { image: "linux-armv5", multiarch: "" } + - { image: "linux-armv5-musl", multiarch: "" } + - { image: "linux-armv5-uclibc", multiarch: "" } # Linux armv6 images - - { - image: "linux-armv6", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv6-unknown-linux-gnueabihf --target=armv6-unknown-linux-gnueabihf", - } - - { - image: "linux-armv6-lts", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv6-unknown-linux-gnueabihf --target=armv6-unknown-linux-gnueabihf", - } - - { - image: "linux-armv6-musl", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv6-linux-musleabihf --target=armv6-linux-musleabihf", - } + - { image: "linux-armv6", multiarch: "" } + - { image: "linux-armv6-lts", multiarch: "" } + - { image: "linux-armv6-musl", multiarch: "" } # Linux armv7 images - - { - image: "linux-armv7", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv7-unknown-linux-gnueabi --target=armv7-unknown-linux-gnueabi", - } - - { - image: "linux-armv7a", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7-neon", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=arm-cortexa8_neon-linux-gnueabihf --target=arm-cortexa8_neon-linux-gnueabihf", - } - - { - image: "linux-armv7a-lts", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7-neon", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=arm-cortexa8_neon-linux-gnueabihf --target=arm-cortexa8_neon-linux-gnueabihf", - } - - { - image: "linux-armv7-lts", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv7-unknown-linux-gnueabi --target=armv7-unknown-linux-gnueabi", - } - - { - image: "linux-armv7l-musl", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=armv7", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-armv4", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=armv7l-linux-musleabihf --target=armv7l-linux-musleabihf", - } + - { image: "linux-armv7", multiarch: "" } + - { image: "linux-armv7a", multiarch: "" } + - { image: "linux-armv7a-lts", multiarch: "" } + - { image: "linux-armv7-lts", multiarch: "" } + - { image: "linux-armv7l-musl", multiarch: "" } # Linux x86 images - - { - image: "linux-x86", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-32-sse41-popcnt", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } + - { image: "linux-x86", multiarch: "" } # Linux i686 images - - { - image: "linux-i686", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic32", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=i686-linux-gnu --target=i686-linux-gnu", - } + - { image: "linux-i686", multiarch: "" } # Linux x86_64 images - - { - image: "linux-x64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86_64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } - - { - image: "linux-x64-tinycc", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic64 no-tests no-asm no-hw no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "linux-x64-clang", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern COMP=clang", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86_64-clang", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } - - { - image: "linux-x86_64-full", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86_64", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=x86_64-buildroot-linux-gnu --target=x86_64-buildroot-linux-gnu", - } + - { image: "linux-x64", multiarch: "" } + - { image: "linux-x64-tinycc", multiarch: "" } + - { image: "linux-x64-clang", multiarch: "" } + - { image: "linux-x86_64-full", multiarch: "" } # Linux riscv images - - { - image: "linux-riscv32", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic32", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=riscv32-unknown-linux-gnu --target=riscv32-unknown-linux-gnu", - } - - { - image: "linux-riscv64", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=riscv64-unknown-linux-gnu --target=riscv64-unknown-linux-gnu", - } + - { image: "linux-riscv32", multiarch: "" } + - { image: "linux-riscv64", multiarch: "" } # Linux s390x images - - { - image: "linux-s390x", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux64-s390x", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=s390x-ibm-linux-gnu --target=s390x-ibm-linux-gnu", - } + - { image: "linux-s390x", multiarch: "" } # Linux loongarch64 images - - { - image: "linux-loongarch64", - stockfish: "yes", - stockfish_arg: "ARCH=loongarch64", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux64-loongarch64", - C: "yes", - C_arg: "-DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types", - C-Plus-Plus: "yes", - C-Plus-Plus_arg: "", - fmt: "yes", - fmt_arg: "", - cpython: "yes", - cpython_arg: "--host=loongarch64-unknown-linux-gnu --target=loongarch64-unknown-linux-gnu", - } + - { image: "linux-loongarch64", multiarch: "" } # Linux mips images - - { - image: "linux-mips", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic32", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=mips-unknown-linux-gnu --target=mips-unknown-linux-gnu", - } - - { - image: "linux-mips-uclibc", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic32", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=mips-unknown-linux-uclibc --target=mips-unknown-linux-uclibc", - } - # Linux mips images - - { - image: "linux-mips-lts", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic32", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=mips-unknown-linux-gnu --target=mips-unknown-linux-gnu", - } - # Linux ppc images - - { - image: "linux-ppc", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-ppc", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "yes", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=powerpc-unknown-linux-gnu --target=powerpc-unknown-linux-gnu", - } - # Linux ppc64le images - - { - image: "linux-ppc64le", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=ppc-64", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-ppc64le", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "yes", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=powerpc64le-unknown-linux-gnu --target=powerpc64le-unknown-linux-gnu", - } - # Linux ppc64le-lts images - - { - image: "linux-ppc64le-lts", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=ppc-64", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-ppc64le", - C: "yes", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=powerpc64le-unknown-linux-gnu --target=powerpc64le-unknown-linux-gnu", - } + - { image: "linux-mips", multiarch: "" } + - { image: "linux-mips-uclibc", multiarch: "" } + - { image: "linux-mips-lts", multiarch: "" } + # Linux ppc images + - { image: "linux-ppc", multiarch: "" } + - { image: "linux-ppc64le", multiarch: "" } + - { image: "linux-ppc64le-lts", multiarch: "" } # Linux m68k images - - { - image: "linux-m68k-uclibc", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "linux-generic32 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "--host=m68k-unknown-uclinux-uclibc --target=m68k-unknown-uclinux-uclibc", - } + - { image: "linux-m68k-uclibc", multiarch: "" } # Linux xtensa images - - { - image: "linux-xtensa-uclibc", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=xtensa-fsf-linux-uclibc --target=xtensa-fsf-linux-uclibc", - } - # Windows x86_x64 images - - { - image: "windows-static-x64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern COMP=mingw", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw64 no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "windows-static-x64-posix", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern COMP=mingw", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw64 no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "windows-shared-x64", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw64 no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "windows-shared-x64-posix", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw64 no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } + - { image: "linux-xtensa-uclibc", multiarch: "" } + # Windows x86_64 images + - { image: "windows-static-x64", multiarch: "" } + - { image: "windows-static-x64-posix", multiarch: "" } + - { image: "windows-shared-x64", multiarch: "" } + - { image: "windows-shared-x64-posix", multiarch: "" } # Windows x86 images - - { - image: "windows-static-x86", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-32-sse41-popcnt COMP=mingw", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "windows-shared-x86", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } + - { image: "windows-static-x86", multiarch: "" } + - { image: "windows-shared-x86", multiarch: "" } # Windows arm images - - { - image: "windows-armv7", - multiarch: "", - stockfish: "no", - stockfish_arg: "ARCH=armv7-neon COMP=clang", - ninja: "yes", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "yes", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - - { - image: "windows-arm64", - multiarch: "", - stockfish: "no", - stockfish_arg: "ARCH=armv8 COMP=clang", - ninja: "yes", - ninja_arg: "", - openssl: "no", - openssl_arg: "mingw64 no-asm", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "yes", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } + - { image: "windows-armv7", multiarch: "" } + - { image: "windows-arm64", multiarch: "" } # manylinux_2_28 images - - { - image: "manylinux_2_28-x64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86_64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } - - { - image: "manylinux_2_28-aarch64", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } + - { image: "manylinux_2_28-x64", multiarch: "" } + - { image: "manylinux_2_28-aarch64", multiarch: "" } + # manylinux_2_34 images + - { image: "manylinux_2_34-x64", multiarch: "" } + - { image: "manylinux_2_34-aarch64", multiarch: "" } # manylinux2014 images - - { - image: "manylinux2014-x86", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-32-sse41-popcnt", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } - - { - image: "manylinux2014-x64", - multiarch: "", - stockfish: "yes", - stockfish_arg: "ARCH=x86-64-modern", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-x86_64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "yes", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "", - } - - { - image: "manylinux2014-aarch64", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } - # manylinux_2_34 aarch64 images - - { - image: "manylinux_2_34-aarch64", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } - # web-wasm images - - { - image: "web-wasm", - multiarch: "yes", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "yes", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "-DPLATFORM=Web", - cpython: "no", - cpython_arg: "", - } - # web-wasi images - - { - image: "web-wasi", - multiarch: "yes", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } - # web-wasi-threads images - - { - image: "web-wasi-threads", - multiarch: "yes", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - } + - { image: "manylinux2014-x86", multiarch: "" } + - { image: "manylinux2014-x64", multiarch: "" } + - { image: "manylinux2014-aarch64", multiarch: "" } + # web-wasm/web-wasi images + - { image: "web-wasm", multiarch: "yes" } + - { image: "web-wasi", multiarch: "yes" } + - { image: "web-wasi-threads", multiarch: "yes" } + - { image: "web-wasi-emulated-threads", multiarch: "yes" } # Bare metal images - - { - image: "bare-armv7emhf-nano_newlib", - multiarch: "", - stockfish: "no", - stockfish_arg: "", - ninja: "no", - ninja_arg: "", - openssl: "no", - openssl_arg: "", - C: "no", - C_arg: "", - SQLite: "no", - SQLite_arg: "", - llama_cpp: "no", - llama_cpp_arg: "", - fmt: "no", - fmt_arg: "", - raylib: "no", - raylib_arg: "", - cpython: "no", - cpython_arg: "", - mbedtls: "yes", - mbedtls_arg: "", - libopencm3: "yes", - libopencm3_arg: "", - } + - { image: "bare-armv7emhf-nano_newlib", multiarch: "" } steps: - name: checkout code uses: actions/checkout@v6 @@ -1380,176 +178,45 @@ jobs: submodules: "recursive" fetch-depth: 1 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: set host_arch run: | echo "HOST_ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')" >> $GITHUB_ENV - - uses: actions/download-artifact@v8 + - name: download base (amd64) + if: env.HOST_ARCH == 'amd64' + uses: actions/download-artifact@v8 with: name: cache path: ./cache + - name: download base (arm64) + if: env.HOST_ARCH == 'arm64' + uses: actions/download-artifact@v8 + with: + name: cache-arm64 + path: ./cache + - name: load base run: xz -d -k < ./cache/base.tar.xz | docker load - - uses: actions/download-artifact@v8 - with: - name: cache-${{ matrix.os }} - path: ./cache - - - name: load multiarch base - run: xz -d -k < ./cache/base-multiarch.tar.xz | docker load - - name: build - env: - BUILD_CMD: build --cache-from type=gha --cache-to type=gha,mode=max - run: | - if test "${{ matrix.arch_name.multiarch }}" = "yes"; then - make ${{ matrix.arch_name.image }} - elif test "${{ env.HOST_ARCH }}" = "amd64"; then - make ${{ matrix.arch_name.image }} - fi + if: matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64' + run: make ${{ matrix.arch_name.image }} - name: basic test - run: | - if test "${{ matrix.arch_name.multiarch }}" = "yes" || test "${{ env.HOST_ARCH }}" = "amd64"; then - make ${{ matrix.arch_name.image }}.test - fi + if: matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64' + run: make ${{ matrix.arch_name.image }}.test - # Updated on 15/07/2025 - - name: stockfish build test - if: ${{ matrix.arch_name.stockfish == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch sf_17.1 https://github.com/official-stockfish/Stockfish.git - cd Stockfish - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -C src net - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -C src build ${{ matrix.arch_name.stockfish_arg }} -j${nproc} - cd .. - rm -rf Stockfish - - # Updated on 12/09/2022 - - name: ninja build test - if: ${{ matrix.arch_name.ninja == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch v1.11.1 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 04/04/2025 (Use openSSL_1_1_1w to fix error: implicit declaration of function 'memcmp') - - name: openssl build test - if: ${{ matrix.arch_name.openssl == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch OpenSSL_1_1_1w https://github.com/openssl/openssl.git - cd openssl - wget https://raw.githubusercontent.com/mavlink/MAVSDK/17ad598f0e004d225f5e939aa2947a95791f2f9b/cpp/third_party/openssl/dockcross-android.patch - patch -p 0 < dockcross-android.patch - ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} ./Configure ${{ matrix.arch_name.openssl_arg }} - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j${nproc} - cd .. - rm -rf openssl - - # Updated on 12/09/2022 - - name: C build test - if: ${{ matrix.arch_name.C == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone https://github.com/TheAlgorithms/C.git - cd C - git checkout b0a41bb38c67ddebb31d3fe06d11e171410c3379 - ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.C_arg }} - cd .. - rm -rf C - - # Updated on 03/08/2025 - - name: SQLite build test - if: ${{ matrix.arch_name.SQLite == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone https://github.com/sqlite/sqlite.git - cd sqlite - git checkout 1cf61ce636915a5e92d4aa883755cee258aa98d6 - ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} ./configure ${{ matrix.arch_name.SQLite_arg }} - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j${nproc} sqlite3 sqlite3.c sqldiff - cd .. - rm -rf sqlite - - # Updated on 03/08/2024 - - name: llama.cpp build test - if: ${{ matrix.arch_name.llama_cpp == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone https://github.com/ggerganov/llama.cpp.git - cd llama.cpp - git checkout 76614f352e94d25659306d9e97321f204e5de0d3 - ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.llama_cpp_arg }} - cd .. - rm -rf llama.cpp - - # Updated on 12/09/2022 - - name: fmt build test - if: ${{ matrix.arch_name.fmt == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch 9.1.0 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 19/05/2022 - - name: cpython build test - if: ${{ matrix.arch_name.cpython == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch v3.11.2 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 --with-build-python --enable-shared - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} -j${nproc} - cd .. - rm -rf cpython - - # Updated on 12/09/2022 (4.2.0 branch not working) - - name: raylib build test - if: ${{ matrix.arch_name.raylib == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone https://github.com/raysan5/raylib.git - cd raylib - git checkout a12ddacb7bfbc6e552e6145456f2fe6dfdfbe1c7 - ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.raylib_arg }} - cd .. - rm -rf raylib - - # Updated on 31/3/2022 - - name: mbedtls build test - if: ${{ matrix.arch_name.mbedtls == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone --depth 1 --branch archive/baremetal https://github.com/Mbed-TLS/mbedtls.git - cd mbedtls - ./../tools/dockcross-command.sh ${{ matrix.arch_name.image }} scripts/config.pl baremetal - ./../tools/dockcross-cmake-builder.sh ${{ matrix.arch_name.image }} ${{ matrix.arch_name.fmt_arg }} - cd .. - rm -rf mbedtls - - # Updated on 20/6/2022 - - name: libopencm3 build test - if: ${{ matrix.arch_name.libopencm3 == 'yes' && (matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64') }} - run: | - git clone https://github.com/libopencm3/libopencm3.git - cd libopencm3 - git checkout 467522778329d6f41781a6c951b77d6ff6744de6 - ./../tools/dockcross-make-builder.sh ${{ matrix.arch_name.image }} "PREFIX=/usr/xcc/arm-none-eabi/bin/arm-none-eabi- \ - TARGETS='stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 \ - stm32/l1 stm32/l4 stm32/g4 stm32/h7 gd32/f1x0 lpc13xx \ - lpc17xx lpc43xx/m4 lm3s lm4f msp432/e4 efm32/tg efm32/g \ - efm32/lg efm32/gg efm32/wg efm32/ezr32wg nrf/51 nrf/52 \ - sam/3a sam/3n sam/3s sam/3u sam/3x sam/4l vf6xx pac55xx' \ - -j`nproc`" - cd .. - rm -rf libopencm3 + - name: extra tests + if: matrix.arch_name.multiarch == 'yes' || env.HOST_ARCH == 'amd64' + run: make ${{ matrix.arch_name.image }}.test-extra - name: archive ${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }} if: matrix.arch_name.multiarch == 'yes' run: | mkdir -p cache-${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }} - docker save dockcross/${{ matrix.arch_name.image }}:latest-${{ env.HOST_ARCH }} | xz -e6 -T0 > ./cache-${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }}/${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }}.tar.xz + docker tag ${{ env.ORG }}/${{ matrix.arch_name.image }}:latest ${{ env.ORG }}/${{ matrix.arch_name.image }}:latest-${{ env.HOST_ARCH }} + docker save ${{ env.ORG }}/${{ matrix.arch_name.image }}:latest-${{ env.HOST_ARCH }} | xz -e6 -T0 > ./cache-${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }}/${{ matrix.arch_name.image }}-${{ env.HOST_ARCH }}.tar.xz - name: save ${{ matrix.arch_name.image }}-${{ matrix.os }} uses: actions/upload-artifact@v7 @@ -1568,8 +235,7 @@ jobs: - name: deploy-not-multi-arch if: github.ref == 'refs/heads/master' && matrix.arch_name.multiarch != 'yes' && env.HOST_ARCH == 'amd64' - run: | - make ${{ matrix.arch_name.image }}.push + run: make ${{ matrix.arch_name.image }}.push deploy-multi-arch-images: needs: @@ -1578,7 +244,7 @@ jobs: strategy: fail-fast: false matrix: - image_name: ["linux-arm64", "web-wasm", "web-wasi", "web-wasi-threads"] + image_name: ["linux-arm64", "web-wasm", "web-wasi", "web-wasi-threads", "web-wasi-emulated-threads"] steps: - name: checkout code uses: actions/checkout@v6 @@ -1620,14 +286,9 @@ jobs: - name: deploy-multi-arch if: github.ref == 'refs/heads/master' run: | - docker images - - make ${{ matrix.image_name }}.tag-amd64 - make ${{ matrix.image_name }}.push-amd64 - - export HOST_ARCH=arm64 - make ${{ matrix.image_name }}.tag-arm64 - make ${{ matrix.image_name }}.push-arm64 - unset HOST_ARCH - - make ${{ matrix.image_name }}.push + docker push ${{ env.ORG }}/${{ matrix.image_name }}:latest-amd64 + docker push ${{ env.ORG }}/${{ matrix.image_name }}:latest-arm64 + manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template ${{ env.ORG }}/${{ matrix.image_name }}:latest-ARCH \ + --target ${{ env.ORG }}/${{ matrix.image_name }}:latest diff --git a/.gitignore b/.gitignore index 649717f..0f10de2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ bin +.dockcross-test-cache dockcross dockcross-* build diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..c9ebf2d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python-envs.defaultEnvManager": "ms-python.python:system" +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd4d6e8..c15eb8a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -198,39 +198,51 @@ Once this part is finished, there must be 3 files in the `linux-arm64` folder: ### Makefile -For this last part, we will see how to add the image to the [Makefile](Makefile) and to a github action. +The [Makefile](Makefile) is generic: it knows how to generate/build/test/push +an image out of a "preset" directory, but it has no built-in knowledge of the +actual list of dockcross images. Every image folder is a preset that is +auto-discovered because it contains a `preset.mk` file - there is no central +list to edit anymore. -You need to add the image/folder name (**linux-arm64**) to the **STANDARD_IMAGES** variable in the [Makefile](Makefile): +To add the image to the build system, create **`linux-arm64/preset.mk`**: ```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 +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-arm64 ``` -You need to add the image/folder name (`linux-arm64`) to the `GEN_IMAGES` variable in the [Makefile](Makefile): +`BASE_IMAGE_NAME = base` / `BASE_IMAGE_TAG = latest` matches the common case +where `Dockerfile.in` starts with `ARG ORG=dockcross` / `FROM ${ORG}/base:latest` +(the image is built on top of the local `base` preset). `OUTPUT_IMAGE_NAME` +should match the folder name so the built image is tagged +`//linux-arm64`. -```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 -``` +A `preset.mk` can override or add anything the generic Makefile doesn't +already do the right thing for, for example: + +- `TEST_IMAGE_CMD` / `TEST_IMAGE_ARGS`: override the command run by `make + .test` (defaults to `python3 test/run.py`). E.g. an image that only + supports C needs `TEST_IMAGE_ARGS = --languages C`. +- `BUILD_CONTEXT_DIR`: override the docker build context directory. Defaults + to the preset's own folder; a few images (the manylinux\*-aarch64/x64/x86 + family) `COPY` files from sibling folders and need + `BUILD_CONTEXT_DIR = $(PRESET_DIR)` (the repository root) instead. +- `DEPENDS_ON`: list of `.build` targets that must be built first, + for images whose `Dockerfile.in` is `FROM ${ORG}/:latest` + (e.g. `manylinux2014-aarch64` depends on `manylinux2014-x64`). +- `EXTRA_BUILD_ARGS`: extra `--build-arg KEY=VALUE` flags. +- `STATIC_DOCKERFILE = yes`: for the rare image that ships a committed + `Dockerfile` instead of a generated `Dockerfile.in`. + +See [linux-arm64/preset.mk](linux-arm64/preset.mk) and, for the more +involved cases, [manylinux2014-aarch64/preset.mk](manylinux2014-aarch64/preset.mk) +or [web-wasm/preset.mk](web-wasm/preset.mk). ### Image building and testing @@ -268,27 +280,41 @@ With CMake + Ninja: ### CI (github action) -To finish, you have to add to `.github/workflows/main.yml` the image/folder name: +To finish, you have to add the image/folder name to the `images` job's matrix +in `.github/workflows/main.yml`: ```yml # Linux arm64/armv8 images - - { - image: "linux-arm64", - stockfish: "yes", - stockfish_arg: "ARCH=armv8", - ninja: "yes", - ninja_arg: "", - openssl: "yes", - openssl_arg: "linux-aarch64", - C: "yes", - C_arg: "", - C-Plus-Plus: "yes", - C-Plus-Plus_arg: "", - fmt: "yes", - fmt_arg: "", - cpython: "yes", - cpython_arg: "--host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu", - } + - { image: "linux-arm64", multiarch: "yes" } ``` -You can disable and enable the build of certain tests which can cause problems with certain CPU architectures (eg. OpenSSL with Risc-V...). +`multiarch: "yes"` is only for the handful of images that are natively built +and published for both amd64 and arm64 (see `deploy-multi-arch-images` in the +same file); everything else should leave it empty. + +That's the only thing the CI workflow needs to know. It builds the image with +`make `, runs the fast in-container smoke test with `make +.test`, and then `make .test-extra` - which builds a handful of +real upstream projects (Stockfish, CMake, OpenSSL, CPython, ...) with the +image's toolchain. Which of those extra tests apply to this image and their +architecture-specific flags are **not** set in the workflow: they belong in +the image's own `preset.mk`, e.g.: + +```make +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv8 +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu +``` + +What each extra test actually clones and builds is defined once in the +[Makefile](Makefile) ("Extra tests" section) so it stays identical across +every image. You can run any of them locally, the same way CI does: + +```bash +make linux-arm64.test-extra # everything EXTRA_TESTS lists +make linux-arm64.test-stockfish # one test directly, regardless of EXTRA_TESTS +``` + +Leave `EXTRA_TESTS` unset for images where a given upstream project doesn't +build (e.g. OpenSSL on some RISC-V targets). diff --git a/Dockerfile.in b/Dockerfile.in index ac53fff..9531e55 100644 --- a/Dockerfile.in +++ b/Dockerfile.in @@ -1,5 +1,5 @@ -ARG DOCKER_IMAGE=debian:bookworm-slim -FROM $DOCKER_IMAGE +ARG BASE_IMAGE=debian:bookworm-slim +FROM $BASE_IMAGE LABEL maintainer="Matt McCormick matt@mmmccormick.com" diff --git a/Makefile b/Makefile index a2d1275..f7a912b 100644 --- a/Makefile +++ b/Makefile @@ -1,440 +1,420 @@ +# ============================================================================== +# Preset detection +# ============================================================================== +PRESET_DIR ?= . -# -# Parameters -# +HOST_ARCH := $(or $(HOST_ARCH), $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')) -# Name of the docker-equivalent executable for building images. -# OCI: open container interface. -# Common values: docker, podman, buildah -DOCKER := $(or $(OCI_EXE), docker) -BUILD_DOCKER := $(or $(BUILD_DOCKER), $(DOCKER)) -MANIFEST_TOOL := $(or $(MANIFEST_TOOL_EXE), manifest-tool) -RM = --rm +preset-path = $(if $(filter base,$(1)),$(PRESET_DIR),$(PRESET_DIR)/$(1)) -# Name of the docker-equivalent executable for running test containers. -# Supports the use case: -# -# DOCKER=buildah -# TEST_DOCKER=podman -# -# because buildah does not run containers. -TEST_DOCKER := $(or $(TEST_DOCKER), $(DOCKER)) +build-context-dir = $(if $(BUILD_CONTEXT_DIR),$(BUILD_CONTEXT_DIR),$(call preset-path,$(1))) -# The build sub-command. Use: -# -# export "BUILD_CMD=buildx build --platform linux/amd64,linux/arm64" -# -# to generate multi-platform images. -BUILD_CMD := $(or $(BUILD_CMD), build) -TAG_FLAG := $(or $(TAG_FLAG), --tag) +PRESET_FILES := $(shell find $(PRESET_DIR) -name .git -prune -o -mindepth 2 -name "preset.mk" -print) +ALL_PRESETS := base $(patsubst $(PRESET_DIR)/%/preset.mk,%,$(PRESET_FILES)) -# Docker organization to pull the images from -ORG = dockcross +CURRENT_TARGET_NAME := $(firstword $(MAKECMDGOALS)) -# Host architecture -HOST_ARCH := $(or $(HOST_ARCH), $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')) +POSSIBLE_PRESET := $(basename $(CURRENT_TARGET_NAME)) -# Directory where to generate the dockcross script for each images (e.g bin/dockcross-manylinux2014-x64) -BIN = ./bin - -# These images are built using the "build implicit rule" -STANDARD_IMAGES := android-arm android-arm64 android-x86 android-x86_64 \ - linux-i686 linux-x86 linux-x64 linux-x64-clang 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-mipsel-lts \ - linux-armv7l-musl linux-armv7 linux-armv7a linux-armv7-lts linux-armv7a-lts linux-x86_64-full \ - linux-loongarch64 linux-mips linux-mips-uclibc linux-mips-lts \ - linux-ppc linux-ppc64le linux-ppc64le-lts linux-riscv64 linux-riscv32 linux-xtensa-uclibc \ - windows-static-x86 windows-static-x64 windows-static-x64-posix windows-armv7 \ - windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64 \ - bare-armv7emhf-nano_newlib - -# Generated Dockerfiles. -GEN_IMAGES := android-arm android-arm64 \ - linux-i686 linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ - manylinux_2_28-x64 manylinux_2_34-x64 \ - manylinux2014-x64 manylinux2014-x86 \ - manylinux2014-aarch64 manylinux_2_28-aarch64 manylinux_2_34-aarch64 linux-arm64-lts \ - web-wasm web-wasi web-wasi-emulated-threads web-wasi-threads \ - linux-loongarch64 linux-mips linux-mips-uclibc linux-mips-lts 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-armv7a-lts linux-x86_64-full \ - linux-armv6 linux-armv6-lts linux-armv6-musl linux-mipsel-lts \ - linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-ppc linux-ppc64le linux-ppc64le-lts linux-s390x \ - linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-x64-tinycc linux-xtensa-uclibc \ - bare-armv7emhf-nano_newlib - -# Generate both amd64 and arm64 images -MULTIARCH_IMAGES := linux-arm64 \ - web-wasi web-wasi-emulated-threads - -GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) - -# These images are expected to have explicit rules for *both* build and testing -NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux_2_34-x64 manylinux2014-x64 manylinux2014-x86 \ - manylinux2014-aarch64 manylinux_2_28-aarch64 manylinux_2_34-aarch64 web-wasm web-wasi-emulated-threads web-wasi-threads - -# Docker composite files -DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.manylinux_2_34 common.buildroot \ - common.crosstool common.webassembly common.windows common-manylinux.crosstool common-manylinux_2_28.crosstool common-manylinux_2_34.crosstool common.dockcross \ - common.label-and-env -DOCKER_COMPOSITE_FOLDER_PATH = common/ -DOCKER_COMPOSITE_PATH = $(addprefix $(DOCKER_COMPOSITE_FOLDER_PATH),$(DOCKER_COMPOSITE_SOURCES)) - -# This list all available images -IMAGES := $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) $(MULTIARCH_IMAGES) - -# Optional arguments for test runner (test/run.py) associated with "testing implicit rule" -linux-x64-tinycc.test_ARGS = --languages C -windows-static-x86.test_ARGS = --exe-suffix ".exe" -windows-static-x64.test_ARGS = --exe-suffix ".exe" -windows-static-x64-posix.test_ARGS = --exe-suffix ".exe" -windows-shared-x86.test_ARGS = --exe-suffix ".exe" -windows-shared-x64.test_ARGS = --exe-suffix ".exe" -windows-shared-x64-posix.test_ARGS = --exe-suffix ".exe" -windows-armv7.test_ARGS = --exe-suffix ".exe" -windows-arm64.test_ARGS = --exe-suffix ".exe" -bare-armv7emhf-nano_newlib.test_ARGS = --linker-flags="--specs=nosys.specs" - -# Tag images with date and Git short hash in addition to revision -TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD) - -# shellcheck executable -SHELLCHECK := shellcheck - -# Defines the level of verification (error, warning, info...) -SHELLCHECK_SEVERITY_LEVEL := error - -# -# images: This target builds all IMAGES (because it is the first one, it is built by default) -# -images: base $(IMAGES) - -# -# test: This target ensures all IMAGES are built and run the associated tests -# -test: base.test $(addsuffix .test,$(IMAGES)) - -# -# Generic Targets (can specialize later). -# -$(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOSITE_PATH) - sed $(foreach f,$(DOCKER_COMPOSITE_SOURCES),-e '/$(f)/ r $(DOCKER_COMPOSITE_FOLDER_PATH)$(f)') $< > $@ - -# -# web-wasm -# -ifeq ($(HOST_ARCH),amd64) - EMSCRIPTEN_HOST_ARCH_TAG = "" +ifeq ($(POSSIBLE_PRESET),base) + -include $(PRESET_DIR)/preset.mk +else ifneq ($(wildcard $(PRESET_DIR)/$(POSSIBLE_PRESET)/preset.mk),) + include $(PRESET_DIR)/$(POSSIBLE_PRESET)/preset.mk endif -ifeq ($(HOST_ARCH),arm64) - EMSCRIPTEN_HOST_ARCH_TAG = "-arm64" + +# ============================================================================== +# Main config Makefile for Docker SDK Images +# ============================================================================== +AUTHOR ?= dockcross +WEB_SITE ?= dockcross.org + +# Registries +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross + +# Docker Config +DOCKER_EXEC ?= docker +PROGRESS_OUTPUT ?= plain + +PUSH_ON_BUILD ?= false +ifeq ($(PUSH_ON_BUILD),true) + DOCKER_DRIVER := --push + BUILD_IMAGE_ARGS += --sbom=true --provenance=true + BUILD_IMAGE_ARGS += --cache-from=type=registry,ref=$(OUTPUT_IMAGE_FINAL):cache + BUILD_IMAGE_ARGS += --cache-to=type=registry,ref=$(OUTPUT_IMAGE_FINAL):cache,mode=max +else + DOCKER_DRIVER := --load endif -web-wasm: web-wasm/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - cp -r test web-wasm/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/web-wasm:$(TAG)-$(HOST_ARCH) \ - $(TAG_FLAG) $(ORG)/web-wasm:latest-$(HOST_ARCH) \ - --build-arg IMAGE=$(ORG)/web-wasm \ - --build-arg VERSION=$(TAG) \ - --build-arg HOST_ARCH_TAG=$(EMSCRIPTEN_HOST_ARCH_TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - web-wasm - rm -rf web-wasm/test - rm -rf $@/imagefiles -web-wasm.test: web-wasm - cp -r test web-wasm/ - $(TEST_DOCKER) run $(RM) $(ORG)/web-wasm:latest-$(HOST_ARCH) > $(BIN)/dockcross-web-wasm && chmod +x $(BIN)/dockcross-web-wasm - $(BIN)/dockcross-web-wasm -i $(ORG)/web-wasm:latest-$(HOST_ARCH) python test/run.py --exe-suffix ".js" - rm -rf web-wasm/test +ARCH_LIST ?= linux/$(HOST_ARCH) +PLATFORMS ?= $(subst $(space),$(comma),$(strip $(ARCH_LIST))) +TMPFS_SIZE ?= 4g -# -# web-wasi-threads -# -web-wasi-threads: web-wasi web-wasi-threads/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - cp -r test web-wasi-threads/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/web-wasi-threads:$(TAG)-$(HOST_ARCH) \ - -t $(ORG)/web-wasi-threads:latest-$(HOST_ARCH) \ - --build-arg IMAGE=$(ORG)/web-wasi-threads \ - --build-arg VERSION=$(TAG) \ +DOCKER_BUILD_NETWORK ?= host + +# Folders +COMMON_DIR ?= common +BIN_DIR ?= ./bin +TEST_SCRATCH_DIR ?= ./.dockcross-test-cache + +EXTRA_TESTS ?= + +ORG ?= $(OUTPUT_IMAGE_REGISTRY)/$(OUTPUT_IMAGE_PATH) + +DOCKER_COMPOSITE_SOURCES = common.docker common.debian \ + common.manylinux2014 common.manylinux_2_28 common.manylinux_2_34 \ + common.buildroot common.crosstool common.webassembly common.windows \ + common-manylinux.crosstool common-manylinux_2_28.crosstool common-manylinux_2_34.crosstool \ + common.dockcross common.label-and-env + +# RUN/TEST +TEST_IMAGE_CMD ?= python3 test/run.py +TEST_IMAGE_ARGS ?= +RUN_IMAGE_CMD ?= /bin/bash +RUN_IMAGE_ARGS ?= + +BUILD_CONTEXT_DIR ?= +STATIC_DOCKERFILE ?= no +DEPENDS_ON ?= base.build +EXTRA_BUILD_ARGS ?= + +BIND_HOST_DIR := $(shell pwd) +BIND_CONTAINER_DIR ?= /work +WORKDIR ?= /work + +# Automatic variables +CURRENT_USER := $(shell whoami) +UID := $(shell id -u ${CURRENT_USER}) +GID := $(shell id -g ${CURRENT_USER}) +CURRENT_GROUP := $(shell id -gn ${CURRENT_USER}) + +BUILDER_ENV := -e BUILDER_UID=$(UID) -e BUILDER_GID=$(GID) -e BUILDER_USER=$(CURRENT_USER) -e BUILDER_GROUP=$(CURRENT_GROUP) +DATE := $(shell date -u +"%Y%m%d") +GIT_SHA := $(shell git rev-parse --short HEAD 2>/dev/null || echo nogit) +GIT_ORIGIN := $(shell git config --get remote.origin.url 2>/dev/null || echo unknown) +UUID := $(shell uuidgen) + +TRIVY_IMAGE ?= aquasec/trivy:0.68.2 +HADOLINT_IMAGE ?= hadolint/hadolint:v2.14.0 +SHELLCHECK_IMAGE ?= koalaman/shellcheck:stable + +# Tag images with date and Git short hash, mirroring the historical dockcross tagging scheme +TAG := $(DATE)-$(GIT_SHA) + +comma := , +space := $(subst ,, ) + +# ============================================================================== +# Presets logic +# ============================================================================== + +PRESET_TARGETS := all help build test push pull generate scan lint update clean run inspect sbom script \ + rebuild sign history cache check prepare-imagefiles test-extra +.PHONY: $(ALL_PRESETS) + +.DEFAULT_GOAL := list + +define BIND_PRESET_DEPENDENCIES + $(1).test: $(1).build + $(1).run: $(1).build + $(1).push: $(1).test + $(1).scan: $(1).build + $(1).lint: $(1).generate + $(1).sbom: $(1).build + $(1).inspect: $(1).build + $(1).history: $(1).build + $(1).script: $(1).build +endef + +$(foreach p,$(ALL_PRESETS),$(eval $(call BIND_PRESET_DEPENDENCIES,$(p)))) + +# Generate final image names +ifeq ($(strip $(BASE_IMAGE_PATH)),) + BASE_IMAGE_FINAL := $(BASE_IMAGE_REGISTRY)/$(BASE_IMAGE_NAME) +else + BASE_IMAGE_FINAL := $(BASE_IMAGE_REGISTRY)/$(BASE_IMAGE_PATH)/$(BASE_IMAGE_NAME) +endif + +OUTPUT_IMAGE_FINAL := $(ORG)/$(OUTPUT_IMAGE_NAME) + +# ============================================================================== +# Mandatory variables check +# ============================================================================== +MANDATORY_VARS = BASE_IMAGE_NAME BASE_IMAGE_TAG OUTPUT_IMAGE_NAME OUTPUT_IMAGE_REGISTRY \ + OUTPUT_IMAGE_PATH BASE_IMAGE_REGISTRY + +# ============================================================================== +# Useful functions +# ============================================================================== +define docker-tags + $(OUTPUT_IMAGE_FINAL):latest \ + $(OUTPUT_IMAGE_FINAL):latest-$(HOST_ARCH) \ + $(OUTPUT_IMAGE_FINAL):$(TAG) +endef + +define docker-push-tags + $(OUTPUT_IMAGE_FINAL):latest \ + $(OUTPUT_IMAGE_FINAL):$(TAG) +endef + +define docker-run-cmd + $(DOCKER_EXEC) run --rm $(1) $(BUILDER_ENV) \ + --security-opt no-new-privileges \ + --mount type=bind,source=$(BIND_HOST_DIR),target=$(BIND_CONTAINER_DIR) \ + --workdir $(WORKDIR) \ + --mount type=tmpfs,target=/tmp,tmpfs-mode=1777,tmpfs-size=$(TMPFS_SIZE) \ + --platform $(firstword $(ARCH_LIST)) \ + --name $(OUTPUT_IMAGE_NAME)-$(UUID) \ + $(OUTPUT_IMAGE_FINAL):latest $(2) $(3) +endef + +define extra-test-run + $(DOCKER_EXEC) run --rm $(BUILDER_ENV) \ + --mount type=bind,source=$(abspath $(TEST_SCRATCH_DIR)/$(1)),target=/work \ + --workdir /work \ + --platform $(firstword $(ARCH_LIST)) \ + $(OUTPUT_IMAGE_FINAL):latest bash -c "$(2)" +endef + +# ============================================================================== +# Preset targets +# ============================================================================== + +.PHONY: %.all %.generate %.build %.test %.run %.push %.pull %.scan %.clean %.prune %.update %.lint %.inspect %.sbom %.script %.prepare-imagefiles \ + %.rebuild %.sign %.history %.cache %.check %.test-extra \ + %.test-stockfish %.test-ninja %.test-openssl %.test-C %.test-SQLite %.test-llama_cpp \ + %.test-fmt %.test-cpython %.test-raylib %.test-mbedtls %.test-libopencm3 + +$(ALL_PRESETS): %: %.build + +%.all: %.update %.generate %.build %.test %.check %.push ; + +.PHONY: %.guard +%.guard: + $(foreach v,$(MANDATORY_VARS), \ + $(if $(strip $($(v))),, \ + $(error Missing mandatory var: $(v) (preset=$*)))) + +%.generate: %.guard %.clean +ifeq ($(STATIC_DOCKERFILE),yes) + @test -f $(call preset-path,$*)/Dockerfile || \ + (echo "Missing committed Dockerfile for $* (STATIC_DOCKERFILE=yes)" && exit 1) +else + @echo ">>> Generating Dockerfile for $*" + @sed $(foreach f,$(DOCKER_COMPOSITE_SOURCES),\ + -e '/$(f)/ r $(COMMON_DIR)/$(f)') \ + $(call preset-path,$*)/Dockerfile.in > $(call preset-path,$*)/Dockerfile +endif + +%.prepare-imagefiles: + @ctx="$(call build-context-dir,$*)"; \ + if [ "$$ctx" != "$(PRESET_DIR)" ]; then \ + mkdir -p "$$ctx/imagefiles" && cp -r $(PRESET_DIR)/imagefiles/. "$$ctx/imagefiles/"; \ + fi + +%.build: %.generate %.prepare-imagefiles + @$(DOCKER_EXEC) image inspect $(BASE_IMAGE_FINAL):$(BASE_IMAGE_TAG) >/dev/null 2>&1 || \ + { $(foreach d,$(DEPENDS_ON),$(MAKE) $(d);) true; } + $(DOCKER_EXEC) buildx build $(call build-context-dir,$*) \ + --file $(call preset-path,$*)/Dockerfile \ + --network $(DOCKER_BUILD_NETWORK) \ + --platform $(PLATFORMS) --progress $(PROGRESS_OUTPUT) \ + $(foreach tag,$(call docker-tags),--tag $(tag)) \ + --build-arg BUILD_DATE=$(DATE) \ + --build-arg ORG=$(ORG) \ --build-arg HOST_ARCH=$(HOST_ARCH) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - web-wasi-threads - -# -# manylinux2014-aarch64 -# -manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile manylinux2014-x64 - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-aarch64:$(TAG) \ - $(TAG_FLAG) $(ORG)/manylinux2014-aarch64:latest \ - --build-arg IMAGE=$(ORG)/manylinux2014-aarch64 \ + --build-arg IMAGE=$(ORG)/$(OUTPUT_IMAGE_NAME) \ --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux2014-aarch64/Dockerfile . - rm -rf $@/imagefiles + --build-arg VCS_REF=$(GIT_SHA) \ + --build-arg VCS_URL=$(GIT_ORIGIN) \ + --build-arg AUTHOR=$(AUTHOR) \ + --build-arg URL=$(WEB_SITE) \ + --build-arg BASE_IMAGE=$(BASE_IMAGE_FINAL):$(BASE_IMAGE_TAG) \ + --build-arg BASE_IMAGE_NAME=$(BASE_IMAGE_NAME) \ + --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \ + $(EXTRA_BUILD_ARGS) \ + $(BUILD_IMAGE_ARGS) $(DOCKER_DRIVER) -manylinux2014-aarch64.test: manylinux2014-aarch64 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-aarch64:latest > $(BIN)/dockcross-manylinux2014-aarch64 \ - && chmod +x $(BIN)/dockcross-manylinux2014-aarch64 - $(BIN)/dockcross-manylinux2014-aarch64 -i $(ORG)/manylinux2014-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py +%.script: %.build + @mkdir -p $(BIN_DIR) + $(DOCKER_EXEC) run --rm $(OUTPUT_IMAGE_FINAL):latest > $(BIN_DIR)/dockcross-$* && chmod +x $(BIN_DIR)/dockcross-$* -# -# manylinux_2_28-aarch64 -# -manylinux_2_28-aarch64: manylinux_2_28-aarch64/Dockerfile manylinux_2_28-x64 - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_28-aarch64:$(TAG) \ - $(TAG_FLAG) $(ORG)/manylinux_2_28-aarch64:latest \ - --build-arg IMAGE=$(ORG)/manylinux_2_28-aarch64 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - -f manylinux_2_28-aarch64/Dockerfile . - rm -rf $@/imagefiles +%.test: %.build %.script + $(call docker-run-cmd,,$(TEST_IMAGE_CMD),$(TEST_IMAGE_ARGS)) -manylinux_2_28-aarch64.test: manylinux_2_28-aarch64 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_28-aarch64:latest > $(BIN)/dockcross-manylinux_2_28-aarch64 \ - && chmod +x $(BIN)/dockcross-manylinux_2_28-aarch64 - $(BIN)/dockcross-manylinux_2_28-aarch64 -i $(ORG)/manylinux_2_28-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py +%.run: %.build + $(call docker-run-cmd,-it,$(RUN_IMAGE_CMD),$(RUN_IMAGE_ARGS)) -# -# manylinux_2_34-aarch64 -# -manylinux_2_34-aarch64: manylinux_2_34-aarch64/Dockerfile manylinux_2_34-x64 - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:$(TAG) \ - $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:latest \ - --build-arg IMAGE=$(ORG)/manylinux_2_34-aarch64 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux_2_34-aarch64/Dockerfile . - rm -rf $@/imagefiles +# ============================================================================== +# Extra tests +# ============================================================================== -manylinux_2_34-aarch64.test: manylinux_2_34-aarch64 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_34-aarch64:latest > $(BIN)/dockcross-manylinux_2_34-aarch64 \ - && chmod +x $(BIN)/dockcross-manylinux_2_34-aarch64 - $(BIN)/dockcross-manylinux_2_34-aarch64 -i $(ORG)/manylinux_2_34-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py +%.test-extra: %.build + @$(foreach t,$(EXTRA_TESTS),$(MAKE) $*.test-$(t);) -# -# manylinux_2_28-x64 -# -manylinux_2_28-x64: manylinux_2_28-x64/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_28-x64:$(TAG) \ - $(TAG_FLAG) $(ORG)/manylinux_2_28-x64:latest \ - --build-arg IMAGE=$(ORG)/manylinux_2_28-x64 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux_2_28-x64/Dockerfile . - rm -rf $@/imagefiles +%.test-stockfish: %.build + rm -rf $(TEST_SCRATCH_DIR)/stockfish + git clone --depth 1 --branch sf_17.1 https://github.com/official-stockfish/Stockfish.git $(TEST_SCRATCH_DIR)/stockfish + $(call extra-test-run,stockfish,make -C src net && make -C src build $(STOCKFISH_ARGS) -j$$(nproc)) + rm -rf $(TEST_SCRATCH_DIR)/stockfish -manylinux_2_28-x64.test: manylinux_2_28-x64 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_28-x64:latest > $(BIN)/dockcross-manylinux_2_28-x64 \ - && chmod +x $(BIN)/dockcross-manylinux_2_28-x64 - $(BIN)/dockcross-manylinux_2_28-x64 -i $(ORG)/manylinux_2_28-x64:latest /opt/python/cp310-cp310/bin/python test/run.py +%.test-ninja: %.build + rm -rf $(TEST_SCRATCH_DIR)/ninja + git clone --depth 1 --branch v1.11.1 https://github.com/ninja-build/ninja.git $(TEST_SCRATCH_DIR)/ninja + $(call extra-test-run,ninja,cmake -Bbuild -S. -GNinja $(NINJA_ARGS) && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/ninja -# -# manylinux_2_34-x64 -# -manylinux_2_34-x64: manylinux_2_34-x64/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(DOCKER) build -t $(ORG)/manylinux_2_34-x64:$(TAG) \ - -t $(ORG)/manylinux_2_34-x64:latest \ - --build-arg IMAGE=$(ORG)/manylinux_2_34-x64 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux_2_34-x64/Dockerfile . - rm -rf $@/imagefiles +%.test-openssl: %.build + rm -rf $(TEST_SCRATCH_DIR)/openssl + git clone --depth 1 --branch OpenSSL_1_1_1w https://github.com/openssl/openssl.git $(TEST_SCRATCH_DIR)/openssl + cd $(TEST_SCRATCH_DIR)/openssl && \ + wget -q https://raw.githubusercontent.com/mavlink/MAVSDK/17ad598f0e004d225f5e939aa2947a95791f2f9b/cpp/third_party/openssl/dockcross-android.patch && \ + patch -p0 < dockcross-android.patch + $(call extra-test-run,openssl,./Configure $(OPENSSL_ARGS) && make -j$$(nproc)) + rm -rf $(TEST_SCRATCH_DIR)/openssl -manylinux_2_34-x64.test: manylinux_2_34-x64 - $(DOCKER) run $(RM) $(ORG)/manylinux_2_34-x64:latest > $(BIN)/dockcross-manylinux_2_34-x64 \ - && chmod +x $(BIN)/dockcross-manylinux_2_34-x64 - $(BIN)/dockcross-manylinux_2_34-x64 -i $(ORG)/manylinux_2_34-x64:latest /opt/python/cp310-cp310/bin/python test/run.py +%.test-C: %.build + rm -rf $(TEST_SCRATCH_DIR)/C + git clone https://github.com/TheAlgorithms/C.git $(TEST_SCRATCH_DIR)/C + cd $(TEST_SCRATCH_DIR)/C && git checkout b0a41bb38c67ddebb31d3fe06d11e171410c3379 + $(call extra-test-run,C,cmake -Bbuild -S. -GNinja $(C_ARGS) && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/C -# -# manylinux2014-x64 -# -manylinux2014-x64: manylinux2014-x64/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-x64:$(TAG) \ - $(TAG_FLAG) $(ORG)/manylinux2014-x64:latest \ - --build-arg IMAGE=$(ORG)/manylinux2014-x64 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux2014-x64/Dockerfile . - rm -rf $@/imagefiles +%.test-SQLite: %.build + rm -rf $(TEST_SCRATCH_DIR)/sqlite + git clone https://github.com/sqlite/sqlite.git $(TEST_SCRATCH_DIR)/sqlite + cd $(TEST_SCRATCH_DIR)/sqlite && git checkout 1cf61ce636915a5e92d4aa883755cee258aa98d6 + $(call extra-test-run,sqlite,./configure $(SQLITE_ARGS) && make -j$$(nproc) sqlite3 sqlite3.c sqldiff) + rm -rf $(TEST_SCRATCH_DIR)/sqlite -manylinux2014-x64.test: manylinux2014-x64 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-x64:latest > $(BIN)/dockcross-manylinux2014-x64 \ - && chmod +x $(BIN)/dockcross-manylinux2014-x64 - $(BIN)/dockcross-manylinux2014-x64 -i $(ORG)/manylinux2014-x64:latest /opt/python/cp311-cp311/bin/python test/run.py +%.test-llama_cpp: %.build + rm -rf $(TEST_SCRATCH_DIR)/llama.cpp + git clone https://github.com/ggerganov/llama.cpp.git $(TEST_SCRATCH_DIR)/llama.cpp + cd $(TEST_SCRATCH_DIR)/llama.cpp && git checkout 76614f352e94d25659306d9e97321f204e5de0d3 + $(call extra-test-run,llama.cpp,cmake -Bbuild -S. -GNinja $(LLAMA_CPP_ARGS) && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/llama.cpp -# -# manylinux2014-x86 -# -manylinux2014-x86: manylinux2014-x86/Dockerfile - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-x86:$(TAG) \ - -t $(ORG)/manylinux2014-x86:latest \ - --build-arg IMAGE=$(ORG)/manylinux2014-x86 \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - -f manylinux2014-x86/Dockerfile . - rm -rf $@/imagefiles +%.test-fmt: %.build + rm -rf $(TEST_SCRATCH_DIR)/fmt + git clone --depth 1 --branch 9.1.0 https://github.com/fmtlib/fmt.git $(TEST_SCRATCH_DIR)/fmt + $(call extra-test-run,fmt,cmake -Bbuild -S. -GNinja $(FMT_ARGS) -DFMT_DOC=OFF && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/fmt -manylinux2014-x86.test: manylinux2014-x86 - $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-x86:latest > $(BIN)/dockcross-manylinux2014-x86 \ - && chmod +x $(BIN)/dockcross-manylinux2014-x86 - $(BIN)/dockcross-manylinux2014-x86 -i $(ORG)/manylinux2014-x86:latest /opt/python/cp311-cp311/bin/python test/run.py +%.test-cpython: %.build + rm -rf $(TEST_SCRATCH_DIR)/cpython + git clone --depth 1 --branch v3.11.2 https://github.com/python/cpython.git $(TEST_SCRATCH_DIR)/cpython + $(call extra-test-run,cpython,./configure ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no --disable-ipv6 $(CPYTHON_ARGS) --build=x86_64-linux-gnu --with-build-python --enable-shared && make -j$$(nproc)) + rm -rf $(TEST_SCRATCH_DIR)/cpython -# -# base-$(HOST_ARCH) -# -base-$(HOST_ARCH): Dockerfile imagefiles/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/base:latest-$(HOST_ARCH) \ - $(TAG_FLAG) $(ORG)/base:$(TAG)-$(HOST_ARCH) \ - --build-arg IMAGE=$(ORG)/base \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - . +%.test-raylib: %.build + rm -rf $(TEST_SCRATCH_DIR)/raylib + git clone https://github.com/raysan5/raylib.git $(TEST_SCRATCH_DIR)/raylib + cd $(TEST_SCRATCH_DIR)/raylib && git checkout a12ddacb7bfbc6e552e6145456f2fe6dfdfbe1c7 + $(call extra-test-run,raylib,cmake -Bbuild -S. -GNinja $(RAYLIB_ARGS) && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/raylib -base-$(HOST_ARCH).test: base-$(HOST_ARCH) - $(TEST_DOCKER) run $(RM) $(ORG)/base:latest-$(HOST_ARCH) > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base +%.test-mbedtls: %.build + rm -rf $(TEST_SCRATCH_DIR)/mbedtls + git clone --depth 1 --branch archive/baremetal https://github.com/Mbed-TLS/mbedtls.git $(TEST_SCRATCH_DIR)/mbedtls + $(call extra-test-run,mbedtls,scripts/config.pl baremetal && cmake -Bbuild -S. -GNinja $(MBEDTLS_ARGS) && cmake --build build) + rm -rf $(TEST_SCRATCH_DIR)/mbedtls -base: Dockerfile imagefiles/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/base:latest \ - $(TAG_FLAG) $(ORG)/base:$(TAG) \ - --build-arg IMAGE=$(ORG)/base \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - . +%.test-libopencm3: %.build + rm -rf $(TEST_SCRATCH_DIR)/libopencm3 + git clone https://github.com/libopencm3/libopencm3.git $(TEST_SCRATCH_DIR)/libopencm3 + cd $(TEST_SCRATCH_DIR)/libopencm3 && git checkout 467522778329d6f41781a6c951b77d6ff6744de6 + $(call extra-test-run,libopencm3,make $(LIBOPENCM3_ARGS) -j$$(nproc)) + rm -rf $(TEST_SCRATCH_DIR)/libopencm3 -base.test: base - $(TEST_DOCKER) run $(RM) $(ORG)/base:latest > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base +%.push: %.test + $(foreach tag,$(call docker-push-tags),$(DOCKER_EXEC) push $(tag) &&) true + +%.pull: + $(foreach tag,$(call docker-push-tags),$(DOCKER_EXEC) pull $(tag) &&) true + +%.update: + @echo ">>> Updating base image for $*" + $(DOCKER_EXEC) pull $(BASE_IMAGE_FINAL):$(BASE_IMAGE_TAG) + +%.clean: + @echo "Cleaning generated Dockerfile for $*" +ifneq ($(STATIC_DOCKERFILE),yes) + @rm -f $(call preset-path,$*)/Dockerfile +endif + @ctx="$(call build-context-dir,$*)"; \ + if [ "$$ctx" != "$(PRESET_DIR)" ]; then rm -rf "$$ctx/imagefiles"; fi + +%.prune: %.clean + $(DOCKER_EXEC) builder prune -f --filter name=$(OUTPUT_IMAGE_FINAL) + +%.inspect: + $(DOCKER_EXEC) image inspect \ + $(OUTPUT_IMAGE_FINAL):latest + +%.rebuild: + $(MAKE) $*.clean + $(MAKE) $*.build BUILD_IMAGE_ARGS="--no-cache" + +%.history: + $(DOCKER_EXEC) history \ + $(OUTPUT_IMAGE_FINAL):latest + +%.sbom: + syft $(OUTPUT_IMAGE_FINAL):latest -o spdx-json > $*.sbom.json + +%.sign: + cosign sign $(OUTPUT_IMAGE_FINAL):latest + +%.scan: + $(DOCKER_EXEC) run --rm \ + -v /var/run/docker.sock:/var/run/docker.sock \ + $(TRIVY_IMAGE) \ + image --severity HIGH,CRITICAL \ + $(OUTPUT_IMAGE_FINAL):latest + +%.lint: %.generate + $(DOCKER_EXEC) run --rm -i $(HADOLINT_IMAGE) < $(call preset-path,$*)/Dockerfile + +%.check: %.lint %.scan %.sbom + +%.cache: + $(DOCKER_EXEC) buildx imagetools inspect $(OUTPUT_IMAGE_FINAL):cache + +# ============================================================================== +# Global targets +# ============================================================================== +.PHONY: $(PRESET_TARGETS) clean purge list display_images bash-check + +%-all: + @$(foreach p,$(ALL_PRESETS),$(MAKE) $(p).$* &&) true + +list: + @echo "Available presets:" + @$(foreach p,$(ALL_PRESETS),echo " - $(p)";) -# display -# display_images: - for image in $(IMAGES); do echo $$image; done + @$(foreach p,$(filter-out base,$(ALL_PRESETS)),echo $(p);) $(VERBOSE).SILENT: display_images -# -# build implicit rule -# - -$(STANDARD_IMAGES): %: %/Dockerfile base - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/$@:latest \ - $(TAG_FLAG) $(ORG)/$@:$(TAG) \ - --build-arg ORG=$(ORG) \ - --build-arg IMAGE=$(ORG)/$@ \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - $@ - rm -rf $@/imagefiles - -$(MULTIARCH_IMAGES): %: %/Dockerfile base-$(HOST_ARCH) - mkdir -p $@/imagefiles && cp -r imagefiles $@/ - $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/$@:latest-$(HOST_ARCH) \ - $(TAG_FLAG) $(ORG)/$@:$(TAG)-$(HOST_ARCH) \ - --build-arg ORG=$(ORG) \ - --build-arg IMAGE=$(ORG)/$@ \ - --build-arg HOST_ARCH=$(HOST_ARCH) \ - --build-arg VERSION=$(TAG) \ - --build-arg VCS_REF=`git rev-parse --short HEAD` \ - --build-arg VCS_URL=`git config --get remote.origin.url` \ - --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ - $@ - rm -rf $@/imagefiles - clean: - for d in $(IMAGES) ; do rm -rf $$d/imagefiles ; done - for d in $(IMAGES) ; do rm -rf $(BIN)/dockcross-$$d ; done - for d in $(GEN_IMAGE_DOCKERFILES) ; do rm -f $$d ; done - rm -f Dockerfile + @$(foreach p,$(ALL_PRESETS),$(MAKE) $(p).clean &&) true + @rm -rf $(BIN_DIR) purge: clean -# Remove all untagged images - $(TEST_DOCKER) container ls -aq | xargs -r $(DOCKER) container rm -f -# Remove all images with organization (ex dockcross/*) - $(BUILD_DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f + $(DOCKER_EXEC) images --filter='reference=$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER_EXEC) rmi -f + $(DOCKER_EXEC) builder prune -f -# Check bash syntax bash-check: find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(shell nproc)" -I{} \ - $(SHELLCHECK) --check-sourced --color=auto --format=gcc --severity=warning --shell=bash --enable=all "{}" + $(DOCKER_EXEC) run --rm -v "$(PWD)":/mnt -w /mnt $(SHELLCHECK_IMAGE) --check-sourced --color=auto --format=gcc --severity=warning --shell=bash --enable=all "{}" -# -# testing implicit rule -# -.SECONDEXPANSION: -$(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@) - $(TEST_DOCKER) run $(RM) $(ORG)/$(basename $@):latest > $(BIN)/dockcross-$(basename $@) \ - && chmod +x $(BIN)/dockcross-$(basename $@) - $(BIN)/dockcross-$(basename $@) -i $(ORG)/$(basename $@):latest python3 test/run.py $($@_ARGS) +docker-container-builder: + $(DOCKER_EXEC) buildx create --name mybuilder --use + $(DOCKER_EXEC) buildx inspect --bootstrap + $(DOCKER_EXEC) buildx inspect mybuilder -.SECONDEXPANSION: -$(addsuffix .test,$(MULTIARCH_IMAGES) web-wasi-threads): $$(basename $$@) - $(TEST_DOCKER) run $(RM) $(ORG)/$(basename $@):latest-$(HOST_ARCH) > $(BIN)/dockcross-$(basename $@) \ - && chmod +x $(BIN)/dockcross-$(basename $@) - $(BIN)/dockcross-$(basename $@) -i $(ORG)/$(basename $@):latest-$(HOST_ARCH) python3 test/run.py $($@_ARGS) - -.SECONDEXPANSION: -$(addsuffix .tag-$(HOST_ARCH),$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) - $(BUILD_DOCKER) tag $(ORG)/$(basename $@):latest-$(HOST_ARCH) \ - $(ORG)/$(basename $@):$(TAG)-$(HOST_ARCH) - -.SECONDEXPANSION: -$(addsuffix .push-$(HOST_ARCH),$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) - $(BUILD_DOCKER) push $(ORG)/$(basename $@):latest-$(HOST_ARCH) \ - && $(BUILD_DOCKER) push $(ORG)/$(basename $@):$(TAG)-$(HOST_ARCH) - -.SECONDEXPANSION: -$(addsuffix .push,$(STANDARD_IMAGES) $(NON_STANDARD_IMAGES)): $$(basename $$@) - $(BUILD_DOCKER) push $(ORG)/$(basename $@):latest \ - && $(BUILD_DOCKER) push $(ORG)/$(basename $@):$(TAG) - -.SECONDEXPANSION: -$(addsuffix .manifest,$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) - $(MANIFEST_TOOL) push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template $(ORG)/$(basename $@):latest-ARCH \ - --target $(ORG)/$(basename $@):latest - -.SECONDEXPANSION: -$(addsuffix .push,$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@).manifest - $(MANIFEST_TOOL) push from-args \ - --platforms linux/amd64,linux/arm64 \ - --template $(ORG)/$(basename $@):$(TAG)-ARCH \ - --target $(ORG)/$(basename $@):$(TAG) - -# -# testing prerequisites implicit rule -# -test.prerequisites: - mkdir -p $(BIN) - -$(addsuffix .test,base $(IMAGES)): test.prerequisites - -.PHONY: base images $(IMAGES) test %.test clean purge bash-check display_images +docker-default-builder: + $(DOCKER_EXEC) buildx use default diff --git a/Makefile.old b/Makefile.old new file mode 100644 index 0000000..a2d1275 --- /dev/null +++ b/Makefile.old @@ -0,0 +1,440 @@ + +# +# Parameters +# + +# Name of the docker-equivalent executable for building images. +# OCI: open container interface. +# Common values: docker, podman, buildah +DOCKER := $(or $(OCI_EXE), docker) +BUILD_DOCKER := $(or $(BUILD_DOCKER), $(DOCKER)) +MANIFEST_TOOL := $(or $(MANIFEST_TOOL_EXE), manifest-tool) +RM = --rm + +# Name of the docker-equivalent executable for running test containers. +# Supports the use case: +# +# DOCKER=buildah +# TEST_DOCKER=podman +# +# because buildah does not run containers. +TEST_DOCKER := $(or $(TEST_DOCKER), $(DOCKER)) + +# The build sub-command. Use: +# +# export "BUILD_CMD=buildx build --platform linux/amd64,linux/arm64" +# +# to generate multi-platform images. +BUILD_CMD := $(or $(BUILD_CMD), build) +TAG_FLAG := $(or $(TAG_FLAG), --tag) + +# Docker organization to pull the images from +ORG = dockcross + +# Host architecture +HOST_ARCH := $(or $(HOST_ARCH), $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')) + +# Directory where to generate the dockcross script for each images (e.g bin/dockcross-manylinux2014-x64) +BIN = ./bin + +# These images are built using the "build implicit rule" +STANDARD_IMAGES := android-arm android-arm64 android-x86 android-x86_64 \ + linux-i686 linux-x86 linux-x64 linux-x64-clang 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-mipsel-lts \ + linux-armv7l-musl linux-armv7 linux-armv7a linux-armv7-lts linux-armv7a-lts linux-x86_64-full \ + linux-loongarch64 linux-mips linux-mips-uclibc linux-mips-lts \ + linux-ppc linux-ppc64le linux-ppc64le-lts linux-riscv64 linux-riscv32 linux-xtensa-uclibc \ + windows-static-x86 windows-static-x64 windows-static-x64-posix windows-armv7 \ + windows-shared-x86 windows-shared-x64 windows-shared-x64-posix windows-arm64 \ + bare-armv7emhf-nano_newlib + +# Generated Dockerfiles. +GEN_IMAGES := android-arm android-arm64 \ + linux-i686 linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \ + manylinux_2_28-x64 manylinux_2_34-x64 \ + manylinux2014-x64 manylinux2014-x86 \ + manylinux2014-aarch64 manylinux_2_28-aarch64 manylinux_2_34-aarch64 linux-arm64-lts \ + web-wasm web-wasi web-wasi-emulated-threads web-wasi-threads \ + linux-loongarch64 linux-mips linux-mips-uclibc linux-mips-lts 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-armv7a-lts linux-x86_64-full \ + linux-armv6 linux-armv6-lts linux-armv6-musl linux-mipsel-lts \ + linux-armv5 linux-armv5-musl linux-armv5-uclibc linux-ppc linux-ppc64le linux-ppc64le-lts linux-s390x \ + linux-riscv64 linux-riscv32 linux-m68k-uclibc linux-x64-tinycc linux-xtensa-uclibc \ + bare-armv7emhf-nano_newlib + +# Generate both amd64 and arm64 images +MULTIARCH_IMAGES := linux-arm64 \ + web-wasi web-wasi-emulated-threads + +GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) + +# These images are expected to have explicit rules for *both* build and testing +NON_STANDARD_IMAGES := manylinux_2_28-x64 manylinux_2_34-x64 manylinux2014-x64 manylinux2014-x86 \ + manylinux2014-aarch64 manylinux_2_28-aarch64 manylinux_2_34-aarch64 web-wasm web-wasi-emulated-threads web-wasi-threads + +# Docker composite files +DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux2014 common.manylinux_2_28 common.manylinux_2_34 common.buildroot \ + common.crosstool common.webassembly common.windows common-manylinux.crosstool common-manylinux_2_28.crosstool common-manylinux_2_34.crosstool common.dockcross \ + common.label-and-env +DOCKER_COMPOSITE_FOLDER_PATH = common/ +DOCKER_COMPOSITE_PATH = $(addprefix $(DOCKER_COMPOSITE_FOLDER_PATH),$(DOCKER_COMPOSITE_SOURCES)) + +# This list all available images +IMAGES := $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) $(MULTIARCH_IMAGES) + +# Optional arguments for test runner (test/run.py) associated with "testing implicit rule" +linux-x64-tinycc.test_ARGS = --languages C +windows-static-x86.test_ARGS = --exe-suffix ".exe" +windows-static-x64.test_ARGS = --exe-suffix ".exe" +windows-static-x64-posix.test_ARGS = --exe-suffix ".exe" +windows-shared-x86.test_ARGS = --exe-suffix ".exe" +windows-shared-x64.test_ARGS = --exe-suffix ".exe" +windows-shared-x64-posix.test_ARGS = --exe-suffix ".exe" +windows-armv7.test_ARGS = --exe-suffix ".exe" +windows-arm64.test_ARGS = --exe-suffix ".exe" +bare-armv7emhf-nano_newlib.test_ARGS = --linker-flags="--specs=nosys.specs" + +# Tag images with date and Git short hash in addition to revision +TAG := $(shell date '+%Y%m%d')-$(shell git rev-parse --short HEAD) + +# shellcheck executable +SHELLCHECK := shellcheck + +# Defines the level of verification (error, warning, info...) +SHELLCHECK_SEVERITY_LEVEL := error + +# +# images: This target builds all IMAGES (because it is the first one, it is built by default) +# +images: base $(IMAGES) + +# +# test: This target ensures all IMAGES are built and run the associated tests +# +test: base.test $(addsuffix .test,$(IMAGES)) + +# +# Generic Targets (can specialize later). +# +$(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOSITE_PATH) + sed $(foreach f,$(DOCKER_COMPOSITE_SOURCES),-e '/$(f)/ r $(DOCKER_COMPOSITE_FOLDER_PATH)$(f)') $< > $@ + +# +# web-wasm +# +ifeq ($(HOST_ARCH),amd64) + EMSCRIPTEN_HOST_ARCH_TAG = "" +endif +ifeq ($(HOST_ARCH),arm64) + EMSCRIPTEN_HOST_ARCH_TAG = "-arm64" +endif +web-wasm: web-wasm/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + cp -r test web-wasm/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/web-wasm:$(TAG)-$(HOST_ARCH) \ + $(TAG_FLAG) $(ORG)/web-wasm:latest-$(HOST_ARCH) \ + --build-arg IMAGE=$(ORG)/web-wasm \ + --build-arg VERSION=$(TAG) \ + --build-arg HOST_ARCH_TAG=$(EMSCRIPTEN_HOST_ARCH_TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + web-wasm + rm -rf web-wasm/test + rm -rf $@/imagefiles + +web-wasm.test: web-wasm + cp -r test web-wasm/ + $(TEST_DOCKER) run $(RM) $(ORG)/web-wasm:latest-$(HOST_ARCH) > $(BIN)/dockcross-web-wasm && chmod +x $(BIN)/dockcross-web-wasm + $(BIN)/dockcross-web-wasm -i $(ORG)/web-wasm:latest-$(HOST_ARCH) python test/run.py --exe-suffix ".js" + rm -rf web-wasm/test + +# +# web-wasi-threads +# +web-wasi-threads: web-wasi web-wasi-threads/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + cp -r test web-wasi-threads/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/web-wasi-threads:$(TAG)-$(HOST_ARCH) \ + -t $(ORG)/web-wasi-threads:latest-$(HOST_ARCH) \ + --build-arg IMAGE=$(ORG)/web-wasi-threads \ + --build-arg VERSION=$(TAG) \ + --build-arg HOST_ARCH=$(HOST_ARCH) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + web-wasi-threads + +# +# manylinux2014-aarch64 +# +manylinux2014-aarch64: manylinux2014-aarch64/Dockerfile manylinux2014-x64 + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-aarch64:$(TAG) \ + $(TAG_FLAG) $(ORG)/manylinux2014-aarch64:latest \ + --build-arg IMAGE=$(ORG)/manylinux2014-aarch64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux2014-aarch64/Dockerfile . + rm -rf $@/imagefiles + +manylinux2014-aarch64.test: manylinux2014-aarch64 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-aarch64:latest > $(BIN)/dockcross-manylinux2014-aarch64 \ + && chmod +x $(BIN)/dockcross-manylinux2014-aarch64 + $(BIN)/dockcross-manylinux2014-aarch64 -i $(ORG)/manylinux2014-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py + +# +# manylinux_2_28-aarch64 +# +manylinux_2_28-aarch64: manylinux_2_28-aarch64/Dockerfile manylinux_2_28-x64 + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_28-aarch64:$(TAG) \ + $(TAG_FLAG) $(ORG)/manylinux_2_28-aarch64:latest \ + --build-arg IMAGE=$(ORG)/manylinux_2_28-aarch64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + -f manylinux_2_28-aarch64/Dockerfile . + rm -rf $@/imagefiles + +manylinux_2_28-aarch64.test: manylinux_2_28-aarch64 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_28-aarch64:latest > $(BIN)/dockcross-manylinux_2_28-aarch64 \ + && chmod +x $(BIN)/dockcross-manylinux_2_28-aarch64 + $(BIN)/dockcross-manylinux_2_28-aarch64 -i $(ORG)/manylinux_2_28-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py + +# +# manylinux_2_34-aarch64 +# +manylinux_2_34-aarch64: manylinux_2_34-aarch64/Dockerfile manylinux_2_34-x64 + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:$(TAG) \ + $(TAG_FLAG) $(ORG)/manylinux_2_34-aarch64:latest \ + --build-arg IMAGE=$(ORG)/manylinux_2_34-aarch64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux_2_34-aarch64/Dockerfile . + rm -rf $@/imagefiles + +manylinux_2_34-aarch64.test: manylinux_2_34-aarch64 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_34-aarch64:latest > $(BIN)/dockcross-manylinux_2_34-aarch64 \ + && chmod +x $(BIN)/dockcross-manylinux_2_34-aarch64 + $(BIN)/dockcross-manylinux_2_34-aarch64 -i $(ORG)/manylinux_2_34-aarch64:latest /opt/python/cp311-cp311/bin/python test/run.py + +# +# manylinux_2_28-x64 +# +manylinux_2_28-x64: manylinux_2_28-x64/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux_2_28-x64:$(TAG) \ + $(TAG_FLAG) $(ORG)/manylinux_2_28-x64:latest \ + --build-arg IMAGE=$(ORG)/manylinux_2_28-x64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux_2_28-x64/Dockerfile . + rm -rf $@/imagefiles + +manylinux_2_28-x64.test: manylinux_2_28-x64 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux_2_28-x64:latest > $(BIN)/dockcross-manylinux_2_28-x64 \ + && chmod +x $(BIN)/dockcross-manylinux_2_28-x64 + $(BIN)/dockcross-manylinux_2_28-x64 -i $(ORG)/manylinux_2_28-x64:latest /opt/python/cp310-cp310/bin/python test/run.py + +# +# manylinux_2_34-x64 +# +manylinux_2_34-x64: manylinux_2_34-x64/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(DOCKER) build -t $(ORG)/manylinux_2_34-x64:$(TAG) \ + -t $(ORG)/manylinux_2_34-x64:latest \ + --build-arg IMAGE=$(ORG)/manylinux_2_34-x64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux_2_34-x64/Dockerfile . + rm -rf $@/imagefiles + +manylinux_2_34-x64.test: manylinux_2_34-x64 + $(DOCKER) run $(RM) $(ORG)/manylinux_2_34-x64:latest > $(BIN)/dockcross-manylinux_2_34-x64 \ + && chmod +x $(BIN)/dockcross-manylinux_2_34-x64 + $(BIN)/dockcross-manylinux_2_34-x64 -i $(ORG)/manylinux_2_34-x64:latest /opt/python/cp310-cp310/bin/python test/run.py + +# +# manylinux2014-x64 +# +manylinux2014-x64: manylinux2014-x64/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-x64:$(TAG) \ + $(TAG_FLAG) $(ORG)/manylinux2014-x64:latest \ + --build-arg IMAGE=$(ORG)/manylinux2014-x64 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux2014-x64/Dockerfile . + rm -rf $@/imagefiles + +manylinux2014-x64.test: manylinux2014-x64 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-x64:latest > $(BIN)/dockcross-manylinux2014-x64 \ + && chmod +x $(BIN)/dockcross-manylinux2014-x64 + $(BIN)/dockcross-manylinux2014-x64 -i $(ORG)/manylinux2014-x64:latest /opt/python/cp311-cp311/bin/python test/run.py + +# +# manylinux2014-x86 +# +manylinux2014-x86: manylinux2014-x86/Dockerfile + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/manylinux2014-x86:$(TAG) \ + -t $(ORG)/manylinux2014-x86:latest \ + --build-arg IMAGE=$(ORG)/manylinux2014-x86 \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + -f manylinux2014-x86/Dockerfile . + rm -rf $@/imagefiles + +manylinux2014-x86.test: manylinux2014-x86 + $(TEST_DOCKER) run $(RM) $(ORG)/manylinux2014-x86:latest > $(BIN)/dockcross-manylinux2014-x86 \ + && chmod +x $(BIN)/dockcross-manylinux2014-x86 + $(BIN)/dockcross-manylinux2014-x86 -i $(ORG)/manylinux2014-x86:latest /opt/python/cp311-cp311/bin/python test/run.py + +# +# base-$(HOST_ARCH) +# +base-$(HOST_ARCH): Dockerfile imagefiles/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/base:latest-$(HOST_ARCH) \ + $(TAG_FLAG) $(ORG)/base:$(TAG)-$(HOST_ARCH) \ + --build-arg IMAGE=$(ORG)/base \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + . + +base-$(HOST_ARCH).test: base-$(HOST_ARCH) + $(TEST_DOCKER) run $(RM) $(ORG)/base:latest-$(HOST_ARCH) > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base + +base: Dockerfile imagefiles/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/base:latest \ + $(TAG_FLAG) $(ORG)/base:$(TAG) \ + --build-arg IMAGE=$(ORG)/base \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + . + +base.test: base + $(TEST_DOCKER) run $(RM) $(ORG)/base:latest > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base + +# display +# +display_images: + for image in $(IMAGES); do echo $$image; done + +$(VERBOSE).SILENT: display_images + +# +# build implicit rule +# + +$(STANDARD_IMAGES): %: %/Dockerfile base + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/$@:latest \ + $(TAG_FLAG) $(ORG)/$@:$(TAG) \ + --build-arg ORG=$(ORG) \ + --build-arg IMAGE=$(ORG)/$@ \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + $@ + rm -rf $@/imagefiles + +$(MULTIARCH_IMAGES): %: %/Dockerfile base-$(HOST_ARCH) + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(BUILD_DOCKER) $(BUILD_CMD) $(TAG_FLAG) $(ORG)/$@:latest-$(HOST_ARCH) \ + $(TAG_FLAG) $(ORG)/$@:$(TAG)-$(HOST_ARCH) \ + --build-arg ORG=$(ORG) \ + --build-arg IMAGE=$(ORG)/$@ \ + --build-arg HOST_ARCH=$(HOST_ARCH) \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + $@ + rm -rf $@/imagefiles + +clean: + for d in $(IMAGES) ; do rm -rf $$d/imagefiles ; done + for d in $(IMAGES) ; do rm -rf $(BIN)/dockcross-$$d ; done + for d in $(GEN_IMAGE_DOCKERFILES) ; do rm -f $$d ; done + rm -f Dockerfile + +purge: clean +# Remove all untagged images + $(TEST_DOCKER) container ls -aq | xargs -r $(DOCKER) container rm -f +# Remove all images with organization (ex dockcross/*) + $(BUILD_DOCKER) images --filter=reference='$(ORG)/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f + +# Check bash syntax +bash-check: + find . -type f \( -name "*.sh" -o -name "*.bash" \) -print0 | xargs -0 -P"$(shell nproc)" -I{} \ + $(SHELLCHECK) --check-sourced --color=auto --format=gcc --severity=warning --shell=bash --enable=all "{}" + +# +# testing implicit rule +# +.SECONDEXPANSION: +$(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@) + $(TEST_DOCKER) run $(RM) $(ORG)/$(basename $@):latest > $(BIN)/dockcross-$(basename $@) \ + && chmod +x $(BIN)/dockcross-$(basename $@) + $(BIN)/dockcross-$(basename $@) -i $(ORG)/$(basename $@):latest python3 test/run.py $($@_ARGS) + +.SECONDEXPANSION: +$(addsuffix .test,$(MULTIARCH_IMAGES) web-wasi-threads): $$(basename $$@) + $(TEST_DOCKER) run $(RM) $(ORG)/$(basename $@):latest-$(HOST_ARCH) > $(BIN)/dockcross-$(basename $@) \ + && chmod +x $(BIN)/dockcross-$(basename $@) + $(BIN)/dockcross-$(basename $@) -i $(ORG)/$(basename $@):latest-$(HOST_ARCH) python3 test/run.py $($@_ARGS) + +.SECONDEXPANSION: +$(addsuffix .tag-$(HOST_ARCH),$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) + $(BUILD_DOCKER) tag $(ORG)/$(basename $@):latest-$(HOST_ARCH) \ + $(ORG)/$(basename $@):$(TAG)-$(HOST_ARCH) + +.SECONDEXPANSION: +$(addsuffix .push-$(HOST_ARCH),$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) + $(BUILD_DOCKER) push $(ORG)/$(basename $@):latest-$(HOST_ARCH) \ + && $(BUILD_DOCKER) push $(ORG)/$(basename $@):$(TAG)-$(HOST_ARCH) + +.SECONDEXPANSION: +$(addsuffix .push,$(STANDARD_IMAGES) $(NON_STANDARD_IMAGES)): $$(basename $$@) + $(BUILD_DOCKER) push $(ORG)/$(basename $@):latest \ + && $(BUILD_DOCKER) push $(ORG)/$(basename $@):$(TAG) + +.SECONDEXPANSION: +$(addsuffix .manifest,$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@) + $(MANIFEST_TOOL) push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template $(ORG)/$(basename $@):latest-ARCH \ + --target $(ORG)/$(basename $@):latest + +.SECONDEXPANSION: +$(addsuffix .push,$(MULTIARCH_IMAGES) web-wasi-threads web-wasm): $$(basename $$@).manifest + $(MANIFEST_TOOL) push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template $(ORG)/$(basename $@):$(TAG)-ARCH \ + --target $(ORG)/$(basename $@):$(TAG) + +# +# testing prerequisites implicit rule +# +test.prerequisites: + mkdir -p $(BIN) + +$(addsuffix .test,base $(IMAGES)): test.prerequisites + +.PHONY: base images $(IMAGES) test %.test clean purge bash-check display_images diff --git a/android-arm/preset.mk b/android-arm/preset.mk new file mode 100644 index 0000000..4a5e9be --- /dev/null +++ b/android-arm/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = android-arm + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish openssl SQLite +STOCKFISH_ARGS = ARCH=armv7 COMP=ndk +OPENSSL_ARGS = android-arm no-shared diff --git a/android-arm64/preset.mk b/android-arm64/preset.mk new file mode 100644 index 0000000..63bf690 --- /dev/null +++ b/android-arm64/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = android-arm64 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish openssl SQLite +STOCKFISH_ARGS = ARCH=armv8 COMP=ndk +OPENSSL_ARGS = android-arm64 no-shared diff --git a/android-x86/Dockerfile b/android-x86/Dockerfile index 5935605..96025b3 100644 --- a/android-x86/Dockerfile +++ b/android-x86/Dockerfile @@ -1,4 +1,5 @@ -FROM dockcross/base:latest +ARG ORG=dockcross +FROM ${ORG}/base:latest RUN apt-get update && apt-get install -y unzip diff --git a/android-x86/preset.mk b/android-x86/preset.mk new file mode 100644 index 0000000..6c2eb96 --- /dev/null +++ b/android-x86/preset.mk @@ -0,0 +1,15 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = android-x86 + +STATIC_DOCKERFILE = yes + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish openssl SQLite +STOCKFISH_ARGS = ARCH=x86-32 COMP=ndk +OPENSSL_ARGS = android-x86 no-shared diff --git a/android-x86_64/Dockerfile b/android-x86_64/Dockerfile index c30cb35..fd4bc4c 100644 --- a/android-x86_64/Dockerfile +++ b/android-x86_64/Dockerfile @@ -1,4 +1,5 @@ -FROM dockcross/base:latest +ARG ORG=dockcross +FROM ${ORG}/base:latest RUN apt-get update && apt-get install -y unzip diff --git a/android-x86_64/preset.mk b/android-x86_64/preset.mk new file mode 100644 index 0000000..487c806 --- /dev/null +++ b/android-x86_64/preset.mk @@ -0,0 +1,15 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = android-x86_64 + +STATIC_DOCKERFILE = yes + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish openssl SQLite +STOCKFISH_ARGS = ARCH=x86-64 COMP=ndk +OPENSSL_ARGS = android-x86_64 no-shared diff --git a/bare-armv7emhf-nano_newlib/crosstool-ng.config b/bare-armv7emhf-nano_newlib/crosstool-ng.config index be2e415..e0cb1e8 100644 --- a/bare-armv7emhf-nano_newlib/crosstool-ng.config +++ b/bare-armv7emhf-nano_newlib/crosstool-ng.config @@ -822,9 +822,9 @@ CT_ZLIB_PATCH_GLOBAL=y # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set # CT_ZLIB_PATCH_NONE is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/bare-armv7emhf-nano_newlib/preset.mk b/bare-armv7emhf-nano_newlib/preset.mk new file mode 100644 index 0000000..7e4a7e6 --- /dev/null +++ b/bare-armv7emhf-nano_newlib/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = bare-armv7emhf-nano_newlib + +TEST_IMAGE_ARGS = --linker-flags="--specs=nosys.specs" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = mbedtls libopencm3 +LIBOPENCM3_ARGS = PREFIX=/usr/xcc/arm-none-eabi/bin/arm-none-eabi- TARGETS='stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 stm32/l1 stm32/l4 stm32/g4 stm32/h7 gd32/f1x0 lpc13xx lpc17xx lpc43xx/m4 lm3s lm4f msp432/e4 efm32/tg efm32/g efm32/lg efm32/gg efm32/wg efm32/ezr32wg nrf/51 nrf/52 sam/3a sam/3n sam/3s sam/3u sam/3x sam/4l vf6xx pac55xx' diff --git a/common/common.webassembly b/common/common.webassembly index 7cd5cd6..5bdb7dd 100644 --- a/common/common.webassembly +++ b/common/common.webassembly @@ -46,7 +46,11 @@ RUN git clone --recurse-submodules https://github.com/WebAssembly/wabt.git && \ RUN mkdir -p /wasi-runtimes ENV WASMTIME_HOME=/wasi-runtimes/wasmtime -RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash +# Pinned below v47.0.0: that release removes wasi-threads/wasi-common support +# entirely (see https://github.com/bytecodealliance/rfcs/pull/47), which +# wasmtime-pwd-threads.sh and the wasi-threads images below depend on. +ENV WASMTIME_VERSION=v46.0.1 +RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${WASMTIME_VERSION} COPY imagefiles/wasmtime-pwd.sh ${WASMTIME_HOME}/bin/ COPY imagefiles/wasmtime-pwd-threads.sh ${WASMTIME_HOME}/bin/ ENV PATH="$WASMTIME_HOME/bin:$PATH" diff --git a/imagefiles/install-gosu-binary.sh b/imagefiles/install-gosu-binary.sh index bb01403..0762c71 100755 --- a/imagefiles/install-gosu-binary.sh +++ b/imagefiles/install-gosu-binary.sh @@ -56,10 +56,22 @@ url_key="https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$ # download and verify the signature export GNUPGHOME="$(mktemp -d)" -gpg --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ -gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ -gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 || \ -gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +GOSU_GPG_KEY=B42F6819007F00F88E364FD4036A9C25BF357DD4 + +gpg --keyserver hkps://keys.openpgp.org --recv-keys "$GOSU_GPG_KEY" || \ +gpg --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys "$GOSU_GPG_KEY" || \ +gpg --keyserver hkp://pgp.key-server.io:80 --recv-keys "$GOSU_GPG_KEY" || \ +gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys "$GOSU_GPG_KEY" || \ +{ + echo "gpg keyserver lookups failed, falling back to fetching the key over HTTPS" >&2 + curl --connect-timeout 30 \ + --max-time 30 \ + --retry 5 \ + --retry-delay 10 \ + --retry-max-time 60 \ + -fSL "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x${GOSU_GPG_KEY}" \ + | gpg --import +} echo "Downloading $url" curl --connect-timeout 30 \ diff --git a/imagefiles/wasmtime-pwd-threads.sh b/imagefiles/wasmtime-pwd-threads.sh index 62b160c..575682c 100755 --- a/imagefiles/wasmtime-pwd-threads.sh +++ b/imagefiles/wasmtime-pwd-threads.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash # Mount the PWD and the /work mount dir to enable access in try_run commands -exec ${WASMTIME_HOME}/bin/wasmtime run -W threads=y -S threads=y,cli=y --dir=. --dir=$PWD --dir=/work/ "$@" +exec ${WASMTIME_HOME}/bin/wasmtime run -W threads=y,shared-memory=y -S threads=y,cli=y --dir=. --dir=$PWD --dir=/work/ "$@" diff --git a/linux-arm64-full/preset.mk b/linux-arm64-full/preset.mk new file mode 100644 index 0000000..c57fc34 --- /dev/null +++ b/linux-arm64-full/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-arm64-full + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv8 +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-buildroot-linux-gnu --target=aarch64-buildroot-linux-gnu diff --git a/linux-arm64-lts/crosstool-ng.config b/linux-arm64-lts/crosstool-ng.config index 18557f6..bea690b 100644 --- a/linux-arm64-lts/crosstool-ng.config +++ b/linux-arm64-lts/crosstool-ng.config @@ -836,9 +836,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-arm64-lts/preset.mk b/linux-arm64-lts/preset.mk new file mode 100644 index 0000000..89992b4 --- /dev/null +++ b/linux-arm64-lts/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-arm64-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv8 +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu diff --git a/linux-arm64-musl/preset.mk b/linux-arm64-musl/preset.mk new file mode 100644 index 0000000..ccdd7c4 --- /dev/null +++ b/linux-arm64-musl/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-arm64-musl + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv8 +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-linux-musl --target=aarch64-linux-musl diff --git a/linux-arm64/preset.mk b/linux-arm64/preset.mk new file mode 100644 index 0000000..e3d7bc0 --- /dev/null +++ b/linux-arm64/preset.mk @@ -0,0 +1,18 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-arm64 + +TEST_IMAGE_CMD = +TEST_IMAGE_ARGS = +RUN_IMAGE_CMD = +RUN_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja C SQLite llama_cpp fmt cpython +STOCKFISH_ARGS = ARCH=armv8 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu diff --git a/linux-armv5-musl/crosstool-ng.config b/linux-armv5-musl/crosstool-ng.config index 05c7072..faec784 100755 --- a/linux-armv5-musl/crosstool-ng.config +++ b/linux-armv5-musl/crosstool-ng.config @@ -858,9 +858,9 @@ CT_ZLIB_PATCH_GLOBAL=y # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set # CT_ZLIB_PATCH_NONE is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv5-musl/preset.mk b/linux-armv5-musl/preset.mk new file mode 100644 index 0000000..73384f2 --- /dev/null +++ b/linux-armv5-musl/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv5-musl + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv5-unknown-linux-musleabi --target=armv5-unknown-linux-musleabi diff --git a/linux-armv5-uclibc/crosstool-ng.config b/linux-armv5-uclibc/crosstool-ng.config index 75b31a1..d3f4c8e 100644 --- a/linux-armv5-uclibc/crosstool-ng.config +++ b/linux-armv5-uclibc/crosstool-ng.config @@ -800,9 +800,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv5-uclibc/preset.mk b/linux-armv5-uclibc/preset.mk new file mode 100644 index 0000000..555aedd --- /dev/null +++ b/linux-armv5-uclibc/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv5-uclibc + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=arm-unknown-linux-uclibcgnueabi --target=arm-unknown-linux-uclibcgnueabi diff --git a/linux-armv5/crosstool-ng.config b/linux-armv5/crosstool-ng.config index acc4e55..84344ed 100644 --- a/linux-armv5/crosstool-ng.config +++ b/linux-armv5/crosstool-ng.config @@ -850,9 +850,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv5/preset.mk b/linux-armv5/preset.mk new file mode 100644 index 0000000..53d248c --- /dev/null +++ b/linux-armv5/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv5 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv5-unknown-linux-gnueabi --target=armv5-unknown-linux-gnueabi diff --git a/linux-armv6-lts/crosstool-ng.config b/linux-armv6-lts/crosstool-ng.config index 5e011a7..537dcee 100644 --- a/linux-armv6-lts/crosstool-ng.config +++ b/linux-armv6-lts/crosstool-ng.config @@ -850,9 +850,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv6-lts/preset.mk b/linux-armv6-lts/preset.mk new file mode 100644 index 0000000..7580fd2 --- /dev/null +++ b/linux-armv6-lts/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv6-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv6-unknown-linux-gnueabihf --target=armv6-unknown-linux-gnueabihf diff --git a/linux-armv6-musl/preset.mk b/linux-armv6-musl/preset.mk new file mode 100644 index 0000000..c2b97fd --- /dev/null +++ b/linux-armv6-musl/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv6-musl + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv6-linux-musleabihf --target=armv6-linux-musleabihf diff --git a/linux-armv6/crosstool-ng.config b/linux-armv6/crosstool-ng.config index 92fcc4e..3a3fc43 100644 --- a/linux-armv6/crosstool-ng.config +++ b/linux-armv6/crosstool-ng.config @@ -852,9 +852,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv6/preset.mk b/linux-armv6/preset.mk new file mode 100644 index 0000000..dc502e6 --- /dev/null +++ b/linux-armv6/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv6 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv6-unknown-linux-gnueabihf --target=armv6-unknown-linux-gnueabihf diff --git a/linux-armv7-lts/crosstool-ng.config b/linux-armv7-lts/crosstool-ng.config index 6e98881..56e795f 100644 --- a/linux-armv7-lts/crosstool-ng.config +++ b/linux-armv7-lts/crosstool-ng.config @@ -837,9 +837,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv7-lts/preset.mk b/linux-armv7-lts/preset.mk new file mode 100644 index 0000000..85d5d4a --- /dev/null +++ b/linux-armv7-lts/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv7-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv7 +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv7-unknown-linux-gnueabi --target=armv7-unknown-linux-gnueabi diff --git a/linux-armv7/crosstool-ng.config b/linux-armv7/crosstool-ng.config index f1572ce..a5645f9 100644 --- a/linux-armv7/crosstool-ng.config +++ b/linux-armv7/crosstool-ng.config @@ -852,9 +852,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv7/preset.mk b/linux-armv7/preset.mk new file mode 100644 index 0000000..15baeb3 --- /dev/null +++ b/linux-armv7/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv7 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv7 +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv7-unknown-linux-gnueabi --target=armv7-unknown-linux-gnueabi diff --git a/linux-armv7a-lts/crosstool-ng.config b/linux-armv7a-lts/crosstool-ng.config index adc3136..428c54f 100644 --- a/linux-armv7a-lts/crosstool-ng.config +++ b/linux-armv7a-lts/crosstool-ng.config @@ -849,9 +849,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-armv7a-lts/preset.mk b/linux-armv7a-lts/preset.mk new file mode 100644 index 0000000..f76e4c1 --- /dev/null +++ b/linux-armv7a-lts/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv7a-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv7-neon +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=arm-cortexa8_neon-linux-gnueabihf --target=arm-cortexa8_neon-linux-gnueabihf diff --git a/linux-armv7a/preset.mk b/linux-armv7a/preset.mk new file mode 100644 index 0000000..b7d352b --- /dev/null +++ b/linux-armv7a/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv7a + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv7-neon +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=arm-cortexa8_neon-linux-gnueabihf --target=arm-cortexa8_neon-linux-gnueabihf diff --git a/linux-armv7l-musl/preset.mk b/linux-armv7l-musl/preset.mk new file mode 100644 index 0000000..e8555b2 --- /dev/null +++ b/linux-armv7l-musl/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-armv7l-musl + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=armv7 +OPENSSL_ARGS = linux-armv4 +CPYTHON_ARGS = --host=armv7l-linux-musleabihf --target=armv7l-linux-musleabihf diff --git a/linux-i686/crosstool-ng.config b/linux-i686/crosstool-ng.config index 79be240..984ea5d 100644 --- a/linux-i686/crosstool-ng.config +++ b/linux-i686/crosstool-ng.config @@ -766,9 +766,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-i686/preset.mk b/linux-i686/preset.mk new file mode 100644 index 0000000..103fa28 --- /dev/null +++ b/linux-i686/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-i686 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl C SQLite fmt cpython +OPENSSL_ARGS = linux-generic32 +CPYTHON_ARGS = --host=i686-linux-gnu --target=i686-linux-gnu diff --git a/linux-loongarch64/preset.mk b/linux-loongarch64/preset.mk new file mode 100644 index 0000000..06504c3 --- /dev/null +++ b/linux-loongarch64/preset.mk @@ -0,0 +1,15 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-loongarch64 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C fmt cpython +STOCKFISH_ARGS = ARCH=loongarch64 +OPENSSL_ARGS = linux64-loongarch64 +C_ARGS = -DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types +CPYTHON_ARGS = --host=loongarch64-unknown-linux-gnu --target=loongarch64-unknown-linux-gnu diff --git a/linux-m68k-uclibc/crosstool-ng.config b/linux-m68k-uclibc/crosstool-ng.config index 1fa95f5..d3bed21 100644 --- a/linux-m68k-uclibc/crosstool-ng.config +++ b/linux-m68k-uclibc/crosstool-ng.config @@ -768,9 +768,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-m68k-uclibc/preset.mk b/linux-m68k-uclibc/preset.mk new file mode 100644 index 0000000..991f33a --- /dev/null +++ b/linux-m68k-uclibc/preset.mk @@ -0,0 +1,11 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-m68k-uclibc + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = SQLite diff --git a/linux-mips-lts/crosstool-ng.config b/linux-mips-lts/crosstool-ng.config index 1e07b7f..fad0c83 100644 --- a/linux-mips-lts/crosstool-ng.config +++ b/linux-mips-lts/crosstool-ng.config @@ -851,9 +851,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-mips-lts/preset.mk b/linux-mips-lts/preset.mk new file mode 100644 index 0000000..6500d38 --- /dev/null +++ b/linux-mips-lts/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-mips-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl C SQLite fmt cpython +OPENSSL_ARGS = linux-generic32 +CPYTHON_ARGS = --host=mips-unknown-linux-gnu --target=mips-unknown-linux-gnu diff --git a/linux-mips-uclibc/Dockerfile.in b/linux-mips-uclibc/Dockerfile.in index 9e3de15..9dd2f67 100644 --- a/linux-mips-uclibc/Dockerfile.in +++ b/linux-mips-uclibc/Dockerfile.in @@ -1,4 +1,5 @@ -FROM dockcross/base:latest +ARG ORG=dockcross +FROM ${ORG}/base:latest LABEL maintainer="Rene Helmke rene.helmke@fkie.fraunhofer.de" diff --git a/linux-mips-uclibc/crosstool-ng.config b/linux-mips-uclibc/crosstool-ng.config index 5ec9c5b..e4b4f59 100644 --- a/linux-mips-uclibc/crosstool-ng.config +++ b/linux-mips-uclibc/crosstool-ng.config @@ -793,9 +793,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-mips-uclibc/preset.mk b/linux-mips-uclibc/preset.mk new file mode 100644 index 0000000..ae2a815 --- /dev/null +++ b/linux-mips-uclibc/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-mips-uclibc + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-generic32 +CPYTHON_ARGS = --host=mips-unknown-linux-uclibc --target=mips-unknown-linux-uclibc diff --git a/linux-mips/crosstool-ng.config b/linux-mips/crosstool-ng.config index e63e17f..57e9200 100644 --- a/linux-mips/crosstool-ng.config +++ b/linux-mips/crosstool-ng.config @@ -838,9 +838,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-mips/preset.mk b/linux-mips/preset.mk new file mode 100644 index 0000000..42e6c94 --- /dev/null +++ b/linux-mips/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-mips + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl C SQLite fmt cpython +OPENSSL_ARGS = linux-generic32 +CPYTHON_ARGS = --host=mips-unknown-linux-gnu --target=mips-unknown-linux-gnu diff --git a/linux-mipsel-lts/crosstool-ng.config b/linux-mipsel-lts/crosstool-ng.config index 253ba72..56e3ad9 100644 --- a/linux-mipsel-lts/crosstool-ng.config +++ b/linux-mipsel-lts/crosstool-ng.config @@ -818,9 +818,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-mipsel-lts/preset.mk b/linux-mipsel-lts/preset.mk new file mode 100644 index 0000000..256c819 --- /dev/null +++ b/linux-mipsel-lts/preset.mk @@ -0,0 +1,11 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-mipsel-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = SQLite fmt diff --git a/linux-ppc/preset.mk b/linux-ppc/preset.mk new file mode 100644 index 0000000..60b81ed --- /dev/null +++ b/linux-ppc/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-ppc + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl C SQLite llama_cpp fmt cpython +OPENSSL_ARGS = linux-ppc +CPYTHON_ARGS = --host=powerpc-unknown-linux-gnu --target=powerpc-unknown-linux-gnu diff --git a/linux-ppc64le-lts/crosstool-ng.config b/linux-ppc64le-lts/crosstool-ng.config index 861a1c7..e624d45 100644 --- a/linux-ppc64le-lts/crosstool-ng.config +++ b/linux-ppc64le-lts/crosstool-ng.config @@ -841,9 +841,9 @@ CT_ZLIB_DEVEL_REVISION="" CT_ZLIB_DEVEL_SUBDIR="" CT_ZLIB_DEVEL_BOOTSTRAP="" CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-ppc64le-lts/preset.mk b/linux-ppc64le-lts/preset.mk new file mode 100644 index 0000000..6d59474 --- /dev/null +++ b/linux-ppc64le-lts/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-ppc64le-lts + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=ppc-64 +OPENSSL_ARGS = linux-ppc64le +CPYTHON_ARGS = --host=powerpc64le-unknown-linux-gnu --target=powerpc64le-unknown-linux-gnu diff --git a/linux-ppc64le/preset.mk b/linux-ppc64le/preset.mk new file mode 100644 index 0000000..6f0b48b --- /dev/null +++ b/linux-ppc64le/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-ppc64le + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite llama_cpp fmt cpython +STOCKFISH_ARGS = ARCH=ppc-64 +OPENSSL_ARGS = linux-ppc64le +CPYTHON_ARGS = --host=powerpc64le-unknown-linux-gnu --target=powerpc64le-unknown-linux-gnu diff --git a/linux-riscv32/crosstool-ng.config b/linux-riscv32/crosstool-ng.config index df6f8af..5653e48 100644 --- a/linux-riscv32/crosstool-ng.config +++ b/linux-riscv32/crosstool-ng.config @@ -919,9 +919,9 @@ CT_ZLIB_PATCH_GLOBAL=y # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set # CT_ZLIB_PATCH_NONE is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-riscv32/preset.mk b/linux-riscv32/preset.mk new file mode 100644 index 0000000..c967353 --- /dev/null +++ b/linux-riscv32/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-riscv32 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-generic32 +CPYTHON_ARGS = --host=riscv32-unknown-linux-gnu --target=riscv32-unknown-linux-gnu diff --git a/linux-riscv64/crosstool-ng.config b/linux-riscv64/crosstool-ng.config index 065c524..e64577d 100644 --- a/linux-riscv64/crosstool-ng.config +++ b/linux-riscv64/crosstool-ng.config @@ -919,9 +919,9 @@ CT_ZLIB_PATCH_GLOBAL=y # CT_ZLIB_PATCH_LOCAL_BUNDLED is not set # CT_ZLIB_PATCH_NONE is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-riscv64/preset.mk b/linux-riscv64/preset.mk new file mode 100644 index 0000000..5f46e6a --- /dev/null +++ b/linux-riscv64/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-riscv64 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl SQLite fmt cpython +OPENSSL_ARGS = linux-generic64 +CPYTHON_ARGS = --host=riscv64-unknown-linux-gnu --target=riscv64-unknown-linux-gnu diff --git a/linux-s390x/crosstool-ng.config b/linux-s390x/crosstool-ng.config index 2325f86..a9720cc 100644 --- a/linux-s390x/crosstool-ng.config +++ b/linux-s390x/crosstool-ng.config @@ -804,9 +804,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-s390x/preset.mk b/linux-s390x/preset.mk new file mode 100644 index 0000000..7a1e110 --- /dev/null +++ b/linux-s390x/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-s390x + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl C SQLite fmt cpython +OPENSSL_ARGS = linux64-s390x +CPYTHON_ARGS = --host=s390x-ibm-linux-gnu --target=s390x-ibm-linux-gnu diff --git a/linux-x64-clang/preset.mk b/linux-x64-clang/preset.mk new file mode 100644 index 0000000..eeb0f44 --- /dev/null +++ b/linux-x64-clang/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-x64-clang + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-64-modern COMP=clang +OPENSSL_ARGS = linux-x86_64-clang diff --git a/linux-x64-tinycc/preset.mk b/linux-x64-tinycc/preset.mk new file mode 100644 index 0000000..8ae3588 --- /dev/null +++ b/linux-x64-tinycc/preset.mk @@ -0,0 +1,15 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-x64-tinycc + +TEST_IMAGE_ARGS = --languages C + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl fmt +STOCKFISH_ARGS = ARCH=x86-64-modern +OPENSSL_ARGS = linux-generic64 no-tests no-asm no-hw no-dtls no-shared no-dso diff --git a/linux-x64/preset.mk b/linux-x64/preset.mk new file mode 100644 index 0000000..f3f3274 --- /dev/null +++ b/linux-x64/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-x64 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-64-modern +OPENSSL_ARGS = linux-x86_64 diff --git a/linux-x86/preset.mk b/linux-x86/preset.mk new file mode 100644 index 0000000..5572ee7 --- /dev/null +++ b/linux-x86/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-x86 + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-32-sse41-popcnt +OPENSSL_ARGS = linux-x86 diff --git a/linux-x86_64-full/preset.mk b/linux-x86_64-full/preset.mk new file mode 100644 index 0000000..6c21cd8 --- /dev/null +++ b/linux-x86_64-full/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-x86_64-full + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl C SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-64-modern +OPENSSL_ARGS = linux-x86_64 +CPYTHON_ARGS = --host=x86_64-buildroot-linux-gnu --target=x86_64-buildroot-linux-gnu diff --git a/linux-xtensa-uclibc/crosstool-ng.config b/linux-xtensa-uclibc/crosstool-ng.config index f7307a8..aa17ae9 100644 --- a/linux-xtensa-uclibc/crosstool-ng.config +++ b/linux-xtensa-uclibc/crosstool-ng.config @@ -733,9 +733,9 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y -CT_ZLIB_VERSION="1.2.12" -CT_ZLIB_MIRRORS="http://downloads.sourceforge.net/project/libpng/zlib/${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" +CT_ZLIB_V_1_2_13=y +CT_ZLIB_VERSION="1.2.13" +CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/" CT_ZLIB_ARCHIVE_FILENAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_DIRNAME="@{pkg_name}-@{version}" CT_ZLIB_ARCHIVE_FORMATS=".tar.xz .tar.gz" diff --git a/linux-xtensa-uclibc/preset.mk b/linux-xtensa-uclibc/preset.mk new file mode 100644 index 0000000..3460ce8 --- /dev/null +++ b/linux-xtensa-uclibc/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = linux-xtensa-uclibc + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja openssl cpython +OPENSSL_ARGS = linux-generic64 no-asm no-threads no-engine no-hw no-weak-ssl-ciphers no-dtls no-shared no-dso +CPYTHON_ARGS = --host=xtensa-fsf-linux-uclibc --target=xtensa-fsf-linux-uclibc diff --git a/manylinux2014-aarch64/crosstool-ng.config b/manylinux2014-aarch64/crosstool-ng.config index 4a81edf..89faa37 100644 --- a/manylinux2014-aarch64/crosstool-ng.config +++ b/manylinux2014-aarch64/crosstool-ng.config @@ -806,7 +806,7 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y +CT_ZLIB_V_1_2_13=y CT_ZLIB_VERSION="1.2.13" CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" diff --git a/manylinux2014-aarch64/preset.mk b/manylinux2014-aarch64/preset.mk new file mode 100644 index 0000000..5ccba8e --- /dev/null +++ b/manylinux2014-aarch64/preset.mk @@ -0,0 +1,25 @@ +# manylinux2014-aarch64 is FROM ${ORG}/manylinux2014-x64:latest (cross toolchain +# layered on top of the x64 manylinux image, so it can run on an x86_64 host). +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +BASE_IMAGE_NAME = manylinux2014-x64 +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux2014-aarch64 + +# Dockerfile.in ADDs manylinux2014-aarch64/xc_script and COPYs +# manylinux2014-aarch64/Toolchain.cmake, so the build context has to be the +# repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +DEPENDS_ON = manylinux2014-x64.build + +TEST_IMAGE_CMD = /opt/python/cp311-cp311/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = openssl SQLite cpython +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu diff --git a/manylinux2014-x64/preset.mk b/manylinux2014-x64/preset.mk new file mode 100644 index 0000000..3cb41c0 --- /dev/null +++ b/manylinux2014-x64/preset.mk @@ -0,0 +1,27 @@ +# manylinux2014-x64 is FROM quay.io/pypa/manylinux2014_x86_64 directly (hardcoded in +# Dockerfile.in, not parameterized via ORG/BASE_IMAGE). BASE_IMAGE_* below is only +# informational to satisfy the mandatory-var guard. +BASE_IMAGE_REGISTRY ?= quay.io +BASE_IMAGE_PATH ?= pypa +BASE_IMAGE_NAME = manylinux2014_x86_64 +BASE_IMAGE_TAG = 2024-07-20-e0def9a + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux2014-x64 + +# Dockerfile.in COPYs linux-x64/... and manylinux2014-x64/Toolchain.cmake, so the +# build context has to be the repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +TEST_IMAGE_CMD = /opt/python/cp311-cp311/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-64-modern +OPENSSL_ARGS = linux-x86_64 + +# FROM an external upstream image, not our own base - opt out of the +# Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/manylinux2014-x86/preset.mk b/manylinux2014-x86/preset.mk new file mode 100644 index 0000000..9ba4b30 --- /dev/null +++ b/manylinux2014-x86/preset.mk @@ -0,0 +1,26 @@ +# manylinux2014-x86 is FROM quay.io/pypa/manylinux2014_i686 directly (hardcoded in +# Dockerfile.in). BASE_IMAGE_* below is only informational to satisfy the guard. +BASE_IMAGE_REGISTRY ?= quay.io +BASE_IMAGE_PATH ?= pypa +BASE_IMAGE_NAME = manylinux2014_i686 +BASE_IMAGE_TAG = 2025-02-23-361da4c + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux2014-x86 + +# Dockerfile.in COPYs linux-x86/... and manylinux2014-x86/Toolchain.cmake, so the +# build context has to be the repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +TEST_IMAGE_CMD = /opt/python/cp311-cp311/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-32-sse41-popcnt +OPENSSL_ARGS = linux-x86 + +# FROM an external upstream image, not our own base - opt out of the +# Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/manylinux_2_28-aarch64/crosstool-ng.config b/manylinux_2_28-aarch64/crosstool-ng.config index 2232b3f..e9419bf 100644 --- a/manylinux_2_28-aarch64/crosstool-ng.config +++ b/manylinux_2_28-aarch64/crosstool-ng.config @@ -812,7 +812,7 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y +CT_ZLIB_V_1_2_13=y CT_ZLIB_VERSION="1.2.13" CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" diff --git a/manylinux_2_28-aarch64/preset.mk b/manylinux_2_28-aarch64/preset.mk new file mode 100644 index 0000000..4a70cce --- /dev/null +++ b/manylinux_2_28-aarch64/preset.mk @@ -0,0 +1,25 @@ +# manylinux_2_28-aarch64 is FROM ${ORG}/manylinux_2_28-x64:latest (cross toolchain +# layered on top of the x64 manylinux image, so it can run on an x86_64 host). +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +BASE_IMAGE_NAME = manylinux_2_28-x64 +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux_2_28-aarch64 + +# Dockerfile.in ADDs manylinux_2_28-aarch64/xc_script and COPYs +# manylinux_2_28-aarch64/Toolchain.cmake, so the build context has to be the +# repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +DEPENDS_ON = manylinux_2_28-x64.build + +TEST_IMAGE_CMD = /opt/python/cp310-cp310/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = openssl SQLite cpython +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu diff --git a/manylinux_2_28-x64/preset.mk b/manylinux_2_28-x64/preset.mk new file mode 100644 index 0000000..4f2c564 --- /dev/null +++ b/manylinux_2_28-x64/preset.mk @@ -0,0 +1,26 @@ +# manylinux_2_28-x64 is FROM quay.io/pypa/manylinux_2_28_x86_64 directly (hardcoded +# in Dockerfile.in). BASE_IMAGE_* below is only informational to satisfy the guard. +BASE_IMAGE_REGISTRY ?= quay.io +BASE_IMAGE_PATH ?= pypa +BASE_IMAGE_NAME = manylinux_2_28_x86_64 +BASE_IMAGE_TAG = 2025.08.12-1 + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux_2_28-x64 + +# Dockerfile.in COPYs linux-x64/... and manylinux_2_28-x64/Toolchain.cmake, so the +# build context has to be the repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +TEST_IMAGE_CMD = /opt/python/cp310-cp310/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish ninja openssl SQLite fmt cpython +STOCKFISH_ARGS = ARCH=x86-64-modern +OPENSSL_ARGS = linux-x86_64 + +# FROM an external upstream image, not our own base - opt out of the +# Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/manylinux_2_34-aarch64/crosstool-ng.config b/manylinux_2_34-aarch64/crosstool-ng.config index 8af2642..4853579 100644 --- a/manylinux_2_34-aarch64/crosstool-ng.config +++ b/manylinux_2_34-aarch64/crosstool-ng.config @@ -827,7 +827,7 @@ CT_ZLIB_PKG_NAME="zlib" CT_ZLIB_SRC_RELEASE=y # CT_ZLIB_SRC_DEVEL is not set CT_ZLIB_PATCH_ORDER="global" -CT_ZLIB_V_1_2_12=y +CT_ZLIB_V_1_2_13=y CT_ZLIB_VERSION="1.2.13" CT_ZLIB_MIRRORS="https://github.com/madler/zlib/releases/download/v${CT_ZLIB_VERSION} https://www.zlib.net/ https://www.zlib.net/fossils" diff --git a/manylinux_2_34-aarch64/preset.mk b/manylinux_2_34-aarch64/preset.mk new file mode 100644 index 0000000..30ced5e --- /dev/null +++ b/manylinux_2_34-aarch64/preset.mk @@ -0,0 +1,25 @@ +# manylinux_2_34-aarch64 is FROM ${ORG}/manylinux_2_34-x64:latest (cross toolchain +# layered on top of the x64 manylinux image, so it can run on an x86_64 host). +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +BASE_IMAGE_NAME = manylinux_2_34-x64 +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux_2_34-aarch64 + +# Dockerfile.in ADDs manylinux_2_34-aarch64/xc_script and COPYs +# manylinux_2_34-aarch64/Toolchain.cmake, so the build context has to be the +# repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +DEPENDS_ON = manylinux_2_34-x64.build + +TEST_IMAGE_CMD = /opt/python/cp310-cp310/bin/python test/run.py +TEST_IMAGE_ARGS = + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = openssl SQLite cpython +OPENSSL_ARGS = linux-aarch64 +CPYTHON_ARGS = --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu diff --git a/manylinux_2_34-x64/preset.mk b/manylinux_2_34-x64/preset.mk new file mode 100644 index 0000000..03d94f1 --- /dev/null +++ b/manylinux_2_34-x64/preset.mk @@ -0,0 +1,21 @@ +# manylinux_2_34-x64 is FROM quay.io/pypa/manylinux_2_34_x86_64 directly (hardcoded +# in Dockerfile.in). BASE_IMAGE_* below is only informational to satisfy the guard. +BASE_IMAGE_REGISTRY ?= quay.io +BASE_IMAGE_PATH ?= pypa +BASE_IMAGE_NAME = manylinux_2_34_x86_64 +BASE_IMAGE_TAG = 2025-02-02-9ae4a5a + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = manylinux_2_34-x64 + +# Dockerfile.in COPYs linux-x64/... and manylinux_2_34-x64/Toolchain.cmake, so the +# build context has to be the repository root, not this preset's own directory. +BUILD_CONTEXT_DIR = $(PRESET_DIR) + +TEST_IMAGE_CMD = /opt/python/cp310-cp310/bin/python test/run.py +TEST_IMAGE_ARGS = + +# FROM an external upstream image, not our own base - opt out of the +# Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/preset.mk b/preset.mk new file mode 100644 index 0000000..f306019 --- /dev/null +++ b/preset.mk @@ -0,0 +1,19 @@ +# Preset for the "base" image, built from the repository root Dockerfile.in. +# Every other preset is built FROM ${ORG}/base:latest. + +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +BASE_IMAGE_NAME = debian +BASE_IMAGE_TAG = bookworm-slim + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = base + +TEST_IMAGE_CMD = true +TEST_IMAGE_ARGS = +RUN_IMAGE_CMD = /bin/bash +RUN_IMAGE_ARGS = + +# Not FROM itself - opt out of the Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/web-wasi-emulated-threads/Dockerfile.in b/web-wasi-emulated-threads/Dockerfile.in index e9316fb..87424dc 100644 --- a/web-wasi-emulated-threads/Dockerfile.in +++ b/web-wasi-emulated-threads/Dockerfile.in @@ -9,7 +9,11 @@ ENV WASI_VERSION=27 ENV WASI_VERSION_FULL=${WASI_VERSION}.0 ENV WASMTIME_HOME=/wasi-runtimes/wasmtime -RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash +# Pinned below v47.0.0: that release removes wasi-threads/wasi-common support +# entirely (see https://github.com/bytecodealliance/rfcs/pull/47), which the +# wasi-sdk sysroot test suite below relies on for its threaded targets. +ENV WASMTIME_VERSION=v46.0.1 +RUN mkdir -p ${WASMTIME_HOME} && curl https://wasmtime.dev/install.sh -sSf | bash -s -- --version ${WASMTIME_VERSION} ENV PATH="$WASMTIME_HOME/bin:$PATH" COPY download-build-install-wasi-sdk.sh /usr/local/bin/ diff --git a/web-wasi-emulated-threads/download-build-install-wasi-sdk.sh b/web-wasi-emulated-threads/download-build-install-wasi-sdk.sh index 1a35663..07a4995 100755 --- a/web-wasi-emulated-threads/download-build-install-wasi-sdk.sh +++ b/web-wasi-emulated-threads/download-build-install-wasi-sdk.sh @@ -17,6 +17,22 @@ git fetch origin --tags git remote add upstream https://github.com/WebAssembly/wasi-sdk git fetch upstream wasi-sdk-${WASI_VERSION} +# Recent wasmtime releases require the threads and shared-memory wasm +# features to be enabled explicitly. WASI_SDK_RUNWASI is a single cache +# variable shared by every test target (wasi, wasip1, wasip2, and their +# -threads variants), so overriding it globally breaks the non-threads +# targets. Instead, route only the `*-threads` targets through the +# wrapper by patching the per-test runner selection in tests/CMakeLists.txt. +cat > /usr/local/bin/wasmtime-run-threads.sh <<'EOS' +#!/usr/bin/env bash +exec wasmtime run -W threads=y,shared-memory=y -S threads=y,cli=y "$@" +EOS +chmod +x /usr/local/bin/wasmtime-run-threads.sh +sed -i '/if(target MATCHES threads)/a\ + if(runwasi)\ + set(runwasi "/usr/local/bin/wasmtime-run-threads.sh")\ + endif()' tests/CMakeLists.txt + ./ci/build.sh cd build/dist tar xzf wasi-toolchain-*.tar.gz --strip-components=1 -C /opt/wasi-sdk diff --git a/web-wasi-emulated-threads/preset.mk b/web-wasi-emulated-threads/preset.mk new file mode 100644 index 0000000..418a580 --- /dev/null +++ b/web-wasi-emulated-threads/preset.mk @@ -0,0 +1,8 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = web-wasi-emulated-threads diff --git a/web-wasi-threads/preset.mk b/web-wasi-threads/preset.mk new file mode 100644 index 0000000..a1aef55 --- /dev/null +++ b/web-wasi-threads/preset.mk @@ -0,0 +1,12 @@ +# web-wasi-threads is FROM ${ORG}/web-wasi:latest (wasm threading proposal layered +# on top of web-wasi), so web-wasi has to be built first. +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= +BASE_IMAGE_NAME = web-wasi +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = web-wasi-threads + +DEPENDS_ON = web-wasi.build diff --git a/web-wasi/preset.mk b/web-wasi/preset.mk new file mode 100644 index 0000000..6092fcc --- /dev/null +++ b/web-wasi/preset.mk @@ -0,0 +1,8 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = web-wasi diff --git a/web-wasm/preset.mk b/web-wasm/preset.mk new file mode 100644 index 0000000..a452ee5 --- /dev/null +++ b/web-wasm/preset.mk @@ -0,0 +1,25 @@ +# web-wasm is FROM emscripten/emsdk: directly (upstream image, +# not our own base). The arch-tag ("" for amd64, "-arm64" for arm64) is required +# because emscripten/emsdk does not publish a single multi-arch manifest. +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= emscripten +BASE_IMAGE_NAME = emsdk +BASE_IMAGE_TAG = 5.0.1 + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = web-wasm + +EMSCRIPTEN_HOST_ARCH_TAG = $(if $(filter arm64,$(HOST_ARCH)),-arm64,) +EXTRA_BUILD_ARGS = --build-arg HOST_ARCH_TAG=$(EMSCRIPTEN_HOST_ARCH_TAG) + +TEST_IMAGE_CMD = python test/run.py +TEST_IMAGE_ARGS = --exe-suffix ".js" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = SQLite +RAYLIB_ARGS = -DPLATFORM=Web + +# FROM an external upstream image, not our own base - opt out of the +# Makefile's "DEPENDS_ON = base.build" default. +DEPENDS_ON = diff --git a/windows-arm64/preset.mk b/windows-arm64/preset.mk new file mode 100644 index 0000000..f806bfb --- /dev/null +++ b/windows-arm64/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-arm64 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja fmt raylib diff --git a/windows-armv7/preset.mk b/windows-armv7/preset.mk new file mode 100644 index 0000000..cac4f8a --- /dev/null +++ b/windows-armv7/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-armv7 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = ninja fmt raylib diff --git a/windows-shared-x64-posix/preset.mk b/windows-shared-x64-posix/preset.mk new file mode 100644 index 0000000..112c406 --- /dev/null +++ b/windows-shared-x64-posix/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-shared-x64-posix + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = fmt diff --git a/windows-shared-x64/preset.mk b/windows-shared-x64/preset.mk new file mode 100644 index 0000000..655450f --- /dev/null +++ b/windows-shared-x64/preset.mk @@ -0,0 +1,13 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-shared-x64 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = fmt diff --git a/windows-shared-x86/preset.mk b/windows-shared-x86/preset.mk new file mode 100644 index 0000000..d26991c --- /dev/null +++ b/windows-shared-x86/preset.mk @@ -0,0 +1,10 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-shared-x86 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" diff --git a/windows-static-x64-posix/preset.mk b/windows-static-x64-posix/preset.mk new file mode 100644 index 0000000..509f310 --- /dev/null +++ b/windows-static-x64-posix/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-static-x64-posix + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish fmt +STOCKFISH_ARGS = ARCH=x86-64-modern COMP=mingw diff --git a/windows-static-x64/preset.mk b/windows-static-x64/preset.mk new file mode 100644 index 0000000..3144396 --- /dev/null +++ b/windows-static-x64/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-static-x64 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish fmt +STOCKFISH_ARGS = ARCH=x86-64-modern COMP=mingw diff --git a/windows-static-x86/preset.mk b/windows-static-x86/preset.mk new file mode 100644 index 0000000..0edf805 --- /dev/null +++ b/windows-static-x86/preset.mk @@ -0,0 +1,14 @@ +BASE_IMAGE_REGISTRY ?= docker.io +BASE_IMAGE_PATH ?= dockcross +BASE_IMAGE_NAME = base +BASE_IMAGE_TAG = latest + +OUTPUT_IMAGE_REGISTRY ?= docker.io +OUTPUT_IMAGE_PATH ?= dockcross +OUTPUT_IMAGE_NAME = windows-static-x86 + +TEST_IMAGE_ARGS = --exe-suffix ".exe" + +# Extra tests (see CONTRIBUTING.md / Makefile "Extra tests" section) +EXTRA_TESTS = stockfish fmt +STOCKFISH_ARGS = ARCH=x86-32-sse41-popcnt COMP=mingw