Skip to content

Migrate CI to Github Actions #3

Migrate CI to Github Actions

Migrate CI to Github Actions #3

Workflow file for this run

name: build and test
defaults:
run:
shell: bash -eo pipefail {0}
on:
workflow_call:
inputs:
cuda_version: {type: string, required: true}
compiler: {type: string, required: true}
compiler_exe: {type: string, required: true}
compiler_version: {type: string, required: true}
std: {type: string, required: true}
gpu_build_archs: {type: string, required: true}
cpu: {type: string, required: true}
os: {type: string, required: true}
build_script: {type: string, required: false}
test_script: {type: string, required: false }
build_image: {type: string, required: false}
test_image: {type: string, required: false}
jobs:
build:
if: inputs.build_script != '' && inputs.build_image != ''
name: Build ${{inputs.compiler}}${{inputs.compiler_version}}/C++${{inputs.std}}
uses: ./.github/workflows/run-as-coder.yml
with:

Check failure on line 28 in .github/workflows/build-and-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
name: Build ${{inputs.compiler}}${{inputs.compiler_version}}/C++${{inputs.std}}
runner: linux-${{inputs.cpu}}-cpu16
image: ${{inputs.build_image}}
command: |
${{ inputs.build_script }} "${{inputs.compiler_exe}}" "${{inputs.std}}" "${{inputs.gpu_build_archs}}"
test:
needs: build
if: ${{ !cancelled() && ( needs.build.result == 'success' || needs.build.result == 'skipped' ) && inputs.test_script != '' && inputs.test_image != '' }}
name: Test ${{inputs.compiler}}${{inputs.compiler_version}}/C++${{inputs.std}}
uses: ./.github/workflows/run-as-coder.yml
with:
name: Test ${{inputs.compiler}}${{inputs.compiler_version}}/C++${{inputs.std}}
runner: linux-${{inputs.cpu}}-gpu-v100-latest-1
image: ${{inputs.test_image}}
command: |
nvidia-smi
${{ inputs.test_script }} "${{inputs.compiler_exe}}" "${{inputs.std}}" "${{inputs.gpu_build_archs}}"