diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-06 17:49:56 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-06 17:49:56 +0200 |
| commit | 763f0ed522044adec12eaa1a768edfb1a98a635a (patch) | |
| tree | 48fb2bd6eb210a046e520cdbf1401ce33b820cf1 /.github/actions/build-threads | |
| parent | README: update (diff) | |
| download | setup-clang-763f0ed522044adec12eaa1a768edfb1a98a635a.tar.gz setup-clang-763f0ed522044adec12eaa1a768edfb1a98a635a.zip | |
foo.cpp -> test/threads.cpp
Diffstat (limited to '.github/actions/build-threads')
| -rw-r--r-- | .github/actions/build-threads/action.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/actions/build-threads/action.yml b/.github/actions/build-threads/action.yml new file mode 100644 index 0000000..8c754b0 --- /dev/null +++ b/.github/actions/build-threads/action.yml @@ -0,0 +1,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: + - run: | + $version = '${{ inputs.version }}' + $version = if ($version) { "-$version" } else { $version } + + $flags = @() + if ('${{ matrix.platform }}' -eq 'x86') { + $flags += '-m32' + } + $flags += '-std=c++14','-o','test/threads.exe','test/threads.cpp' + if ('${{ runner.os }}' -eq 'Linux') { + $flags += '-lpthread' + } + + & '${{ inputs.binary }}' $flags + shell: pwsh |
