From ffccf21e56c77e754cd51b98f11c1d6641118545 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 7 Jan 2021 08:26:02 +0300 Subject: workflows/test.yml: test both hardlinks 0 & 1 --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b0444d..64ad556 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: matrix: platform: [x86, x64] cygwin: [0, 1] + hardlinks: [0, 1] os: [ubuntu-18.04, windows-2019, windows-2016] include: @@ -28,10 +29,12 @@ jobs: - {os: ubuntu-18.04, cygwin: 1} # Cygwin is the same on Windows Server 2016 & 2019. - {os: windows-2016, cygwin: 1} + # Only test hardlinks on Cygwin. + - {cygwin: 0, hardlinks: 1} runs-on: '${{ matrix.os }}' - name: '${{ matrix.name }} / ${{ matrix.platform }}' + name: '${{ matrix.name }} / ${{ matrix.platform }} / Hardlinks: ${{ matrix.hardlinks }}' defaults: run: @@ -57,7 +60,7 @@ jobs: platform: '${{ matrix.platform }}' cygwin: '${{ matrix.cygwin }}' cc: 1 - hardlinks: 1 + hardlinks: '${{ matrix.hardlinks }}' - name: Build foo.exe run: | @@ -70,6 +73,15 @@ jobs: $flags += '-lpthread' } clang++ $flags + if: '!matrix.cygwin || matrix.hardlinks' + + - name: Build foo.exe on Cygwin + run: | + $cwd = cygpath.exe -ua (Get-Location) + $arch = if ('${{ matrix.platform }}' -eq 'x64') { '-m64' } else { '-m32' } + $cmd = printf.exe -- 'cd %q && clang++ %q -std=c++14 -o foo.exe foo.cpp' $cwd $arch + bash.exe --login -o errexit -c $cmd + if: matrix.cygwin && !matrix.hardlinks - name: Run foo.exe run: | @@ -97,3 +109,14 @@ jobs: $cxx = & c++ --version echo $cxx $($cxx | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `c++ --version` output") + if: '!matrix.cygwin || matrix.hardlinks' + + - name: Check cc/c++ on Cygwin + run: | + $cc = bash.exe --login -o errexit -c 'cc --version' + echo $cc + $($cc | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `cc --version` output") + $cxx = bash.exe --login -o errexit -c 'c++ --version' + echo $cxx + $($cxx | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `c++ --version` output") + if: matrix.cygwin && !matrix.hardlinks -- cgit v1.2.3