From 9a95e237ac474fe4844f778427196f49e79b070b Mon Sep 17 00:00:00 2001 From: Fabian Albert Date: Thu, 8 Aug 2024 11:42:15 +0200 Subject: [PATCH] Ci: Get windows debug-mode errors --- .github/workflows/ci.yml | 498 +++++++++++++++++++-------------------- src/scripts/ci_build.py | 6 +- 2 files changed, 253 insertions(+), 251 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51ed30da842..c7f795f449b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ permissions: on: push: - branches: [ master ] + branches: [ ci-test/debug-windows-build ] pull_request: branches: [ master ] @@ -33,15 +33,15 @@ jobs: - target: shared arch: x86_64 host_os: windows-2022 - - target: static - arch: x86_64 - host_os: windows-2022 - - target: amalgamation - arch: x86_64 - host_os: windows-2022 - - target: shared - arch: x86 - host_os: windows-2022 + # - target: static + # arch: x86_64 + # host_os: windows-2022 + # - target: amalgamation + # arch: x86_64 + # host_os: windows-2022 + # - target: shared + # arch: x86 + # host_os: windows-2022 runs-on: ${{ matrix.host_os }} @@ -58,242 +58,242 @@ jobs: - name: Build and Test Botan run: python3 ./src/scripts/ci_build.py --cc='msvc' --make-tool='ninja' --cpu='${{ matrix.arch }}' --test-results-dir=junit_results ${{ matrix.target }} - linux: - name: "Linux" - strategy: - fail-fast: false - - matrix: - include: - - compiler: gcc - target: shared - - compiler: gcc - target: amalgamation - - compiler: gcc - target: static - - compiler: clang - target: shared - - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Setup Build Agent - uses: ./.github/actions/setup-build-agent - with: - target: ${{ matrix.target }} - cache-key: linux-${{ matrix.compiler }}-x86_64-${{ matrix.target }} - - - name: Build and Test Botan - run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} - - macos: - name: "macOS" - strategy: - fail-fast: false - - matrix: - include: - - target: shared - compiler: xcode - os: macos-13 - - target: amalgamation - compiler: xcode - os: macos-13 - - target: shared - compiler: xcode - os: macos-14 # uses Apple Silicon - - target: amalgamation - compiler: xcode - os: macos-14 # uses Apple Silicon - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - - name: Setup Build Agent - uses: ./.github/actions/setup-build-agent - with: - target: ${{ matrix.target }} - cache-key: macos-${{ matrix.compiler }}-${{ matrix.os }}-${{ matrix.target }} - - - name: Build and Test Botan - run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} - - clang-tidy: - name: "Clang Tidy" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - - name: Setup Build Agent - uses: ./.github/actions/setup-build-agent - with: - target: clang-tidy - cache-key: linux-x86_64-clang-tidy - - - name: Configure Build - run: python3 ./configure.py --cc=clang --build-targets=shared,cli,tests,examples,bogo_shim --build-fuzzers=test --with-boost --with-sqlite --with-zlib --with-lzma --with-bzip2 - - - name: Run Clang Tidy - run: | - ./src/scripts/ci/gh_get_changes_in_pr.py $(git rev-parse HEAD) --api-token=${{ secrets.GITHUB_TOKEN }} | \ - python3 ./src/scripts/dev_tools/run_clang_tidy.py --verbose --take-file-list-from-stdin --export-fixes-dir=clang_tidy_diagnostics - - - name: Display Clang Tidy Results - if: failure() - run: ./src/scripts/ci/gh_clang_tidy_fixes_in_pr.py clang_tidy_diagnostics - - analysis: - name: "Analysis" - strategy: - fail-fast: false - - matrix: - include: - - target: coverage - compiler: gcc - host_os: ubuntu-24.04 - - target: sanitizer - compiler: msvc - host_os: windows-2022 - make_tool: ninja - - target: sanitizer - compiler: clang - host_os: ubuntu-24.04 - - target: sanitizer - compiler: gcc - host_os: ubuntu-24.04 - - target: valgrind - compiler: clang - host_os: ubuntu-24.04 - - target: fuzzers - compiler: gcc - host_os: ubuntu-24.04 - - target: lint - compiler: gcc - host_os: ubuntu-24.04 - - target: format - compiler: gcc - host_os: ubuntu-24.04 - - target: limbo - compiler: gcc - host_os: ubuntu-24.04 - - runs-on: ${{ matrix.host_os }} - - env: - COVERALLS_REPO_TOKEN: pbLoTMBxC1DFvbws9WfrzVOvfEdEZTcCS - - steps: - - uses: actions/checkout@v4 - with: - path: ./source - - - name: Fetch BoringSSL fork for BoGo tests - uses: actions/checkout@v4 - with: - repository: randombit/boringssl - ref: rene/runner-20240524 - path: ./boringssl - if: matrix.target == 'coverage' || matrix.target == 'sanitizer' - - - name: Setup Build Agent - uses: ./source/.github/actions/setup-build-agent - with: - target: ${{ matrix.target }} - cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }} - - - name: Build and Test Botan - run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --cc='${{ matrix.compiler }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }} - - specials: - name: "Special" - strategy: - fail-fast: false - - matrix: - include: - - target: examples - compiler: gcc - host_os: ubuntu-24.04 - - target: minimized - compiler: gcc - host_os: ubuntu-24.04 - - target: bsi - compiler: gcc - host_os: ubuntu-24.04 - - target: docs - compiler: gcc - host_os: ubuntu-24.04 - - target: no_pcurves - compiler: gcc - host_os: ubuntu-24.04 - - runs-on: ${{ matrix.host_os }} - - steps: - - uses: actions/checkout@v4 - with: - path: ./source - - - name: Setup Build Agent - uses: ./source/.github/actions/setup-build-agent - with: - target: ${{ matrix.target }} - cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }} - - - name: Build and Test Botan - run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} - - x-compile: - name: "Cross" - strategy: - fail-fast: false - - matrix: - include: - - target: cross-i386 - compiler: gcc - host_os: ubuntu-22.04 - - target: cross-arm32 - compiler: gcc - host_os: ubuntu-24.04 - - target: cross-arm64 - compiler: gcc - host_os: ubuntu-24.04 - - target: cross-ppc64 - compiler: gcc - host_os: ubuntu-24.04 - - target: cross-mips64 - compiler: gcc - host_os: ubuntu-24.04 - - target: cross-android-arm64 - compiler: clang - host_os: ubuntu-24.04 - - target: static - compiler: gcc - host_os: windows-2022 - make_tool: make - - target: cross-ios-arm64 - compiler: xcode - host_os: macos-13 - - runs-on: ${{ matrix.host_os }} - - env: - ANDROID_NDK: android-ndk-r26 - - steps: - - uses: actions/checkout@v4 - - - name: Setup Build Agent - uses: ./.github/actions/setup-build-agent - with: - target: ${{ matrix.target }} - cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-xcompile-${{ matrix.target }} - - - name: Build and Test Botan - run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }} + # linux: + # name: "Linux" + # strategy: + # fail-fast: false + + # matrix: + # include: + # - compiler: gcc + # target: shared + # - compiler: gcc + # target: amalgamation + # - compiler: gcc + # target: static + # - compiler: clang + # target: shared + + # runs-on: ubuntu-22.04 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Build Agent + # uses: ./.github/actions/setup-build-agent + # with: + # target: ${{ matrix.target }} + # cache-key: linux-${{ matrix.compiler }}-x86_64-${{ matrix.target }} + + # - name: Build and Test Botan + # run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} + + # macos: + # name: "macOS" + # strategy: + # fail-fast: false + + # matrix: + # include: + # - target: shared + # compiler: xcode + # os: macos-13 + # - target: amalgamation + # compiler: xcode + # os: macos-13 + # - target: shared + # compiler: xcode + # os: macos-14 # uses Apple Silicon + # - target: amalgamation + # compiler: xcode + # os: macos-14 # uses Apple Silicon + + # runs-on: ${{ matrix.os }} + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Build Agent + # uses: ./.github/actions/setup-build-agent + # with: + # target: ${{ matrix.target }} + # cache-key: macos-${{ matrix.compiler }}-${{ matrix.os }}-${{ matrix.target }} + + # - name: Build and Test Botan + # run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} + + # clang-tidy: + # name: "Clang Tidy" + # runs-on: ubuntu-24.04 + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Build Agent + # uses: ./.github/actions/setup-build-agent + # with: + # target: clang-tidy + # cache-key: linux-x86_64-clang-tidy + + # - name: Configure Build + # run: python3 ./configure.py --cc=clang --build-targets=shared,cli,tests,examples,bogo_shim --build-fuzzers=test --with-boost --with-sqlite --with-zlib --with-lzma --with-bzip2 + + # - name: Run Clang Tidy + # run: | + # ./src/scripts/ci/gh_get_changes_in_pr.py $(git rev-parse HEAD) --api-token=${{ secrets.GITHUB_TOKEN }} | \ + # python3 ./src/scripts/dev_tools/run_clang_tidy.py --verbose --take-file-list-from-stdin --export-fixes-dir=clang_tidy_diagnostics + + # - name: Display Clang Tidy Results + # if: failure() + # run: ./src/scripts/ci/gh_clang_tidy_fixes_in_pr.py clang_tidy_diagnostics + + # analysis: + # name: "Analysis" + # strategy: + # fail-fast: false + + # matrix: + # include: + # - target: coverage + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: sanitizer + # compiler: msvc + # host_os: windows-2022 + # make_tool: ninja + # - target: sanitizer + # compiler: clang + # host_os: ubuntu-24.04 + # - target: sanitizer + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: valgrind + # compiler: clang + # host_os: ubuntu-24.04 + # - target: fuzzers + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: lint + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: format + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: limbo + # compiler: gcc + # host_os: ubuntu-24.04 + + # runs-on: ${{ matrix.host_os }} + + # env: + # COVERALLS_REPO_TOKEN: pbLoTMBxC1DFvbws9WfrzVOvfEdEZTcCS + + # steps: + # - uses: actions/checkout@v4 + # with: + # path: ./source + + # - name: Fetch BoringSSL fork for BoGo tests + # uses: actions/checkout@v4 + # with: + # repository: randombit/boringssl + # ref: rene/runner-20240524 + # path: ./boringssl + # if: matrix.target == 'coverage' || matrix.target == 'sanitizer' + + # - name: Setup Build Agent + # uses: ./source/.github/actions/setup-build-agent + # with: + # target: ${{ matrix.target }} + # cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }} + + # - name: Build and Test Botan + # run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --cc='${{ matrix.compiler }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }} + + # specials: + # name: "Special" + # strategy: + # fail-fast: false + + # matrix: + # include: + # - target: examples + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: minimized + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: bsi + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: docs + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: no_pcurves + # compiler: gcc + # host_os: ubuntu-24.04 + + # runs-on: ${{ matrix.host_os }} + + # steps: + # - uses: actions/checkout@v4 + # with: + # path: ./source + + # - name: Setup Build Agent + # uses: ./source/.github/actions/setup-build-agent + # with: + # target: ${{ matrix.target }} + # cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }} + + # - name: Build and Test Botan + # run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --cc='${{ matrix.compiler }}' --test-results-dir=junit_results ${{ matrix.target }} + + # x-compile: + # name: "Cross" + # strategy: + # fail-fast: false + + # matrix: + # include: + # - target: cross-i386 + # compiler: gcc + # host_os: ubuntu-22.04 + # - target: cross-arm32 + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: cross-arm64 + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: cross-ppc64 + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: cross-mips64 + # compiler: gcc + # host_os: ubuntu-24.04 + # - target: cross-android-arm64 + # compiler: clang + # host_os: ubuntu-24.04 + # - target: static + # compiler: gcc + # host_os: windows-2022 + # make_tool: make + # - target: cross-ios-arm64 + # compiler: xcode + # host_os: macos-13 + + # runs-on: ${{ matrix.host_os }} + + # env: + # ANDROID_NDK: android-ndk-r26 + + # steps: + # - uses: actions/checkout@v4 + + # - name: Setup Build Agent + # uses: ./.github/actions/setup-build-agent + # with: + # target: ${{ matrix.target }} + # cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-xcompile-${{ matrix.target }} + + # - name: Build and Test Botan + # run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }} diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index 238ba1696a6..a1e01f2d66e 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -182,7 +182,8 @@ def sanitize_kv(some_string): '--build-targets=%s' % ','.join(build_targets(target, target_os)), '--with-build-dir=%s' % build_dir, '--link-method=symlink', - '--enable-experimental-features'] + '--enable-experimental-features', + '--debug'] if target in ['shared', 'static']: install_prefix = tempfile.mkdtemp(prefix='botan-install-') @@ -192,7 +193,8 @@ def sanitize_kv(some_string): flags += ['--no-store-vc-rev', '--compiler-cache=%s' % (ccache)] if not disable_werror: - flags += ['--werror-mode'] + pass + # flags += ['--werror-mode'] if target_cpu is not None: flags += ['--cpu=%s' % (target_cpu)]