Build-and-Test-Provisioned #38
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: Build-and-Test-Provisioned | |
on: | |
workflow_call: | |
inputs: | |
runner_label: | |
required: true | |
type: string | |
run_build: | |
type: boolean | |
default: true | |
sanitizer: | |
required: false | |
type: string | |
run_unit_tests: | |
type: boolean | |
default: true | |
run_functional_tests: | |
type: boolean | |
default: true | |
test_label_regexp: | |
required: false | |
type: string | |
extra_compile_flags: | |
required: false | |
type: string | |
checkout_ref: | |
required: false | |
type: string | |
ninja_target: | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
runner_label: | |
required: true | |
type: string | |
run_build: | |
type: boolean | |
default: true | |
sanitizer: | |
required: false | |
type: string | |
run_unit_tests: | |
type: boolean | |
default: true | |
run_functional_tests: | |
type: boolean | |
default: true | |
test_label_regexp: | |
required: false | |
type: string | |
extra_compile_flags: | |
required: false | |
type: string | |
checkout_ref: | |
required: false | |
type: string | |
ninja_target: | |
required: false | |
type: string | |
jobs: | |
main: | |
name: Build and test | |
runs-on: [ self-hosted, "${{ inputs.runner_label }}" ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.checkout_ref }} | |
- name: Build | |
uses: ./.github/actions/build | |
if: inputs.run_build | |
with: | |
sanitizer: ${{ inputs.sanitizer }} | |
ccache_remote_path: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}} | |
extra_compile_flags: ${{ inputs.extra_compile_flags }} | |
ninja_target: ${{ inputs.ninja_target }} | |
- name: Run tests | |
uses: ./.github/actions/test | |
with: | |
log_suffix: ${{ inputs.sanitizer != '' && format('{0}-{1}', inputs.runner_label, inputs.sanitizer) || inputs.runner_label }} | |
test_label_regexp: ${{ inputs.test_label_regexp }} | |
aws_key_id: ${{secrets.AWS_KEY_ID}} | |
aws_key_value: ${{secrets.AWS_KEY_VALUE}} | |
aws_bucket: ${{vars.AWS_BUCKET}} | |
aws_endpoint: ${{vars.AWS_ENDPOINT}} | |
testman_token: ${{secrets.TESTMO_TOKEN}} | |
testman_url: ${{vars.TESTMO_URL}} | |
testman_project_id: ${{vars.TESTMO_PROJECT_ID}} | |
run_unit_tests: ${{inputs.run_unit_tests}} | |
run_functional_tests: ${{inputs.run_functional_tests}} | |