workflows/test: factor out steps & refactoring
This commit is contained in:
parent
4785090c89
commit
3d49180b0b
6 changed files with 153 additions and 95 deletions
20
.github/actions/build-foo/action.yml
vendored
Normal file
20
.github/actions/build-foo/action.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue