workflows/test: factor out steps & refactoring

This commit is contained in:
Egor Tensin 2021-07-02 20:16:57 +03:00
parent 4785090c89
commit 3d49180b0b
6 changed files with 153 additions and 95 deletions

20
.github/actions/build-foo/action.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Build foo.exe
description: Build foo.exe
inputs:
platform:
description: Target platform
required: true
runs:
using: composite
steps:
- run: |
$flags = @()
if ('${{ matrix.platform }}' -eq 'x86') {
$flags += '-m32'
}
$flags += '-std=c++14','-o','foo.exe','foo.cpp'
if ('${{ runner.os }}' -eq 'Linux') {
$flags += '-lpthread'
}
clang++ $flags
shell: pwsh