aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/actions/build-foo/action.yml
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-07-02 13:58:17 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-07-02 14:37:36 +0300
commit471c576fd4545f1b9f5e12f54f002e45fc0225b9 (patch)
treef239c4c71c5ee3c626e5a1892c38b7ffbe1729ee /.github/actions/build-foo/action.yml
parenttest support of multiple versions (diff)
downloadsetup-gcc-471c576fd4545f1b9f5e12f54f002e45fc0225b9.tar.gz
setup-gcc-471c576fd4545f1b9f5e12f54f002e45fc0225b9.zip
workflows/test: factor out steps + refactoring
Diffstat (limited to '')
-rw-r--r--.github/actions/build-foo/action.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/actions/build-foo/action.yml b/.github/actions/build-foo/action.yml
new file mode 100644
index 0000000..c1a6fdd
--- /dev/null
+++ b/.github/actions/build-foo/action.yml
@@ -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','foo.cpp'
+ if ('${{ runner.os }}' -eq 'Linux') {
+ $flags += '-lpthread'
+ }
+ g++ $flags
+ shell: pwsh