name: Reusable build and test on: workflow_call: inputs: runs_on: description: Runner to run the job on required: true type: string container: description: "The container object as a JSON string (leave empty to run natively)" required: true type: string compiler: description: 'Compiler to build with ("gcc", "clang" or "apple-clang")' required: true type: string sanitizers: description: 'Sanitizers to enable ("address", "thread", "undefinedbehavior" or empty)' required: false type: string default: "" build_type: description: Build type required: true type: string download_ccache: description: Whether to download ccache from the cache required: false type: boolean default: true upload_ccache: description: Whether to upload ccache to the cache required: false type: boolean default: false run_unit_tests: description: Whether to run unit tests required: true type: boolean run_integration_tests: description: Whether to run integration tests required: true type: boolean default: false upload_clio_server: description: Whether to upload clio_server required: true type: boolean targets: description: Space-separated build target names required: false type: string default: all package: description: Whether to generate Debian package required: false type: boolean default: false version: description: Version of the clio_server binary required: false type: string default: "" jobs: build: uses: ./.github/workflows/reusable-build.yml with: runs_on: ${{ inputs.runs_on }} container: ${{ inputs.container }} compiler: ${{ inputs.compiler }} sanitizers: ${{ inputs.sanitizers }} build_type: ${{ inputs.build_type }} download_ccache: ${{ inputs.download_ccache }} upload_ccache: ${{ inputs.upload_ccache }} code_coverage: false upload_clio_server: ${{ inputs.upload_clio_server }} targets: ${{ inputs.targets }} analyze_build_time: false package: ${{ inputs.package }} version: ${{ inputs.version }} test: needs: build uses: ./.github/workflows/reusable-test.yml with: runs_on: ${{ inputs.runs_on }} container: ${{ inputs.container }} compiler: ${{ inputs.compiler }} sanitizers: ${{ inputs.sanitizers }} build_type: ${{ inputs.build_type }} run_unit_tests: ${{ inputs.run_unit_tests }} run_integration_tests: ${{ inputs.run_integration_tests }}