Repository navigation
Compiler Zoo CI #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2021-2026 The OpenSSL Project Authors. All Rights Reserved. | |
| # | |
| # Licensed under the Apache License 2.0 (the "License"). You may not use | |
| # this file except in compliance with the License. You can obtain a copy | |
| # in the file LICENSE in the source distribution or at | |
| # https://www.openssl.org/source/license.html | |
| name: Compiler Zoo CI | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| pr: | |
| description: 'Internal: openssl-ci-bot PR number. Leave empty for a normal manual run.' | |
| required: false | |
| type: string | |
| head_sha: | |
| description: 'Internal: openssl-ci-bot commit SHA. Leave empty for a normal manual run.' | |
| required: false | |
| type: string | |
| check_run_id: | |
| description: 'Internal: openssl-ci-bot check-run ID. Leave empty for a normal manual run.' | |
| required: false | |
| type: string | |
| # Keep in sync with openssl-ci-bot's run-name parser, and with the Actions statistics | |
| # collector that attributes CI load by parsing this same string. Both break silently. | |
| run-name: >- | |
| ${{ github.event.inputs.pr && format('ci-dispatch pr={0} head={1} check_run_id={2}', github.event.inputs.pr, github.event.inputs.head_sha, github.event.inputs.check_run_id) || github.workflow }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.inputs.pr || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Only a dispatch carries inputs, so this is skipped on a push. No repository clause: | |
| # the build jobs below keep running in forks on push, and the validator must not claim | |
| # a boundary they do not have. | |
| validate-dispatch-inputs: | |
| if: inputs.pr != '' || inputs.head_sha != '' || inputs.check_run_id != '' | |
| uses: ./.github/workflows/validate-dispatch-inputs.yml | |
| with: | |
| pr: ${{ inputs.pr }} | |
| head_sha: ${{ inputs.head_sha }} | |
| check_run_id: ${{ inputs.check_run_id }} | |
| gcc: | |
| needs: [validate-dispatch-inputs] | |
| if: | | |
| !cancelled() && | |
| (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped') | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| gcc: [gcc-9, gcc-10, gcc-11, gcc-12, gcc-13, gcc-14] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: install packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install ${{ matrix.gcc }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.inputs.head_sha || github.sha }} | |
| - name: checkout fuzz/corpora submodule | |
| run: git submodule update --init --depth 1 fuzz/corpora | |
| - name: config | |
| env: | |
| CC: ${{ matrix.gcc }} | |
| run: | | |
| ./config --strict-warnings --banner=Configured no-shared enable-fips | |
| - name: config dump | |
| run: ./configdata.pm --dump | |
| - name: make | |
| run: make -s -j4 | |
| - name: get cpu info | |
| run: | | |
| cat /proc/cpuinfo | |
| ./util/opensslwrap.sh version -c | |
| - name: make test | |
| run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} | |
| vs2013: | |
| needs: [validate-dispatch-inputs] | |
| if: | | |
| !cancelled() && | |
| (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped') | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| target: VC-WIN64A-MSVC2013 | |
| config: no-makedepend no-shared enable-fips -DOSSL_WINCTX=openssl | |
| - arch: x86 | |
| target: VC-WIN32-MSVC2013 | |
| config: no-makedepend enable-fips -DOSSL_WINCTX=openssl | |
| runs-on: windows-2022 | |
| env: | |
| IMAGE: ghcr.io/openssl/openssl-vs2013:latest | |
| VCVARS: C:\vc12\vcvars_${{ matrix.arch }}.cmd | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.inputs.head_sha || github.sha }} | |
| - name: checkout fuzz/corpora submodule | |
| run: git submodule update --init --depth 1 fuzz/corpora | |
| - name: pull the VS2013 toolchain image | |
| shell: cmd | |
| run: docker pull %IMAGE% | |
| - name: config | |
| run: | | |
| $chain = @( | |
| # 'call', not a bare invocation: cmd does not necessarily return from a | |
| # batch file run without it, which would skip the rest of the chain. | |
| "call $env:VCVARS" | |
| 'mkdir _build' | |
| 'cd _build' | |
| "perl ..\Configure ${{ matrix.target }} --banner=Configured ${{ matrix.config }}" | |
| 'perl configdata.pm --dump' | |
| ) -join ' && ' | |
| docker run --rm --isolation=process -v "${env:GITHUB_WORKSPACE}:C:\src" ` | |
| -w C:\src ${env:IMAGE} cmd /S /C $chain | |
| - name: make | |
| run: | | |
| $chain = @( | |
| "call $env:VCVARS" | |
| 'jom /j4 /S' | |
| 'apps\openssl.exe version -c' | |
| ) -join ' && ' | |
| docker run --rm --isolation=process -v "${env:GITHUB_WORKSPACE}:C:\src" ` | |
| -w C:\src\_build ${env:IMAGE} cmd /S /C $chain | |
| - name: make test | |
| run: | | |
| $chain = @( | |
| "call $env:VCVARS" | |
| 'jom test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4' | |
| ) -join ' && ' | |
| docker run --rm --isolation=process -v "${env:GITHUB_WORKSPACE}:C:\src" ` | |
| -w C:\src\_build ${env:IMAGE} cmd /S /C $chain | |
| clang: | |
| needs: [validate-dispatch-inputs] | |
| if: | | |
| !cancelled() && | |
| (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped') | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| clang: [clang-11, clang-12, clang-13, clang-14, clang-15, clang-16, clang-17, clang-18, clang-19, clang-20, clang-21] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: install packages | |
| run: | | |
| set -euo pipefail | |
| VERSION=$(awk -F- '{print $NF}' <<< ${{ matrix.clang }}) | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
| echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$VERSION main" | sudo tee -a /etc/apt/sources.list | |
| sudo apt-get update || true | |
| sudo apt-get -y install ${{ matrix.clang }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.inputs.head_sha || github.sha }} | |
| - name: checkout fuzz/corpora submodule | |
| run: git submodule update --init --depth 1 fuzz/corpora | |
| - name: config | |
| env: | |
| CC: ${{ matrix.clang }} | |
| run: | | |
| ./config --strict-warnings --banner=Configured no-shared enable-fips | |
| - name: config dump | |
| run: ./configdata.pm --dump | |
| - name: make | |
| run: make -s -j4 | |
| - name: get cpu info | |
| run: | | |
| cat /proc/cpuinfo | |
| ./util/opensslwrap.sh version -c | |
| - name: make test | |
| run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} |