diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-02-12 11:29:14 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2024-03-21 17:57:50 +0000 |
commit | f2db70962cacc2602bc614d51e0610085c99e999 (patch) | |
tree | c32cacb4da8cf154470315553dfcb17ec938f77b /.github | |
parent | dc9bc6c8e1bd329ead703417a2235ab3e97557ec (diff) |
Experimental support for uploading qlog artifacts
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23551)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml | 128 | ||||
-rw-r--r-- | .github/workflows/cross-compiles.yml | 11 | ||||
-rwxr-xr-x | .github/workflows/make-test | 18 |
3 files changed, 136 insertions, 21 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfab096ddf..d7df5e8611 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@basic-gcc" + path: artifacts/ basic_clang: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -108,7 +113,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@basic-clang" + path: artifacts/ self-hosted: if: github.repository == 'openssl/openssl' @@ -128,7 +138,12 @@ jobs: - name: get cpu info run: ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@self-hosted" + path: artifacts/ minimal: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -145,7 +160,13 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@minimal" + path: artifacts/ + if-no-files-found: ignore no-deprecated: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -162,7 +183,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@no-deprecated" + path: artifacts/ no-shared-ubuntu: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -179,7 +205,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@no-shared-ubuntu" + path: artifacts/ no-shared-macos: runs-on: macos-latest @@ -197,7 +228,12 @@ jobs: sysctl machdep.cpu ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@no-shared-macos" + path: artifacts/ non-caching: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -218,7 +254,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="-test_fuzz* -test_ssl_* -test_sslapi -test_evp -test_cmp_http -test_verify -test_cms -test_store -test_enc -[01][0-9]" + run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0 TESTS="-test_fuzz* -test_ssl_* -test_sslapi -test_evp -test_cmp_http -test_verify -test_cms -test_store -test_enc -[01][0-9]" + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@non-caching" + path: artifacts/ address_ub_sanitizer: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -239,7 +280,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 + run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0 + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@address_ub_sanitizer" + path: artifacts/ fuzz_tests: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -260,7 +306,13 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="test_fuzz*" + run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0 TESTS="test_fuzz*" + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@fuzz_tests" + path: artifacts/ + if-no-files-found: ignore memory_sanitizer: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -282,7 +334,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 + run: .github/workflows/make-test OPENSSL_TEST_RAND_ORDER=0 + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@memory_sanitizer" + path: artifacts/ threads_sanitizer: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -303,7 +360,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make V=1 TESTS="test_threads test_internal_provider test_provfetch test_provider test_pbe test_evp_kdf test_pkcs12 test_store test_evp test_quic*" test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test V=1 TESTS="test_threads test_internal_provider test_provfetch test_provider test_pbe test_evp_kdf test_pkcs12 test_store test_evp test_quic*" + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@threads_sanitizer" + path: artifacts/ enable_non-default_options: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -322,7 +384,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@enable_non-default_options" + path: artifacts/ full_featured: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -347,7 +414,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@full_featured" + path: artifacts/ no-legacy: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -364,7 +436,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@no-legacy" + path: artifacts/ legacy: runs-on: ${{ github.server_url == 'https://github.com' && 'ubuntu-latest' || 'ubuntu-22.04-self-hosted' }} @@ -381,7 +458,12 @@ jobs: cat /proc/cpuinfo ./util/opensslwrap.sh version -c - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: .github/workflows/make-test + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@legacy" + path: artifacts/ # out-of-source-and-install checks multiple things at the same time: # - That building, testing and installing works from an out-of-source @@ -417,8 +499,13 @@ jobs: ./util/opensslwrap.sh version -c working-directory: ./build - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: ../source/.github/workflows/make-test working-directory: ./build + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@out-of-readonly-source-and-install-ubuntu" + path: build/artifacts/ - name: make install run: make install working-directory: ./build @@ -453,8 +540,13 @@ jobs: ./util/opensslwrap.sh version -c working-directory: ./build - name: make test - run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} + run: ../source/.github/workflows/make-test working-directory: ./build + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "ci@out-of-readonly-source-and-install-macos" + path: build/artifacts/ - name: make install run: make install working-directory: ./build diff --git a/.github/workflows/cross-compiles.yml b/.github/workflows/cross-compiles.yml index c3dd90cab9..a452b8a467 100644 --- a/.github/workflows/cross-compiles.yml +++ b/.github/workflows/cross-compiles.yml @@ -201,18 +201,23 @@ jobs: - name: make all tests if: github.event_name == 'push' && matrix.platform.tests == '' run: | - make test HARNESS_JOBS=${HARNESS_JOBS:-4} \ + .github/workflows/make-test \ TESTS="-test_afalg" \ QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }} - name: make some tests if: github.event_name == 'push' && matrix.platform.tests != 'none' && matrix.platform.tests != '' run: | - make test HARNESS_JOBS=${HARNESS_JOBS:-4} \ + .github/workflows/make-test \ TESTS="${{ matrix.platform.tests }} -test_afalg" \ QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }} - name: make evp tests if: github.event_name == 'pull_request' && matrix.platform.tests != 'none' run: | - make test HARNESS_JOBS=${HARNESS_JOBS:-4} \ + .github/workflows/make-test \ TESTS="test_evp*" \ QEMU_LD_PREFIX=/usr/${{ matrix.platform.arch }} + - name: save artifacts + uses: actions/upload-artifact@v4 + with: + name: "cross-compiles@${{ matrix.platform.arch }}" + path: artifacts/ diff --git a/.github/workflows/make-test b/.github/workflows/make-test new file mode 100755 index 0000000000..f77c7afb01 --- /dev/null +++ b/.github/workflows/make-test @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -eo pipefail + +cleanup() { + # Remove if nothing was generated. + find artifacts -type d -empty -delete +} +trap cleanup EXIT + +OSSL_CI_ARTIFACTS_PATH="artifacts/" +if [ -n "${GITHUB_RUN_NUMBER}" ]; then + OSSL_CI_ARTIFACTS_PATH="artifacts/github-${GITHUB_JOB}-${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ID}/" +fi +mkdir -p "$OSSL_CI_ARTIFACTS_PATH" +export OSSL_CI_ARTIFACTS_PATH="$(cd "$OSSL_CI_ARTIFACTS_PATH"; pwd)" +echo Artifacts path is "$OSSL_CI_ARTIFACTS_PATH" + +make test HARNESS_JOBS=${HARNESS_JOBS:-4} "$@" |