echo out GITHUB_OUTPUT #19
Workflow file for this run
This file contains 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
name: "Performance Harness Run" | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
platform-choice: | ||
description: 'Override build platform' | ||
type: choice | ||
options: | ||
- ubuntu20 | ||
- ubuntu22 | ||
override-test-params: | ||
description: 'Override perf harness params' | ||
type: string | ||
override-leap-ref: | ||
description: 'Override leap ref' | ||
type: string | ||
permissions: | ||
packages: read | ||
contents: read | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
v: | ||
name: Discover Inputs | ||
runs-on: ubuntu-latest | ||
outputs: | ||
test-params: ${{steps.overrides.outputs.test-params}} | ||
leap-ref: ${{steps.overrides.outputs.leap-ref}} | ||
steps: | ||
- name: Setup Input Params | ||
id: overrides | ||
env: | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
run: | | ||
echo test-params=testBpOpMode >> $GITHUB_OUTPUT | ||
echo leap-ref='' >> $GITHUB_OUTPUT | ||
if [[ "${{inputs.override-test-params}}" != "" ]]; then | ||
echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT | ||
fi | ||
if [[ "${{inputs.override-leap-ref}}" != "" ]]; then | ||
echo leap-ref=${{inputs.override-leap-ref}} >> $GITHUB_OUTPUT | ||
fi | ||
build-base: | ||
name: Run Build Workflow | ||
uses: ./.github/workflows/build_base.yaml | ||
with: | ||
override-build-matrix: [${{github.event.inputs.platform-choice}}] | ||
permissions: | ||
packages: write | ||
contents: read | ||
# d: | ||
# name: Discover Platforms | ||
# runs-on: ubuntu-latest | ||
# outputs: | ||
# missing-platforms: ${{steps.discover.outputs.missing-platforms}} | ||
# p: ${{steps.discover.outputs.platforms}} | ||
# steps: | ||
# - name: Discover Platforms | ||
# id: discover | ||
# uses: AntelopeIO/discover-platforms-action@v1 | ||
# with: | ||
# platform-file: .cicd/platforms.json | ||
# password: ${{secrets.GITHUB_TOKEN}} | ||
# package-name: builders | ||
# build-platforms: | ||
# name: Build Platforms | ||
# needs: d | ||
# if: needs.d.outputs.missing-platforms != '[]' | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# platform: ${{fromJSON(needs.d.outputs.missing-platforms)}} | ||
# runs-on: ["self-hosted", "enf-x86-beefy"] | ||
# permissions: | ||
# packages: write | ||
# contents: read | ||
# steps: | ||
# - name: Login to Container Registry | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# registry: ghcr.io | ||
# username: ${{github.repository_owner}} | ||
# password: ${{secrets.GITHUB_TOKEN}} | ||
# - name: Build and push | ||
# uses: docker/build-push-action@v3 | ||
# with: | ||
# push: true | ||
# tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}} | ||
# file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}} | ||
# Build: | ||
# needs: [v, d, build-platforms] | ||
# if: always() && needs.v.result == 'success' && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped') | ||
# runs-on: ["self-hosted", "enf-x86-beefy"] | ||
# container: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} | ||
# steps: | ||
# - name: Checkout leap ref | ||
# id: checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: '${{needs.v.outputs.leap-ref}}' | ||
# submodules: recursive | ||
# - name: Build | ||
# id: build | ||
# run: | | ||
# cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja | ||
# cmake --build build | ||
# tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst | ||
# - name: Upload builddir | ||
# uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
# with: | ||
# name: ${{github.event.inputs.platform-choice}}-build | ||
# path: build.tar.zst | ||
tests: | ||
name: Tests | ||
needs: [v, d, Build] | ||
if: always() && needs.Build.result == 'success' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{fromJSON(needs.d.outputs.p)[github.event.inputs.platform-choice].image}} | ||
steps: | ||
- name: Download builddir | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{github.event.inputs.platform-choice}}-build | ||
- name: Run Performance Test | ||
run: | | ||
zstdcat build.tar.zst | tar x | ||
cd build | ||
./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} | ||
- name: Prepare results | ||
id: prep-results | ||
run: | | ||
tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst | ||
- name: Upload results | ||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
with: | ||
name: performance-test-results | ||
path: performance_test_logs.tar.zst | ||
- name: Upload report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: performance-test-report | ||
path: ./build/performance_test/**/report.json |