aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/actions/build-threads
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-06 17:49:56 +0200
committerEgor Tensin <egor@tensin.name>2026-06-06 17:49:56 +0200
commit763f0ed522044adec12eaa1a768edfb1a98a635a (patch)
tree48fb2bd6eb210a046e520cdbf1401ce33b820cf1 /.github/actions/build-threads
parentREADME: update (diff)
downloadsetup-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.yml28
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