From 2462690276983ea57f3922d8079c2e1033cf3368 Mon Sep 17 00:00:00 2001 From: Rim Date: Thu, 20 Feb 2025 07:30:30 -0500 Subject: [PATCH] chore: fix deps --- deps/GSL/.github/ISSUE_TEMPLATE/bug_report.md | 29 ++ deps/GSL/.github/workflows/android.yml | 59 ++++ deps/GSL/.github/workflows/cmake/action.yml | 56 ++++ .../.github/workflows/cmake_find_package.yml | 25 ++ deps/GSL/.github/workflows/compilers.yml | 115 ++++++++ deps/GSL/.github/workflows/ios.yml | 52 ++++ deps/WinToast/.github/FUNDING.yml | 2 + deps/WinToast/.github/workflows/build.yml | 56 ++++ deps/asmjit/.github/FUNDING.yml | 1 + .../.github/ISSUE_TEMPLATE/01_bug_report.yml | 42 +++ .../ISSUE_TEMPLATE/02_feature_request.yml | 18 ++ .../ISSUE_TEMPLATE/03_help_question.yml | 18 ++ .../ISSUE_TEMPLATE/99_other_issues.yml | 11 + .../.github/workflows/build-config.json | 25 ++ deps/asmjit/.github/workflows/build.yml | 244 +++++++++++++++ deps/gsc-tool/.github/FUNDING.yml | 2 + deps/gsc-tool/.github/workflows/main.yml | 278 ++++++++++++++++++ .../deps/zlib/.github/workflows/cmake.yml | 89 ++++++ .../deps/zlib/.github/workflows/configure.yml | 136 +++++++++ .../deps/zlib/.github/workflows/fuzz.yml | 25 ++ deps/libtomcrypt/.github/ISSUE_TEMPLATE.md | 30 ++ .../.github/PULL_REQUEST_TEMPLATE.md | 13 + deps/libtomcrypt/.github/workflows/main.yml | 100 +++++++ deps/libtommath/.github/workflows/deploy.yml | 47 +++ deps/libtommath/.github/workflows/main.yml | 222 ++++++++++++++ .../.github/ISSUE_TEMPLATE/bug_report.md | 39 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 28 ++ deps/protobuf/.github/mergeable.yml | 18 ++ deps/protobuf/.github/workflows/codespell.yml | 16 + deps/protobuf/.github/workflows/php-ext.yml | 43 +++ deps/zlib/.github/workflows/c-std.yml | 208 +++++++++++++ deps/zlib/.github/workflows/cmake.yml | 98 ++++++ deps/zlib/.github/workflows/configure.yml | 136 +++++++++ deps/zlib/.github/workflows/fuzz.yml | 25 ++ 34 files changed, 2306 insertions(+) create mode 100644 deps/GSL/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 deps/GSL/.github/workflows/android.yml create mode 100644 deps/GSL/.github/workflows/cmake/action.yml create mode 100644 deps/GSL/.github/workflows/cmake_find_package.yml create mode 100644 deps/GSL/.github/workflows/compilers.yml create mode 100644 deps/GSL/.github/workflows/ios.yml create mode 100644 deps/WinToast/.github/FUNDING.yml create mode 100644 deps/WinToast/.github/workflows/build.yml create mode 100644 deps/asmjit/.github/FUNDING.yml create mode 100644 deps/asmjit/.github/ISSUE_TEMPLATE/01_bug_report.yml create mode 100644 deps/asmjit/.github/ISSUE_TEMPLATE/02_feature_request.yml create mode 100644 deps/asmjit/.github/ISSUE_TEMPLATE/03_help_question.yml create mode 100644 deps/asmjit/.github/ISSUE_TEMPLATE/99_other_issues.yml create mode 100644 deps/asmjit/.github/workflows/build-config.json create mode 100644 deps/asmjit/.github/workflows/build.yml create mode 100644 deps/gsc-tool/.github/FUNDING.yml create mode 100644 deps/gsc-tool/.github/workflows/main.yml create mode 100644 deps/gsc-tool/deps/zlib/.github/workflows/cmake.yml create mode 100644 deps/gsc-tool/deps/zlib/.github/workflows/configure.yml create mode 100644 deps/gsc-tool/deps/zlib/.github/workflows/fuzz.yml create mode 100644 deps/libtomcrypt/.github/ISSUE_TEMPLATE.md create mode 100644 deps/libtomcrypt/.github/PULL_REQUEST_TEMPLATE.md create mode 100644 deps/libtomcrypt/.github/workflows/main.yml create mode 100644 deps/libtommath/.github/workflows/deploy.yml create mode 100644 deps/libtommath/.github/workflows/main.yml create mode 100644 deps/protobuf/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 deps/protobuf/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 deps/protobuf/.github/mergeable.yml create mode 100644 deps/protobuf/.github/workflows/codespell.yml create mode 100644 deps/protobuf/.github/workflows/php-ext.yml create mode 100644 deps/zlib/.github/workflows/c-std.yml create mode 100644 deps/zlib/.github/workflows/cmake.yml create mode 100644 deps/zlib/.github/workflows/configure.yml create mode 100644 deps/zlib/.github/workflows/fuzz.yml diff --git a/deps/GSL/.github/ISSUE_TEMPLATE/bug_report.md b/deps/GSL/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..be72e49 --- /dev/null +++ b/deps/GSL/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: 'Status: Open, Type: Bug' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +```c++ +#include + +// your repro here: ... +``` + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Spec (please complete the following information):** + - OS: [e.g. Windows] + - Compiler: [e.g. MSVC] + - C++ Version: [e.g. C++20] + +**Additional context** +Add any other context about the problem here. diff --git a/deps/GSL/.github/workflows/android.yml b/deps/GSL/.github/workflows/android.yml new file mode 100644 index 0000000..97259a8 --- /dev/null +++ b/deps/GSL/.github/workflows/android.yml @@ -0,0 +1,59 @@ +name: CI_Android + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + Android: + runs-on: macos-latest-large + defaults: + run: + working-directory: build + steps: + - uses: actions/checkout@v4 + + - name: Create build directory + run: mkdir -p build + working-directory: . + + - uses: actions/setup-java@v4 + with: + java-version: 8 + distribution: zulu + + - name: Start Emulator + run: | + echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-24;default;x86_64' + echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-24;default;x86_64' --force + $ANDROID_HOME/emulator/emulator -list-avds + echo "Starting emulator..." + nohup $ANDROID_HOME/emulator/emulator -no-audio -no-snapshot -avd xamarin_android_emulator &> /dev/null & + echo "Emulator starting in background" + + - name: Configure + run: cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=16 -DANDROID_ABI=x86_64 -DCMAKE_BUILD_TYPE=Debug .. + + - name: Build + run: cmake --build . --parallel + + - name: Wait for emulator ready + timeout-minutes: 2 + run: | + $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 10; done; input keyevent 82' + $ANDROID_HOME/platform-tools/adb devices + $ANDROID_HOME/platform-tools/adb shell getprop ro.product.cpu.abi + + - name: Deploy tests + run: | + adb push tests /data/local/tmp + adb shell find /data/local/tmp/tests -maxdepth 1 -exec chmod +x {} \\\; + + - name: Test + run: adb shell find /data/local/tmp/tests -name "*_tests" -maxdepth 1 -exec {} \\\; diff --git a/deps/GSL/.github/workflows/cmake/action.yml b/deps/GSL/.github/workflows/cmake/action.yml new file mode 100644 index 0000000..0ac09bf --- /dev/null +++ b/deps/GSL/.github/workflows/cmake/action.yml @@ -0,0 +1,56 @@ +name: Composite CMake +inputs: + cmake_generator: + required: false + type: string + default: 'Unix Makefiles' + cmake_build_type: + required: true + type: string + default: '' + cmake_cxx_compiler: + required: false + type: string + gsl_cxx_standard: + required: true + type: number + extra_cmake_args: + required: false + type: string + default: '' + build_cmd: + required: true + type: string + default: 'make' + test_cmd: + required: false + type: string + default: 'make test' + shell: + required: false + type: string + default: 'bash' + + +runs: + using: composite + steps: + - name: Create build directory + run: mkdir build + shell: ${{ inputs.shell }} + + - name: Configure CMake + working-directory: build + run: cmake -G "${{ inputs.cmake_generator }}" -DCMAKE_BUILD_TYPE=${{ inputs.cmake_build_type }} -DCMAKE_CXX_COMPILER=${{ inputs.cmake_cxx_compiler }} -DGSL_CXX_STANDARD=${{ inputs.gsl_cxx_standard }} -DCI_TESTING:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Werror=dev ${{ inputs.extra_cmake_args }} .. + shell: ${{ inputs.shell }} + + - name: Build + working-directory: build + run: ${{ inputs.build_cmd }} + shell: ${{ inputs.shell }} + + - name: Test + working-directory: build + run: ${{ inputs.test_cmd }} + shell: ${{ inputs.shell }} + diff --git a/deps/GSL/.github/workflows/cmake_find_package.yml b/deps/GSL/.github/workflows/cmake_find_package.yml new file mode 100644 index 0000000..fd2f7a8 --- /dev/null +++ b/deps/GSL/.github/workflows/cmake_find_package.yml @@ -0,0 +1,25 @@ +name: cmake_find_package +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + cmake-find-package: + name: Build ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + steps: + - uses: actions/checkout@v4 + - uses: lukka/get-cmake@latest + with: + cmakeVersion: 3.14.0 + - name: Configure GSL + run: cmake -S . -B build -G "Ninja" -D GSL_TEST=OFF -D CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/build/install + - name: Install GSL + run: cmake --build build --target install + - name: Test GSL find_package support + run: cmake -S tests/ -B build/tests_find_package -G "Ninja" -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install -D CMAKE_BUILD_TYPE=Release diff --git a/deps/GSL/.github/workflows/compilers.yml b/deps/GSL/.github/workflows/compilers.yml new file mode 100644 index 0000000..3857583 --- /dev/null +++ b/deps/GSL/.github/workflows/compilers.yml @@ -0,0 +1,115 @@ +name: Compiler Integration Tests + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +# These jobs are correlated with the officially supported compilers +# and toolsets. If you change any versions, please update README.md. + +jobs: + gcc: + strategy: + matrix: + gcc_version: [ 12, 13, 14 ] + build_type: [ Debug, Release ] + cxx_version: [ 14, 17, 20, 23 ] + exclude: + # https://github.com/google/googletest/issues/4232 + # Looks like GoogleTest is not interested in making version 1.14 + # work with gcc-12. + - gcc_version: 12 + cxx_version: 20 + - gcc_version: 12 + cxx_version: 23 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run CMake (configure, build, test) + uses: ./.github/workflows/cmake + with: + cmake_build_type: ${{ matrix.build_type }} + cmake_cxx_compiler: g++-${{ matrix.gcc_version }} + gsl_cxx_standard: ${{ matrix.cxx_version }} + + clang: + strategy: + matrix: + clang_version: [ 16, 17, 18 ] + build_type: [ Debug, Release ] + cxx_version: [ 14, 17, 20, 23 ] + exclude: + # https://github.com/llvm/llvm-project/issues/93734 + # Looks like clang fixed this issue in clang-18, but won't backport + # the fix. + - clang_version: 17 + cxx_version: 23 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run CMake (configure, build, test) + uses: ./.github/workflows/cmake + with: + cmake_build_type: ${{ matrix.build_type }} + cmake_cxx_compiler: clang++-${{ matrix.clang_version }} + gsl_cxx_standard: ${{ matrix.cxx_version }} + + xcode: + strategy: + matrix: + xcode_version: [ '15.4' ] + build_type: [ Debug, Release ] + cxx_version: [ 14, 17, 20, 23 ] + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: select xcode version + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app + + - name: Run CMake (configure, build, test) + uses: ./.github/workflows/cmake + with: + cmake_build_type: ${{ matrix.build_type }} + cmake_cxx_compiler: clang++ + gsl_cxx_standard: ${{ matrix.cxx_version }} + + VisualStudio: + strategy: + matrix: + generator: [ 'Visual Studio 16 2019', 'Visual Studio 17 2022' ] + image: [ windows-2019, windows-2022 ] + build_type: [ Debug, Release ] + extra_args: [ '', '-T ClangCL' ] + cxx_version: [ 14, 17, 20, 23 ] + exclude: + - generator: 'Visual Studio 17 2022' + image: windows-2019 + - generator: 'Visual Studio 16 2019' + image: windows-2022 + - generator: 'Visual Studio 16 2019' + cxx_version: 23 + runs-on: ${{ matrix.image }} + steps: + - uses: actions/checkout@v4 + - uses: microsoft/setup-msbuild@v2 + + - name: Run CMake (configure, build, test) + uses: ./.github/workflows/cmake + with: + cmake_generator: ${{ matrix.generator }} + cmake_build_type: ${{ matrix.build_type }} + gsl_cxx_standard: ${{ matrix.cxx_version }} + extra_cmake_args: ${{ matrix.extra_args }} + build_cmd: msbuild GSL.sln + test_cmd: ctest . --output-on-failure --no-compress-output + shell: pwsh + diff --git a/deps/GSL/.github/workflows/ios.yml b/deps/GSL/.github/workflows/ios.yml new file mode 100644 index 0000000..89627a1 --- /dev/null +++ b/deps/GSL/.github/workflows/ios.yml @@ -0,0 +1,52 @@ +name: CI_iOS +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + iOS: + runs-on: macos-latest + defaults: + run: + working-directory: build + steps: + - uses: actions/checkout@v4 + + - name: Create build directory + run: mkdir -p build + working-directory: . + + - name: Configure + run: | + cmake \ + -Werror=dev \ + -GXcode \ + -DCMAKE_SYSTEM_NAME=iOS \ + "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=9 \ + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \ + "-DMACOSX_BUNDLE_GUI_IDENTIFIER=GSL.\$(EXECUTABLE_NAME)" \ + -DMACOSX_BUNDLE_BUNDLE_VERSION=3.1.0 \ + -DMACOSX_BUNDLE_SHORT_VERSION_STRING=3.1.0 \ + .. + + - name: Build + run: cmake --build . --parallel `sysctl -n hw.ncpu` --config Release -- -sdk iphonesimulator + + - name: Start simulator + run: | + RUNTIME=`xcrun simctl list runtimes iOS -j|jq '.runtimes|last.identifier'` + UDID=`xcrun simctl list devices iPhone available -j|jq -r ".devices[$RUNTIME]|last.udid"` + xcrun simctl bootstatus $UDID -b + + - name: Test + run: | + for TEST in `find tests/Release-iphonesimulator -depth 1 -name "*.app"` + do + xcrun simctl install booted $TEST + TEST_ID=`plutil -convert json -o - $TEST/Info.plist|jq -r ".CFBundleIdentifier"` + xcrun simctl launch --console booted $TEST_ID + xcrun simctl uninstall booted $TEST_ID + done diff --git a/deps/WinToast/.github/FUNDING.yml b/deps/WinToast/.github/FUNDING.yml new file mode 100644 index 0000000..3bdeede --- /dev/null +++ b/deps/WinToast/.github/FUNDING.yml @@ -0,0 +1,2 @@ +patreon: mohabouje +custom: https://paypal.me/mohabouje diff --git a/deps/WinToast/.github/workflows/build.yml b/deps/WinToast/.github/workflows/build.yml new file mode 100644 index 0000000..b6702f9 --- /dev/null +++ b/deps/WinToast/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: Build with CMake + +on: + push: + branches: [master] + pull_request: + branches: [master] + +env: + BUILD_TYPE: Release + QT_VERSION: 6.6.0 + +jobs: + build: + strategy: + matrix: + include: + # With Qt examples + - with-qt: true + with-examples: true + # Examples without Qt + - with-qt: false + with-examples: true + # No examples + - with-qt: false + with-examples: false + + name: 'Examples: ${{ matrix.with-examples }}, Qt: ${{ matrix.with-qt }}' + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.12.1 + + - name: Install Qt + if: matrix.with-qt + uses: jurplel/install-qt-action@v3.3.0 + with: + cache: true + cache-key-prefix: QtCache-${{ env.QT_VERSION }} + version: ${{ env.QT_VERSION }} + + - name: Configure CMake + run: > + cmake + -B build + -G Ninja + -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + -DWINTOASTLIB_BUILD_EXAMPLES=${{ matrix.with-examples && 'On' || 'Off' }} + -DWINTOASTLIB_QT_ENABLED=${{ matrix.with-qt && 'On' || 'Off' }} + + - name: Build + working-directory: build + run: ninja all diff --git a/deps/asmjit/.github/FUNDING.yml b/deps/asmjit/.github/FUNDING.yml new file mode 100644 index 0000000..4098a26 --- /dev/null +++ b/deps/asmjit/.github/FUNDING.yml @@ -0,0 +1 @@ +github: kobalicek diff --git a/deps/asmjit/.github/ISSUE_TEMPLATE/01_bug_report.yml b/deps/asmjit/.github/ISSUE_TEMPLATE/01_bug_report.yml new file mode 100644 index 0000000..ba173b4 --- /dev/null +++ b/deps/asmjit/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -0,0 +1,42 @@ +name: Bug Report +description: File a bug report +body: + - type: markdown + attributes: + value: | + Before you hit the submit button: + * Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md). + * Make sure that you use a recent AsmJit (master branch) before filing a bug report. + * Make sure that you use logging and error handling features to collect as much information as possible, if applicable. + - type: textarea + id: issue-description + attributes: + label: Issue Description + description: Please share a clear and concise description of the issue and optionally provide reproducibility information and output from AsmJit's logger. + placeholder: Description + validations: + required: true + - type: dropdown + id: operating-system + attributes: + label: Operating System + multiple: true + options: + - Not specified / possibly all + - Windows + - Linux + - Mac + - Android + - Other + - type: dropdown + id: target-architecture + attributes: + label: Architecture + multiple: true + options: + - Not specified + - X86 / X86_64 + - AArch32 + - AArch64 + - RISC-V + - Other diff --git a/deps/asmjit/.github/ISSUE_TEMPLATE/02_feature_request.yml b/deps/asmjit/.github/ISSUE_TEMPLATE/02_feature_request.yml new file mode 100644 index 0000000..f1e9f3d --- /dev/null +++ b/deps/asmjit/.github/ISSUE_TEMPLATE/02_feature_request.yml @@ -0,0 +1,18 @@ +name: Feature Request +description: Request a new feature or enhancement +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Before you hit the submit button: + * Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md). + * Make sure that you use a recent AsmJit (master branch) before filing a feature request. + - type: textarea + id: issue-description + attributes: + label: Issue Description + description: Please share a clear and concise description of a new feature or enhancement. + placeholder: Description + validations: + required: true diff --git a/deps/asmjit/.github/ISSUE_TEMPLATE/03_help_question.yml b/deps/asmjit/.github/ISSUE_TEMPLATE/03_help_question.yml new file mode 100644 index 0000000..8d829ed --- /dev/null +++ b/deps/asmjit/.github/ISSUE_TEMPLATE/03_help_question.yml @@ -0,0 +1,18 @@ +name: Help & Questions +description: Ask a question or get help +labels: [question] +body: + - type: markdown + attributes: + value: | + Before you hit the submit button: + * Please see our [Contribution Guidelines](https://github.com/asmjit/asmjit/blob/master/CONTRIBUTING.md). + * [Gitter Chat](https://app.gitter.im/#/room/#asmjit:gitter.im) is usually faster to get answers. + * If you need a help, please include as much information as possible to make it clear what the intend is. + - type: textarea + id: issue-description + attributes: + label: Details + description: The description of the problem or question. + validations: + required: true diff --git a/deps/asmjit/.github/ISSUE_TEMPLATE/99_other_issues.yml b/deps/asmjit/.github/ISSUE_TEMPLATE/99_other_issues.yml new file mode 100644 index 0000000..4f4e36e --- /dev/null +++ b/deps/asmjit/.github/ISSUE_TEMPLATE/99_other_issues.yml @@ -0,0 +1,11 @@ +name: Other Issues +description: Something that doesn't fit the other categories +body: + - type: textarea + id: issue-description + attributes: + label: Issue Description + description: Please share a clear and concise description of the issue. + placeholder: Description + validations: + required: true diff --git a/deps/asmjit/.github/workflows/build-config.json b/deps/asmjit/.github/workflows/build-config.json new file mode 100644 index 0000000..e72d8e3 --- /dev/null +++ b/deps/asmjit/.github/workflows/build-config.json @@ -0,0 +1,25 @@ +{ + "diagnostics": { + "asan": { "definitions": ["ASMJIT_SANITIZE=address"] }, + "ubsan": { "definitions": ["ASMJIT_SANITIZE=undefined"] }, + "msan": { "definitions": ["ASMJIT_SANITIZE=memory"] } + }, + + "valgrind_arguments": [ + "--leak-check=full", + "--show-reachable=yes", + "--track-origins=yes" + ], + + "tests": [ + { "optional": true, "cmd": ["asmjit_test_unit", "--quick"] }, + { "optional": true, "cmd": ["asmjit_test_assembler"] }, + { "optional": true, "cmd": ["asmjit_test_assembler", "--validate"] }, + { "optional": true, "cmd": ["asmjit_test_emitters"] }, + { "optional": true, "cmd": ["asmjit_test_execute"] }, + { "optional": true, "cmd": ["asmjit_test_compiler"] }, + { "optional": true, "cmd": ["asmjit_test_instinfo"] }, + { "optional": true, "cmd": ["asmjit_test_x86_sections"] }, + { "optional": true, "cmd": ["asmjit_test_perf", "--quick"] } + ] +} diff --git a/deps/asmjit/.github/workflows/build.yml b/deps/asmjit/.github/workflows/build.yml new file mode 100644 index 0000000..ad81cf7 --- /dev/null +++ b/deps/asmjit/.github/workflows/build.yml @@ -0,0 +1,244 @@ +name: "Build" +on: + push: + pull_request: + +concurrency: + group: ${{github.ref}} + cancel-in-progress: ${{github.ref != 'refs/heads/master'}} + +defaults: + run: + shell: bash + +jobs: + source-check: + name: "source check" + runs-on: ubuntu-latest + + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - name: "Setup node.js" + uses: actions/setup-node@v4 + with: + node-version: "*" + + - name: "Check Enumerations" + run: | + cd tools + node enumgen.js --verify + + build: + strategy: + fail-fast: false + matrix: + include: + - { title: "diag-analyze" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Debug" , diagnostics: "analyze-build" } + - { title: "diag-asan" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", diagnostics: "asan", defs: "ASMJIT_TEST=1" } + - { title: "diag-msan" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", diagnostics: "msan", defs: "ASMJIT_TEST=1" } + - { title: "diag-ubsan" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", diagnostics: "ubsan", defs: "ASMJIT_TEST=1" } + - { title: "diag-hardened" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", diagnostics: "hardened", defs: "ASMJIT_TEST=1" } + - { title: "diag-valgrind" , host: "ubuntu-24.04" , arch: "x64" , cc: "clang-18", conf: "Release", diagnostics: "valgrind", defs: "ASMJIT_TEST=1" } + + - { title: "no-deprecated" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_DEPRECATED=1" } + - { title: "no-intrinsics" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_INTRINSICS=1" } + - { title: "no-logging" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1" } + - { title: "no-logging-text" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_LOGGING=1,ASMJIT_NO_TEXT=1" } + - { title: "no-builder" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_BUILDER=1" } + - { title: "no-compiler" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1" } + - { title: "no-introspection", host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_COMPILER=1,ASMJIT_NO_INTROSPECTION=1" } + - { title: "no-jit" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_JIT=1" } + - { title: "no-validation" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_VALIDATION=1" } + - { title: "no-x86" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_X86=1" } + - { title: "no-aarch64" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1,ASMJIT_NO_AARCH64=1" } + + - { title: "lang-c++17" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Debug" , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++17" } + - { title: "lang-c++20" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Debug" , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++20" } + - { title: "lang-c++23" , host: "ubuntu-latest" , arch: "x64" , cc: "clang-18", conf: "Debug" , defs: "ASMJIT_TEST=1,CMAKE_CXX_FLAGS=-std=c++23" } + + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "gcc-7" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "gcc-7" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "gcc-7" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "gcc-7" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "gcc-8" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "gcc-8" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "gcc-8" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "gcc-8" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-9" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-9" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-9" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-9" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-10" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-10" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-10" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-10" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-11" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-11" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-11" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-11" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-12" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-12" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-12" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-12" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-13" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "gcc-13" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-13" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "gcc-13" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "clang-10", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x86" , cc: "clang-10", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "clang-10", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-20.04" , arch: "x64" , cc: "clang-10", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-11", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-11", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-11", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-11", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-12", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-12", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-12", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-12", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-13", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-13", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-13", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-13", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-14", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-14", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-14", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-14", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-15", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-15", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-15", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-15", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-16", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-16", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-16", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-16", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-17", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-17", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-17", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-17", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-18", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x86" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-18", conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "linux" , host: "ubuntu-22.04" , arch: "x64" , cc: "clang-18", conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-13" , arch: "x64" , cc: "gcc-14" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-13" , arch: "x64" , cc: "gcc-14" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-13" , arch: "x64" , cc: "clang" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-13" , arch: "x64" , cc: "clang" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-14" , arch: "arm64" , cc: "clang" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "macos" , host: "macos-14" , arch: "arm64" , cc: "clang" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2019" , arch: "x86" , cc: "vs2019" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2019" , arch: "x86" , cc: "vs2019" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2019" , arch: "x64" , cc: "vs2019" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2019" , arch: "x64" , cc: "vs2019" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2022" , arch: "x86" , cc: "vs2022" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2022" , arch: "x86" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Debug" , defs: "ASMJIT_TEST=1" } + - { title: "windows" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=1" } + + # Cross compiled, cannot run tests (Windows/ARM64). + - { title: "windows" , host: "windows-2022" , arch: "arm64" , cc: "vs2022" , conf: "Debug" , defs: "ASMJIT_TEST=0" } + - { title: "windows" , host: "windows-2022" , arch: "arm64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=0" } + + # Cross compiled, cannot run tests (Windows/UWP). + - { title: "windows/uwp" , host: "windows-2022" , arch: "x64" , cc: "vs2022" , conf: "Release", defs: "ASMJIT_TEST=0,CMAKE_SYSTEM_NAME=WindowsStore,CMAKE_SYSTEM_VERSION=10.0,CMAKE_CXX_FLAGS=-D_WIN32_WINNT=0x0A00" } + + - { title: "freebsd" , host: "ubuntu-latest" , arch: "x64" , cc: "clang" , conf: "Release", vm: "freebsd", vm_ver: "14.1", defs: "ASMJIT_TEST=1" } + - { title: "freebsd" , host: "ubuntu-latest" , arch: "arm64" , cc: "clang" , conf: "Release", vm: "freebsd", vm_ver: "14.1", defs: "ASMJIT_TEST=1" } + - { title: "netbsd" , host: "ubuntu-latest" , arch: "x64" , cc: "clang" , conf: "Release", vm: "netbsd" , vm_ver: "10.0", defs: "ASMJIT_TEST=1" } + - { title: "netbsd" , host: "ubuntu-latest" , arch: "arm64" , cc: "clang" , conf: "Release", vm: "netbsd" , vm_ver: "10.0", defs: "ASMJIT_TEST=1" } + - { title: "openbsd" , host: "ubuntu-latest" , arch: "x64" , cc: "clang" , conf: "Release", vm: "openbsd", vm_ver: "7.4" , defs: "ASMJIT_TEST=1" } + - { title: "openbsd" , host: "ubuntu-latest" , arch: "arm64" , cc: "clang" , conf: "Release", vm: "openbsd", vm_ver: "7.4" , defs: "ASMJIT_TEST=1" } + + - { title: "debian" , host: "ubuntu-latest" , arch: "arm/v7" , cc: "clang" , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" } + - { title: "debian" , host: "ubuntu-latest" , arch: "arm64" , cc: "clang" , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" } + - { title: "debian" , host: "ubuntu-latest" , arch: "riscv64", cc: "clang" , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" } + - { title: "debian" , host: "ubuntu-latest" , arch: "ppc64le", cc: "clang" , conf: "Release", vm: "debian:unstable", defs: "ASMJIT_TEST=1" } + + name: "${{matrix.title}}/${{matrix.arch}}, ${{matrix.cc}} ${{matrix.conf}}" + runs-on: "${{matrix.host}}" + + steps: + - name: "Checkout" + uses: actions/checkout@v4 + with: + path: "source" + + - name: "Checkout Build Actions" + uses: actions/checkout@v4 + with: + repository: build-actions/build-actions + path: "build-actions" + + - name: "Python" + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: QEMU + if: ${{matrix.vm && !matrix.vm_ver}} + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/${{matrix.arch}} + + - name: "Build & Test - Native" + if: ${{!matrix.vm}} + run: python build-actions/action.py + --source-dir=source + --config=source/.github/workflows/build-config.json + --compiler=${{matrix.cc}} + --diagnostics=${{matrix.diagnostics}} + --architecture=${{matrix.arch}} + --problem-matcher=auto + --build-type=${{matrix.conf}} + --build-defs=${{matrix.defs}} + + - name: "Build & Test - Cross Platform Actions" + if: ${{matrix.vm && matrix.vm_ver}} + uses: cross-platform-actions/action@master + with: + operating_system: ${{matrix.vm}} + architecture: ${{matrix.arch}} + version: ${{matrix.vm_ver}} + sync_files: "runner-to-vm" + shutdown_vm: false + shell: bash + run: | + set -e + + PATH="/usr/sbin:/usr/pkg/sbin:/usr/pkg/bin:$PATH:$(pwd)/build-actions" + CI_NETBSD_USE_PKGIN=1 + + export PATH + export CI_NETBSD_USE_PKGIN + + sh ./build-actions/prepare-environment.sh + python3 build-actions/action.py \ + --source-dir=source \ + --config=source/.github/workflows/build-config.json \ + --compiler=${{matrix.cc}} \ + --diagnostics=${{matrix.diagnostics}} \ + --architecture=${{matrix.arch}} \ + --problem-matcher=auto \ + --build-type=${{matrix.conf}} \ + --build-defs=${{matrix.defs}} + + - name: "Build & Test - Docker + QEMU" + if: ${{matrix.vm && !matrix.vm_ver}} + run: | + docker run \ + --rm \ + -v $(pwd):/${{github.workspace}} \ + -w ${{github.workspace}}/build-actions \ + --platform linux/${{matrix.arch}} \ + ${{matrix.vm}} \ + bash action.sh \ + --source-dir=../source \ + --config=../source/.github/workflows/build-config.json \ + --compiler=${{matrix.cc}} \ + --diagnostics=${{matrix.diagnostics}} \ + --architecture=${{matrix.arch}} \ + --problem-matcher=auto \ + --build-type=${{matrix.conf}} \ + --build-defs=${{matrix.defs}} diff --git a/deps/gsc-tool/.github/FUNDING.yml b/deps/gsc-tool/.github/FUNDING.yml new file mode 100644 index 0000000..5152afb --- /dev/null +++ b/deps/gsc-tool/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: xensik +patreon: xensik diff --git a/deps/gsc-tool/.github/workflows/main.yml b/deps/gsc-tool/.github/workflows/main.yml new file mode 100644 index 0000000..648fd33 --- /dev/null +++ b/deps/gsc-tool/.github/workflows/main.yml @@ -0,0 +1,278 @@ +name: Main + +on: + push: + branches: + - "**" + tags: + - '[0-9]+.[0-9]+.[0-9]+' + pull_request: + branches: + - "**" + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +env: + PREMAKE_VERSION: "5.0.0-beta2" + +jobs: + build-windows: + name: Build Windows + runs-on: windows-2022 + strategy: + fail-fast: false + matrix: + config: + - release + arch: + - x86 + - x64 + - arm64 + include: + - arch: x86 + platform: Win32 + - arch: x64 + platform: x64 + - arch: arm64 + platform: arm64 + steps: + - name: Check out files + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + lfs: false + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + - name: Add premake5 to PATH + uses: abel0b/setup-premake@v2.4 + with: + version: ${{ env.PREMAKE_VERSION }} + + - name: Generate project files + run: premake5 vs2022 + + - name: Set up problem matching + uses: ammaraskar/msvc-problem-matcher@master + + - name: Build ${{matrix.arch}} ${{matrix.config}} binaries + run: msbuild /m /v:minimal /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform}} build/gsc-tool.sln + + - name: Upload ${{matrix.arch}} ${{matrix.config}} binaries + uses: actions/upload-artifact@v4.3.3 + with: + name: windows-${{matrix.arch}}-${{matrix.config}} + path: | + build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool.exe + + build-macos: + name: Build macOS + runs-on: macos-13 + strategy: + fail-fast: false + matrix: + config: + - release + arch: + - x64 + - arm64 + steps: + - name: Check out files + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + lfs: false + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Install LLVM + run: brew install llvm + + - name: Add LLVM to PATH + run: | + echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH + + - name: Add premake5 to PATH + uses: abel0b/setup-premake@v2.4 + with: + version: ${{ env.PREMAKE_VERSION }} + + - name: Generate project files + run: premake5 gmake2 + + - name: Set up problem matching + uses: ammaraskar/gcc-problem-matcher@master + + - name: Build ${{matrix.arch}} ${{matrix.config}} binaries + run: | + pushd build + make config=${{matrix.config}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu) + + - name: Upload ${{matrix.arch}} ${{matrix.config}} binaries + uses: actions/upload-artifact@v4.3.3 + with: + name: macos-${{matrix.arch}}-${{matrix.config}} + path: | + build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool + + build-linux: + name: Build Linux + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + config: + - release + arch: + - x64 + # - arm64 + steps: + - name: Check out files + uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + lfs: false + + - name: Install LLVM + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 18 + + # - name: Install dependencies (arm64) + # if: matrix.arch == 'arm64' + # run: sudo apt-get install crossbuild-essential-arm64 -y + + - name: Add premake5 to PATH + uses: abel0b/setup-premake@v2.4 + with: + version: ${{ env.PREMAKE_VERSION }} + + - name: Generate project files + run: premake5 gmake2 + + - name: Set up problem matching + uses: ammaraskar/gcc-problem-matcher@master + + - name: Build ${{matrix.arch}} ${{matrix.config}} binaries + run: | + pushd build + make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc) + env: + CC: clang-18 + CXX: clang++-18 + + - name: Upload ${{matrix.arch}} ${{matrix.config}} binaries + uses: actions/upload-artifact@v4.3.3 + with: + name: linux-${{matrix.arch}}-${{matrix.config}} + path: | + build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool + + deploy: + name: Deploy Release + runs-on: ubuntu-latest + needs: [ build-windows, build-macos, build-linux ] + if: github.ref_type == 'tag' + steps: + - name: Checkout Source + uses: actions/checkout@v4 + with: + sparse-checkout: | + Dockerfile + README.md + sparse-checkout-cone-mode: false + + - name: Download Binaries + uses: actions/download-artifact@v4.1.7 + + - name: Compress Binaries + run: | + for dir in */; do + if [[ $dir == *"windows"* ]]; then + cd "$dir" && zip -r "../${dir%/}.zip" . && cd .. + else + tar -czvf "${dir%/}.tar.gz" -C "$dir" . + fi + done + shell: bash + + - name: Create Release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + draft: true + files: | + *.zip + *.tar.gz + + # - name: Setup Cosign + # if: github.event_name != 'pull_request' + # uses: sigstore/cosign-installer@v3.1.1 + # with: + # cosign-release: 'v2.1.1' + + # - name: Setup QEMU + # uses: docker/setup-qemu-action@v3.0.0 + # with: + # platforms: linux/amd64,linux/arm64 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3.0.0 + + - name: Login to DockerHub + uses: docker/login-action@v3.0.0 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - id: meta + uses: docker/metadata-action@v5.4.0 + with: + images: | + xensik/gsc-tool + ghcr.io/xensik/gsc-tool + tags: | + ${{ github.ref_name }} + latest + + - name: Build and Push Docker Image + id: build-and-push + uses: docker/build-push-action@v5.1.0 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Update DockerHub Information + uses: peter-evans/dockerhub-description@v4 + with: + repository: xensik/gsc-tool + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # - name: Sign the published Docker image + # env: + # TAGS: ${{ steps.meta.outputs.tags }} + # DIGEST: ${{ steps.build-and-push.outputs.digest }} + # run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} diff --git a/deps/gsc-tool/deps/zlib/.github/workflows/cmake.yml b/deps/gsc-tool/deps/zlib/.github/workflows/cmake.yml new file mode 100644 index 0000000..d15fda8 --- /dev/null +++ b/deps/gsc-tool/deps/zlib/.github/workflows/cmake.yml @@ -0,0 +1,89 @@ +name: CMake +on: [push, pull_request] +jobs: + ci-cmake: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu GCC + os: ubuntu-latest + compiler: gcc + + # Test out of source builds + - name: Ubuntu GCC OSB + os: ubuntu-latest + compiler: gcc + build-dir: ../build + src-dir: ../zlib + + - name: Ubuntu GCC -O3 + os: ubuntu-latest + compiler: gcc + cflags: -O3 + + - name: Ubuntu Clang + os: ubuntu-latest + compiler: clang + + - name: Ubuntu Clang Debug + os: ubuntu-latest + compiler: clang + build-config: Debug + + - name: Windows MSVC Win32 + os: windows-latest + compiler: cl + cmake-args: -A Win32 + + - name: Windows MSVC Win64 + os: windows-latest + compiler: cl + cmake-args: -A x64 + + - name: Windows GCC + os: windows-latest + compiler: gcc + cmake-args: -G Ninja + + - name: macOS Clang + os: macos-latest + compiler: clang + + - name: macOS GCC + os: macos-latest + compiler: gcc-11 + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install packages (Windows) + if: runner.os == 'Windows' + run: | + choco install --no-progress ninja ${{ matrix.packages }} + + - name: Generate project files + run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: ${{ matrix.cflags }} + + - name: Compile source code + run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} + + - name: Run test cases + run: ctest -C Release --output-on-failure --max-width 120 + working-directory: ${{ matrix.build-dir || '.' }} + + - name: Upload build errors + uses: actions/upload-artifact@v3 + if: failure() + with: + name: ${{ matrix.name }} (cmake) + path: | + **/CMakeFiles/CMakeOutput.log + **/CMakeFiles/CMakeError.log + retention-days: 7 diff --git a/deps/gsc-tool/deps/zlib/.github/workflows/configure.yml b/deps/gsc-tool/deps/zlib/.github/workflows/configure.yml new file mode 100644 index 0000000..e783921 --- /dev/null +++ b/deps/gsc-tool/deps/zlib/.github/workflows/configure.yml @@ -0,0 +1,136 @@ +name: Configure +on: [push, pull_request] +jobs: + ci-configure: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu GCC + os: ubuntu-latest + compiler: gcc + configure-args: --warn + + # Test out of source builds + - name: Ubuntu GCC OSB + os: ubuntu-latest + compiler: gcc + configure-args: --warn + build-dir: ../build + src-dir: ../zlib + + - name: Ubuntu GCC ARM SF + os: ubuntu-latest + compiler: arm-linux-gnueabi-gcc + configure-args: --warn + chost: arm-linux-gnueabi + packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross + qemu-run: qemu-arm -L /usr/arm-linux-gnueabi + + - name: Ubuntu GCC ARM HF + os: ubuntu-latest + compiler: arm-linux-gnueabihf-gcc + configure-args: --warn + chost: arm-linux-gnueabihf + packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armhf-cross + qemu-run: qemu-arm -L /usr/arm-linux-gnueabihf + + - name: Ubuntu GCC AARCH64 + os: ubuntu-latest + compiler: aarch64-linux-gnu-gcc + configure-args: --warn + chost: aarch64-linux-gnu + packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross + qemu-run: qemu-aarch64 -L /usr/aarch64-linux-gnu + + - name: Ubuntu GCC PPC + os: ubuntu-latest + compiler: powerpc-linux-gnu-gcc + configure-args: --warn --static + chost: powerpc-linux-gnu + packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross + qemu-run: qemu-ppc -L /usr/powerpc-linux-gnu + cflags: -static + ldflags: -static + + - name: Ubuntu GCC PPC64 + os: ubuntu-latest + compiler: powerpc64-linux-gnu-gcc + configure-args: --warn --static + chost: powerpc-linux-gnu + packages: qemu qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross + qemu-run: qemu-ppc64 -L /usr/powerpc64-linux-gnu + cflags: -static + ldflags: -static + + - name: Ubuntu GCC PPC64LE + os: ubuntu-latest + compiler: powerpc64le-linux-gnu-gcc + configure-args: --warn + chost: powerpc64le-linux-gnu + packages: qemu qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross + qemu-run: qemu-ppc64le -L /usr/powerpc64le-linux-gnu + + - name: Ubuntu GCC S390X + os: ubuntu-latest + compiler: s390x-linux-gnu-gcc + configure-args: --warn --static + chost: s390x-linux-gnu + packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross + qemu-run: qemu-s390x -L /usr/s390x-linux-gnu + cflags: -static + ldflags: -static + + - name: macOS GCC + os: macos-latest + compiler: gcc-11 + configure-args: --warn + + - name: macOS Clang + os: macos-latest + compiler: clang + configure-args: --warn + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install packages (Ubuntu) + if: runner.os == 'Linux' && matrix.packages + run: | + sudo apt-get update + sudo apt-get install -y ${{ matrix.packages }} + + - name: Generate project files + run: | + [ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }} + cd ${{ matrix.build-dir || '.' }} + ${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: ${{ matrix.cflags }} + LDFLAGS: ${{ matrix.ldflags }} + CHOST: ${{ matrix.chost }} + + - name: Compile source code + run: make -j2 + working-directory: ${{ matrix.build-dir }} + + - name: Run test cases + run: | + make test + make cover + working-directory: ${{ matrix.build-dir }} + env: + QEMU_RUN: ${{ matrix.qemu-run }} + + - name: Upload build errors + uses: actions/upload-artifact@v3 + if: failure() + with: + name: ${{ matrix.name }} (configure) + path: | + ${{ matrix.build-dir || '.' }}/configure.log + retention-days: 7 diff --git a/deps/gsc-tool/deps/zlib/.github/workflows/fuzz.yml b/deps/gsc-tool/deps/zlib/.github/workflows/fuzz.yml new file mode 100644 index 0000000..48cd2b9 --- /dev/null +++ b/deps/gsc-tool/deps/zlib/.github/workflows/fuzz.yml @@ -0,0 +1,25 @@ +name: OSS-Fuzz +on: [pull_request] +jobs: + Fuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'zlib' + dry-run: false + + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'zlib' + fuzz-seconds: 300 + dry-run: false + + - name: Upload Crash + uses: actions/upload-artifact@v3 + if: failure() + with: + name: artifacts + path: ./out/artifacts diff --git a/deps/libtomcrypt/.github/ISSUE_TEMPLATE.md b/deps/libtomcrypt/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..e7c66af --- /dev/null +++ b/deps/libtomcrypt/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,30 @@ + + +### Prerequisites + +* [ ] Checked the developer manual +* [ ] Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=repo%3Alibtom%2Flibtomcrypt +* [ ] Checked that your issue isn't due to the fact that you're using asymmetric cryptography and you forgot linking in and/or setting an MPI provider (usually this causes either random crashes or runtime errors like `LTC_ARGCHK 'ltc_mp.name != NULL' failure ...`). c.f. Ch. "Math Descriptors" of the developer manual. +* [ ] Checked that your issue isn't related to TomsFastMath's limitation that PK operations can by default only be done with max. 2048bit keys + +### Description + +[Description of the issue] + +### Steps to Reproduce + + +### Version + +You can get this information from the define `SCRYPT` in `src/include/tomcrypt.h` or your local git repository by running `git describe --always --tags --dirty`. +Also, please include the compiler, the compiler version, the architecture and (if applicable) the MPI provider, the OS and what version of the OS you're experiencing the issue. + +### Additional Information + +Any additional information, configuration or data that might be necessary to reproduce the issue. diff --git a/deps/libtomcrypt/.github/PULL_REQUEST_TEMPLATE.md b/deps/libtomcrypt/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8cd4614 --- /dev/null +++ b/deps/libtomcrypt/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ + + +### Checklist + + +* [ ] documentation is added or updated +* [ ] tests are added or updated diff --git a/deps/libtomcrypt/.github/workflows/main.yml b/deps/libtomcrypt/.github/workflows/main.yml new file mode 100644 index 0000000..1cf648d --- /dev/null +++ b/deps/libtomcrypt/.github/workflows/main.yml @@ -0,0 +1,100 @@ +name: CI + +on: + push: + branches: + - master + - develop + - /^release\/.*$/ + pull_request: + branches: + - master + - develop + - /^release\/.*$/ + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + Docs: + runs-on: ubuntu-20.04 + container: texlive/texlive:latest-medium + steps: + - uses: actions/checkout@v4 + - name: generate PDF + run: | + make docs + cp doc/crypt.pdf crypt-${{ github.run_id }}.pdf + - name: upload PDF + uses: actions/upload-artifact@v4 + with: + name: crypt-${{ github.run_id }}.pdf + path: crypt-${{ github.run_id }}.pdf + Build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + cc: [ gcc, clang ] + os: [ ubuntu-20.04, ubuntu-22.04 ] + config: + - { BUILDNAME: 'META_BUILDS', BUILDOPTIONS: '-DGMP_DESC', BUILDSCRIPT: '.ci/meta_builds.sh' } + - { BUILDNAME: 'VALGRIND', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/valgrind.sh' } + - { BUILDNAME: 'STOCK', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK-MPI', BUILDOPTIONS: '-ULTM_DESC -UTFM_DESC -UUSE_LTM -UUSE_TFM', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK+AESNI', BUILDOPTIONS: '-DLTC_AES_NI', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'EASY', BUILDOPTIONS: '-DLTC_EASY', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'SMALL', BUILDOPTIONS: '-DLTC_SMALL_CODE', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'NO_TABLES', BUILDOPTIONS: '-DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'NO_FAST', BUILDOPTIONS: '-DLTC_NO_FAST', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'NO_FAST+SMALL+NO_TABLES', BUILDOPTIONS: '-DLTC_NO_FAST -DLTC_SMALL_CODE -DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'NO_ASM', BUILDOPTIONS: '-DLTC_NO_ASM', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'NO_TIMING_RESISTANCE', BUILDOPTIONS: '-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'FORTUNA_CUSTOM_OPTIONS', BUILDOPTIONS: '-DLTC_FORTUNA_USE_ENCRYPT_ONLY -DLTC_FORTUNA_RESEED_RATELIMIT_STATIC', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'PTHREAD', BUILDOPTIONS: '-DLTC_PTHREAD', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK+ARGTYPE=1', BUILDOPTIONS: '-DARGTYPE=1', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK+ARGTYPE=2', BUILDOPTIONS: '-DARGTYPE=2', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK+ARGTYPE=3', BUILDOPTIONS: '-DARGTYPE=3', BUILDSCRIPT: '.ci/run.sh' } + - { BUILDNAME: 'STOCK+ARGTYPE=4', BUILDOPTIONS: '-DARGTYPE=4', BUILDSCRIPT: '.ci/run.sh' } + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y libgmp-dev valgrind libtool-bin clang-tools lcov ruby clang + sudo apt-get remove -y libtommath1 + sudo gem install coveralls-lcov + curl -s https://packagecloud.io/install/repositories/libtom/packages/script.deb.sh | sudo bash + sudo apt-get install libtfm-git-dev libtommath-git-dev + - name: run tests + env: + CC: "${{ matrix.cc }}" + PR_NUMBER: ${{ github.event.number }} + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_LTM -DLTM_DESC" "makefile V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltommath" + bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_TFM -DTFM_DESC" "makefile.shared V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltfm" + - name: regular logs + if: ${{ !failure() }} + run: | + cat gcc_1.txt || true + cat gcc_2.txt || true + - name: error logs + if: ${{ failure() }} + run: | + cat gcc_1.txt || true + cat gcc_2.txt || true + cat test_std.txt || true + cat test_err.txt || true + cat tv.txt || true + - name: pack build directory + if: ${{ failure() }} + run: | + tar cJf build-${{ github.run_id }}.tar.xz --exclude ./build-${{ github.run_id }}.tar.xz . + - name: upload Artifact + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: build-${{ github.run_id }}.tar.xz + path: build-${{ github.run_id }}.tar.xz + retention-days: 1 diff --git a/deps/libtommath/.github/workflows/deploy.yml b/deps/libtommath/.github/workflows/deploy.yml new file mode 100644 index 0000000..a06ac73 --- /dev/null +++ b/deps/libtommath/.github/workflows/deploy.yml @@ -0,0 +1,47 @@ +############################################################################# +# # +# Packagecloud deployment via GH actions for LibTomMath # +# (https://github.com/libtom/libtommath.git) # +# # +############################################################################# + +name: Deploy + +on: + workflow_dispatch + +jobs: + deploy-to-packagecloud: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-20.04, ubuntu-22.04 ] + steps: + - uses: actions/checkout@v2 + - name: set Ubuntu codename + run: | + echo "ubuntu_codename="$(lsb_release -sc) >> "$GITHUB_ENV" + - name: install dependencies + run: | + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null + echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${{ env.ubuntu_codename }} main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null + sudo apt-get update -qq + sudo apt-get install -y cmake gcc + - name: build packages + run: | + mkdir -p build + cd build + cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" .. + make -j$(nproc) + cpack -G DEB + cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="/usr" .. + make -j$(nproc) + cpack -G DEB + - name: push deb packages to packagecloud.io + uses: computology/packagecloud-github-action@v0.6 + with: + PACKAGE-NAME: build/packages/ubuntu/${{ env.ubuntu_codename }}/*.deb + PACKAGECLOUD-USERNAME: libtom + PACKAGECLOUD-REPONAME: packages + PACKAGECLOUD-DISTRO: ubuntu/${{ env.ubuntu_codename }} + PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} diff --git a/deps/libtommath/.github/workflows/main.yml b/deps/libtommath/.github/workflows/main.yml new file mode 100644 index 0000000..18a832b --- /dev/null +++ b/deps/libtommath/.github/workflows/main.yml @@ -0,0 +1,222 @@ +############################################################################# +# # +# GitHub Actions test-suite for LibTomMath # +# (https://github.com/libtom/libtommath.git) # +# # +############################################################################# + +name: CI + +# Tests restricted to the following branches of LTM. +on: + push: + branches: + - master + - develop + - /^release\/.*$/ + - /^support\/.*$/ + - /^ci\/.*$/ + pull_request: + branches: + - master + - develop + - /^release\/.*$/ + - /^support\/.*$/ + - /^ci\/.*$/ + +jobs: + Docs: + runs-on: ubuntu-20.04 + container: texlive/texlive:latest-full + steps: + - uses: actions/checkout@v3 + - name: generate PDF + run: | + make docs V=1 + cp doc/bn.pdf bn-${{ github.run_id }}.pdf + - name: upload PDF + uses: actions/upload-artifact@v3 + with: + name: bn-${{ github.run_id }}.pdf + path: bn-${{ github.run_id }}.pdf + Testme: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-20.04 ] + # The environment given to the programs in the build + # We have only one program and the variable $BUILDOPTIONS + # has only the options to that program: testme.sh + + config: + # Check c89 <-> c99 roundtrip + - { BUILDOPTIONS: '--c89-c99-roundtrip', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + # Check source code format + - { BUILDOPTIONS: '--format', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'astyle' } + # Check public symbols of dynamic libraries + - { BUILDOPTIONS: '--symbols', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libtool-bin' } + # Run always with valgrind (no sanitizer, but debug info) + - { BUILDOPTIONS: '--with-cc=gcc --with-m64 --with-valgrind', SANITIZER: '', COMPILE_DEBUG: '1', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + # Alternative big-int version of mp_log(_n) + - { BUILDOPTIONS: '--with-cc=gcc --with-m64 --cflags=-DS_MP_WORD_TOO_SMALL_C="" --with-valgrind', SANITIZER: '', COMPILE_DEBUG: '1', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + # Shared library build + - { BUILDOPTIONS: '--with-cc=gcc --make-option=-f --make-option=makefile.shared', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '1', CONV_WARNINGS: '', OTHERDEPS: 'libtool-bin' } + # GCC for the 32-bit architecture (no valgrind) + - { BUILDOPTIONS: '--with-cc=gcc --with-m32', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' } + # Alternative big-int version of mp_log(_n) for the 32-bit architecture (no valgrind) + - { BUILDOPTIONS: '--with-cc=gcc --with-m32 --cflags=-DS_MP_WORD_TOO_SMALL_C="" ', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' } + # clang for the 32-bit architecture (no valgrind) + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m32', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 gcc-multilib' } + # RSA superclass with tests (no sanitizer, but debug info) + - { BUILDOPTIONS: '--with-cc=gcc --with-m64 --cflags=-DLTM_NOTHING --cflags=-DSC_RSA_1_WITH_TESTS --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '1', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + + # Build with small stack-size + - { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-multilib' } + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 libc6-dev-i386 gcc-multilib' } + - { BUILDOPTIONS: '--with-cc=gcc --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-i386 gcc-multilib' } + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m32 --with-m64 --cflags=-DMP_SMALL_STACK_SIZE --multithread', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10 gcc-multilib' } + + # Test "autotuning", the automatic evaluation and setting of the Toom-Cook cut-offs. + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_16BIT --limit-valgrind --make-option=tune' + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_32BIT --limit-valgrind --make-option=tune' + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --limit-valgrind --make-option=tune' + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_16BIT --limit-valgrind --make-option=tune' + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_32BIT --limit-valgrind --make-option=tune' + - { BUILDOPTIONS: '--with-cc=clang-10 --limit-valgrind --make-option=tune', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' } + + # GCC for the x86-64 architecture testing against a different Bigint-implementation + # with 333333 different inputs. + #- env: BUILDOPTIONS='--with-cc=gcc --test-vs-mtest=333333 --limit-valgrind' + # ... and a better random source. + - { BUILDOPTIONS: '--with-cc=gcc --test-vs-mtest=333333 --mtest-real-rand --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + + # clang for the x86-64 architecture testing against a different Bigint-implementation + # with 333333 different inputs + - { BUILDOPTIONS: '--with-cc=clang-10 --test-vs-mtest=333333 --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' } + # ... and a better random source. + - { BUILDOPTIONS: '--with-cc=clang-10 --test-vs-mtest=333333 --mtest-real-rand --limit-valgrind', SANITIZER: '', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' } + + # GCC for the x64_32 architecture (32-bit longs and 32-bit pointers) + # TODO: Probably not possible to run anything in x32 in GH actions + # but needs to be checked to be sure. + - { BUILDOPTIONS: '--with-cc=gcc --with-mx32', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'libc6-dev-x32 gcc-multilib' } + + # GCC for the x86-64 architecture (64-bit longs and 64-bit pointers) + - { BUILDOPTIONS: '--with-cc=gcc --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + - { BUILDOPTIONS: '--with-cc=gcc-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-10' } + - { BUILDOPTIONS: '--with-cc=gcc-8 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-8' } + - { BUILDOPTIONS: '--with-cc=gcc-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'gcc-7' } + + # clang for x86-64 architecture (64-bit longs and 64-bit pointers) + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'relaxed', OTHERDEPS: 'clang-10 llvm-10' } + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' } + - { BUILDOPTIONS: '--with-cc=clang-10 --cflags=-DMP_USE_MEMOPS --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' } + - { BUILDOPTIONS: '--with-cc=clang-10 --c89 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: 'strict', OTHERDEPS: 'clang-10 llvm-10' } + - { BUILDOPTIONS: '--with-cc=clang-10 --with-m64 --limit-valgrind --cflags=-DMP_PREC=MP_MIN_PREC', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-10 llvm-10' } + - { BUILDOPTIONS: '--with-cc=clang-12 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-12 llvm-12' } + - { BUILDOPTIONS: '--with-cc=clang-9 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-9 llvm-9' } + - { BUILDOPTIONS: '--with-cc=clang-8 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-8 llvm-8' } + - { BUILDOPTIONS: '--with-cc=clang-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-7 llvm-7' } + - { BUILDOPTIONS: '--with-cc=clang-6.0 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang-6.0 llvm-6.0' } + # Link time optimization + - { BUILDOPTIONS: '--with-cc=gcc --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '1', CONV_WARNINGS: '', OTHERDEPS: '' } + #- { BUILDOPTIONS: '--with-cc=clang-7 --with-m64 --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '1', CONV_WARNINGS: '', OTHERDEPS: '' } + + # GCC for the x86-64 architecture with restricted limb sizes + # formerly started with the option "--with-low-mp" to testme.sh + # but testing all three in one run took to long and timed out. + - { BUILDOPTIONS: '--with-cc=gcc --cflags=-DMP_16BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + - { BUILDOPTIONS: '--with-cc=gcc --cflags=-DMP_32BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + # Alternative big-int version of mp_log(_n) + - { BUILDOPTIONS: '--with-cc=gcc --cflags=-DMP_16BIT --cflags=-DS_MP_WORD_TOO_SMALL_C="" --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + - { BUILDOPTIONS: '--with-cc=gcc --cflags=-DMP_32BIT --cflags=-DS_MP_WORD_TOO_SMALL_C="" --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: '' } + + # clang for the x86-64 architecture with restricted limb sizes + - { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_16BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' } + - { BUILDOPTIONS: '--with-cc=clang --cflags=-DMP_32BIT --limit-valgrind', SANITIZER: '1', COMPILE_DEBUG: '0', COMPILE_LTO: '0', CONV_WARNINGS: '', OTHERDEPS: 'clang llvm' } + steps: + - uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y valgrind ${{ matrix.config.OTHERDEPS }} + sudo apt-cache search gcc | grep '^gcc-[0-9\.]* ' + sudo apt-cache search clang | grep compiler + - name: run tests + env: + SANITIZER: ${{ matrix.config.SANITIZER }} + COMPILE_DEBUG: ${{ matrix.config.COMPILE_DEBUG }} + COMPILE_LTO: ${{ matrix.config.COMPILE_LTO }} + CONV_WARNINGS: ${{ matrix.config.CONV_WARNINGS }} + COMMIT_MESSAGE: ${{ github.event.commits[0].message }} + PR_NUMBER: ${{ github.event.number }} + # The actual script the jobs run. + run: | + ./testme.sh ${{ matrix.config.BUILDOPTIONS }} + # In case of a CI error a success might get signaled + # even without any test run. This file also keeps any notes + # printed from the tests which might come handy from time + # to time. + # Valgrid will print its output to stderr which will not show up + # in test_*.log. testme.sh accepts one additional option to + # valgrind and "--valgrind-options=--log-fd=1" sends the output + # of Valgrind to stdout instead. + - name: regular logs + if: ${{ !failure() }} + run: | + cat test_*.log || true + # Compilation failures are in gcc_errors_*.log + # Failed tests in test_*.log + # Files do not exist in case of success + - name: error logs + if: ${{ failure() }} + run: | + cat test_*.log || true + cat valgrind_test.log || true + cat gcc_errors_*.log || true + + amalgam: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: install dependencies + run: | + make amalgamated_timing + + CMake: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-20.04, ubuntu-22.04 ] + build_type: [ '', -DCMAKE_BUILD_TYPE=Debug, -DCMAKE_BUILD_TYPE=Release, -DCMAKE_BUILD_TYPE=RelWithDebInfo, -DCMAKE_BUILD_TYPE=MinSizeRel ] + cc: [ clang, gcc ] + config: + # Static library build + - { CMAKEOPTIONS: '-DBUILD_SHARED_LIBS=Off' } + # Shared library build + - { CMAKEOPTIONS: '-DBUILD_SHARED_LIBS=On' } + steps: + - uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt-get update -qq + sudo apt-get install -y cmake gcc clang llvm + - name: build + run: | + mkdir build + cd build + CC=${{ matrix.cc }} cmake ${{ matrix.config.CMAKEOPTIONS }} ${{ matrix.build_type }} .. + make -j$(nproc) + - name: test + run: | + cd build + CC=${{ matrix.cc }} cmake ${{ matrix.config.CMAKEOPTIONS }} ${{ matrix.build_type }} -DBUILD_TESTING=On .. + make -j$(nproc) + ctest + - name: test (in demo folder) + run: | + mkdir -p demo/build + cd demo/build + CC=${{ matrix.cc }} cmake ${{ matrix.config.CMAKEOPTIONS }} ${{ matrix.build_type }} .. + make -j$(nproc) + ctest diff --git a/deps/protobuf/.github/ISSUE_TEMPLATE/bug_report.md b/deps/protobuf/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..c5d4e28 --- /dev/null +++ b/deps/protobuf/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,39 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + + + +**What version of protobuf and what language are you using?** +Version: master/v3.6.0/v3.5.0 etc. +Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript + +**What operating system (Linux, Windows, ...) and version?** + +**What runtime / compiler are you using (e.g., python version or gcc version)** + +**What did you do?** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**What did you expect to see** + +**What did you see instead?** + +Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). + +**Anything else we should know about your project / environment** diff --git a/deps/protobuf/.github/ISSUE_TEMPLATE/feature_request.md b/deps/protobuf/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..28b9bc9 --- /dev/null +++ b/deps/protobuf/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,28 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + + + + +**What language does this apply to?** +If it's a proto syntax change, is it for proto2 or proto3? +If it's about generated code change, what programming language? + +**Describe the problem you are trying to solve.** + +**Describe the solution you'd like** + +**Describe alternatives you've considered** + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/deps/protobuf/.github/mergeable.yml b/deps/protobuf/.github/mergeable.yml new file mode 100644 index 0000000..1768852 --- /dev/null +++ b/deps/protobuf/.github/mergeable.yml @@ -0,0 +1,18 @@ +mergeable: + pull_requests: + label: + and: + - must_exclude: + regex: '^disposition/DO NOT MERGE' + message: 'Pull request marked not mergeable' + - or: + - and: + - must_include: + regex: 'release notes: yes' + message: 'Include release notes: yes' + - must_include: + regex: '^(autotools|bazel|c#|c\+\+|cleanup|cmake|conformance tests|integration|go|java|javascript|objective-c|php|protoc|python|ruby|kotlin)' + message: 'at least a language label (e.g., c++, java, python). Or apply one of the following labels: autotools, bazel, cmake, cleanup, conformance tests, integration, protoc.' + - must_include: + regex: 'release notes: no' + message: 'Include release notes: no' diff --git a/deps/protobuf/.github/workflows/codespell.yml b/deps/protobuf/.github/workflows/codespell.yml new file mode 100644 index 0000000..b76b057 --- /dev/null +++ b/deps/protobuf/.github/workflows/codespell.yml @@ -0,0 +1,16 @@ +# GitHub Action to automate the identification of common misspellings in text files. +# https://github.com/codespell-project/actions-codespell +# https://github.com/codespell-project/codespell +name: codespell +on: [push, pull_request] +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: codespell-project/actions-codespell@master + with: + check_filenames: true + skip: ./.git,./conformance/third_party,*.snk,*.pb,*.pb.cc,*.pb.h,./src/google/protobuf/testdata,./objectivec/Tests,./python/compatibility_tests/v2.5.0/tests/google/protobuf/internal,./.github/workflows/codespell.yml + ignore_words_list: "alow,alse,ba,cleare,copyable,cloneable,dedup,dur,errorprone,falsy,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',ro,te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,sur" diff --git a/deps/protobuf/.github/workflows/php-ext.yml b/deps/protobuf/.github/workflows/php-ext.yml new file mode 100644 index 0000000..f24f6bf --- /dev/null +++ b/deps/protobuf/.github/workflows/php-ext.yml @@ -0,0 +1,43 @@ +name: PHP extension + +on: + - push + - pull_request + +jobs: + build-php: + name: Build PHP extension + runs-on: ubuntu-latest + container: ${{ matrix.php-image }} + strategy: + matrix: + php-image: + - php:7.4-cli + - php:8.1-cli + steps: + - name: Install git + run: | + apt-get update -q + apt-get install -qy --no-install-recommends git + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Prepare source code + run: | + rm -rf "$GITHUB_WORKSPACE/php/ext/google/protobuf/third_party" + cp -r "$GITHUB_WORKSPACE/third_party" "$GITHUB_WORKSPACE/php/ext/google/protobuf" + cp "$GITHUB_WORKSPACE/LICENSE" "$GITHUB_WORKSPACE/php/ext/google/protobuf" + - name: Create package + run: | + cd /tmp + rm -rf protobuf-*.tgz + pecl package "$GITHUB_WORKSPACE/php/ext/google/protobuf/package.xml" + - name: Compile extension + run: | + cd /tmp + MAKE="make -j$(nproc)" pecl install protobuf-*.tgz + - name: Enable extension + run: docker-php-ext-enable protobuf + - name: Inspect extension + run: php --ri protobuf diff --git a/deps/zlib/.github/workflows/c-std.yml b/deps/zlib/.github/workflows/c-std.yml new file mode 100644 index 0000000..44417bf --- /dev/null +++ b/deps/zlib/.github/workflows/c-std.yml @@ -0,0 +1,208 @@ +name: C Standard + +# Compile with as many C standards as possible. +# The worflow is setup to fail on any compilation warnings. + +on: + workflow_dispatch: + push: + pull_request: + +jobs: + + main: + name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }} + runs-on: ${{ matrix.os.value }} + strategy: + fail-fast: false + matrix: + os: + - name: Linux + value: ubuntu-latest + + - name: MacOS + value: macos-latest + + - name: Windows + value: windows-latest + cmake-opt: -G Ninja + + compiler: + - gcc + - clang + + arch: + - name: 64-bit + tag: amd64 + compiler-opt: -m64 + cmake-opt: -A x64 + + - name: 32-bit + tag: i386 + compiler-opt: -m32 + cmake-opt: -A Win32 + + + builder: + - configure + - cmake + + std: + - name: c89 + value: c89 + + - name: gnu89 + value: gnu89 + + - name: c94 + value: iso9899:199409 + + - name: c99 + value: c99 + + - name: gnu99 + value: gnu99 + + - name: c11 + value: c11 + + - name: gnu11 + value: gnu11 + + - name: c17 + value: c17 + + - name: gnu17 + value: gnu17 + + - name: c2x + value: c2x + + - name: gnu2x + value: gnu2x + + exclude: + # Don't run 32-bit on MacOS + - { os: { name: MacOS }, + arch: { tag: i386 } } + + # Don't run configure on Windows + - { os: { name: Windows }, + builder: configure } + + # Don't run gcc 32-bit on Windows + - { os: { name: Windows }, + arch: { tag: i386 } } + + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + show-progress: 'false' + + - name: Install packages (Linux) + if: runner.os == 'Linux' && matrix.arch.tag == 'i386' + run: | + sudo apt-get update + sudo apt install gcc-multilib libc6-dev-i386-cross + + - name: Install packages (Windows) + if: runner.os == 'Windows' + run: | + choco install --no-progress ninja + + - name: Generate project files (configure) + if: matrix.builder == 'configure' + run: | + ./configure + env: + CC: ${{ matrix.compiler }} + CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra + + - name: Compile source code (configure) + if: matrix.builder == 'configure' + run: make -j2 + + - name: Run test cases (configure) + if: matrix.builder == 'configure' + run: | + make test + make cover + + - name: Generate project files (cmake) + if: matrix.builder == 'cmake' + run: | + cmake -S . -B . -D CMAKE_BUILD_TYPE=Release -D ZLIB_BUILD_EXAMPLES=OFF ${{ matrix.os.cmake-opt }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: -std=${{ matrix.std.value }} ${{ matrix.arch.compiler-opt }} -Werror -Wall -Wextra + + - name: Compile source code (cmake) + if: matrix.builder == 'cmake' + run: cmake --build . --config Release + + - name: Run test cases (cmake) + if: matrix.builder == 'cmake' + run: ctest -C Release --output-on-failure --max-width 120 + + + msvc: + name: ${{ matrix.os.name }} ${{ matrix.compiler }} ${{ matrix.arch.name }} ${{ matrix.std.name }} ${{ matrix.builder }} + runs-on: ${{ matrix.os.value }} + strategy: + fail-fast: false + matrix: + os: + - name: Windows + value: windows-latest + + compiler: + - cl + + arch: + - name: 32-bit + value: -A Win32 + + - name: 64-bit + value: -A x64 + + builder: + - cmake + + std: + - name: default + value: "" + + - name: C11 + value: /std:c11 + + - name: C17 + value: /std:c17 + + # not available on the runner yet + # - name: C20 + # value: /std:c20 + + - name: latest + value: /std:clatest + + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + show-progress: 'false' + + - name: Generate project files (cmake) + run: | + cmake -S . -B . ${{ matrix.arch.value }} -D CMAKE_BUILD_TYPE=Release + env: + CC: ${{ matrix.compiler }} + CFLAGS: /WX ${{ matrix.std.value }} + + - name: Compile source code (cmake) + run: cmake --build . --config Release -v + + - name: Run test cases (cmake) + run: ctest -C Release --output-on-failure --max-width 120 \ No newline at end of file diff --git a/deps/zlib/.github/workflows/cmake.yml b/deps/zlib/.github/workflows/cmake.yml new file mode 100644 index 0000000..36fb249 --- /dev/null +++ b/deps/zlib/.github/workflows/cmake.yml @@ -0,0 +1,98 @@ +name: CMake +on: [push, pull_request] +jobs: + ci-cmake: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu GCC + os: ubuntu-latest + compiler: gcc + cflags: -Werror -Wall -Wextra + + # Test out of source builds + - name: Ubuntu GCC OSB + os: ubuntu-latest + compiler: gcc + cflags: -Werror -Wall -Wextra + build-dir: ../build + src-dir: ../zlib + + - name: Ubuntu GCC -O3 + os: ubuntu-latest + compiler: gcc + cflags: -O3 -Werror -Wall -Wextra + + - name: Ubuntu Clang + os: ubuntu-latest + compiler: clang + cflags: -Werror -Wall -Wextra + + - name: Ubuntu Clang Debug + os: ubuntu-latest + compiler: clang + cflags: -Werror -Wall -Wextra + build-config: Debug + + - name: Windows MSVC Win32 + os: windows-latest + compiler: cl + cflags: /WX /W3 + cmake-args: -A Win32 + + - name: Windows MSVC Win64 + os: windows-latest + compiler: cl + cflags: /WX /W3 + cmake-args: -A x64 + + - name: Windows GCC + os: windows-latest + compiler: gcc + cflags: -Werror -Wall -Wextra + cmake-args: -G Ninja + + - name: macOS Clang + os: macos-latest + compiler: clang + cflags: -Werror -Wall -Wextra + + - name: macOS GCC + os: macos-latest + compiler: gcc-12 + cflags: -Werror -Wall -Wextra + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install packages (Windows) + if: runner.os == 'Windows' + run: | + choco install --no-progress ninja ${{ matrix.packages }} + + - name: Generate project files + run: cmake -S ${{ matrix.src-dir || '.' }} -B ${{ matrix.build-dir || '.' }} ${{ matrix.cmake-args }} -D CMAKE_BUILD_TYPE=${{ matrix.build-config || 'Release' }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: ${{ matrix.cflags }} + + - name: Compile source code + run: cmake --build ${{ matrix.build-dir || '.' }} --config ${{ matrix.build-config || 'Release' }} + + - name: Run test cases + run: ctest -C Release --output-on-failure --max-width 120 + working-directory: ${{ matrix.build-dir || '.' }} + + - name: Upload build errors + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.name }} (cmake) + path: | + **/CMakeFiles/CMakeOutput.log + **/CMakeFiles/CMakeError.log + retention-days: 7 diff --git a/deps/zlib/.github/workflows/configure.yml b/deps/zlib/.github/workflows/configure.yml new file mode 100644 index 0000000..7789095 --- /dev/null +++ b/deps/zlib/.github/workflows/configure.yml @@ -0,0 +1,136 @@ +name: Configure +on: [push, pull_request] +jobs: + ci-configure: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: Ubuntu GCC + os: ubuntu-latest + compiler: gcc + configure-args: --warn + + # Test out of source builds + - name: Ubuntu GCC OSB + os: ubuntu-latest + compiler: gcc + configure-args: --warn + build-dir: ../build + src-dir: ../zlib + + - name: Ubuntu GCC ARM SF + os: ubuntu-latest + compiler: arm-linux-gnueabi-gcc + configure-args: --warn + chost: arm-linux-gnueabi + packages: qemu qemu-user gcc-arm-linux-gnueabi libc-dev-armel-cross + qemu-run: qemu-arm -L /usr/arm-linux-gnueabi + + - name: Ubuntu GCC ARM HF + os: ubuntu-latest + compiler: arm-linux-gnueabihf-gcc + configure-args: --warn + chost: arm-linux-gnueabihf + packages: qemu qemu-user gcc-arm-linux-gnueabihf libc-dev-armhf-cross + qemu-run: qemu-arm -L /usr/arm-linux-gnueabihf + + - name: Ubuntu GCC AARCH64 + os: ubuntu-latest + compiler: aarch64-linux-gnu-gcc + configure-args: --warn + chost: aarch64-linux-gnu + packages: qemu qemu-user gcc-aarch64-linux-gnu libc-dev-arm64-cross + qemu-run: qemu-aarch64 -L /usr/aarch64-linux-gnu + + - name: Ubuntu GCC PPC + os: ubuntu-latest + compiler: powerpc-linux-gnu-gcc + configure-args: --warn --static + chost: powerpc-linux-gnu + packages: qemu qemu-user gcc-powerpc-linux-gnu libc-dev-powerpc-cross + qemu-run: qemu-ppc -L /usr/powerpc-linux-gnu + cflags: -static + ldflags: -static + + - name: Ubuntu GCC PPC64 + os: ubuntu-latest + compiler: powerpc64-linux-gnu-gcc + configure-args: --warn --static + chost: powerpc-linux-gnu + packages: qemu qemu-user gcc-powerpc64-linux-gnu libc-dev-ppc64-cross + qemu-run: qemu-ppc64 -L /usr/powerpc64-linux-gnu + cflags: -static + ldflags: -static + + - name: Ubuntu GCC PPC64LE + os: ubuntu-latest + compiler: powerpc64le-linux-gnu-gcc + configure-args: --warn + chost: powerpc64le-linux-gnu + packages: qemu qemu-user gcc-powerpc64le-linux-gnu libc-dev-ppc64el-cross + qemu-run: qemu-ppc64le -L /usr/powerpc64le-linux-gnu + + - name: Ubuntu GCC S390X + os: ubuntu-latest + compiler: s390x-linux-gnu-gcc + configure-args: --warn --static + chost: s390x-linux-gnu + packages: qemu qemu-user gcc-s390x-linux-gnu libc-dev-s390x-cross + qemu-run: qemu-s390x -L /usr/s390x-linux-gnu + cflags: -static + ldflags: -static + + - name: macOS GCC + os: macos-latest + compiler: gcc-12 + configure-args: --warn + + - name: macOS Clang + os: macos-latest + compiler: clang + configure-args: --warn + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install packages (Ubuntu) + if: runner.os == 'Linux' && matrix.packages + run: | + sudo apt-get update + sudo apt-get install -y ${{ matrix.packages }} + + - name: Generate project files + run: | + [ -d ${{ matrix.build-dir || '.' }} ] || mkdir ${{ matrix.build-dir || '.' }} + cd ${{ matrix.build-dir || '.' }} + ${{ matrix.src-dir || '.' }}/configure ${{ matrix.configure-args }} + env: + CC: ${{ matrix.compiler }} + CFLAGS: ${{ matrix.cflags }} -Werror + LDFLAGS: ${{ matrix.ldflags }} + CHOST: ${{ matrix.chost }} + + - name: Compile source code + run: make -j2 + working-directory: ${{ matrix.build-dir }} + + - name: Run test cases + run: | + make test + make cover + working-directory: ${{ matrix.build-dir }} + env: + QEMU_RUN: ${{ matrix.qemu-run }} + + - name: Upload build errors + uses: actions/upload-artifact@v4 + if: failure() + with: + name: ${{ matrix.name }} (configure) + path: | + ${{ matrix.build-dir || '.' }}/configure.log + retention-days: 7 diff --git a/deps/zlib/.github/workflows/fuzz.yml b/deps/zlib/.github/workflows/fuzz.yml new file mode 100644 index 0000000..ddca83c --- /dev/null +++ b/deps/zlib/.github/workflows/fuzz.yml @@ -0,0 +1,25 @@ +name: OSS-Fuzz +on: [pull_request] +jobs: + Fuzzing: + runs-on: ubuntu-latest + steps: + - name: Build Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'zlib' + dry-run: false + + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'zlib' + fuzz-seconds: 300 + dry-run: false + + - name: Upload Crash + uses: actions/upload-artifact@v4 + if: failure() + with: + name: artifacts + path: ./out/artifacts