blob: 86515f79d47f004394b01e9a38953bc3275c7b1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
name: Build threads.exe
description: Build threads.exe
inputs:
binary:
description: Compiler binary file name
required: false
default: clang++
platform:
description: Target platform
required: true
runs:
using: composite
steps:
- env:
ARG_BINARY: ${{ inputs.binary }}
ARG_PLATFORM: ${{ inputs.platform }}
run: |
$flags = @()
if ($env:ARG_PLATFORM -eq 'x86') {
$flags += '-m32'
}
$flags += '-std=c++14','-o','test/threads.exe','test/threads.cpp'
if ('${{ runner.os }}' -eq 'Linux') {
$flags += '-lpthread'
}
& $env:ARG_BINARY $flags
shell: pwsh
|