From 471c576fd4545f1b9f5e12f54f002e45fc0225b9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 2 Jul 2021 13:58:17 +0300 Subject: workflows/test: factor out steps + refactoring --- .github/actions/build-foo/action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/actions/build-foo/action.yml (limited to '.github/actions/build-foo') 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 -- cgit v1.2.3