workflows/test.yml: test both hardlinks 0 & 1
This commit is contained in:
parent
a404df762f
commit
ffccf21e56
1 changed files with 25 additions and 2 deletions
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
|
@ -15,6 +15,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [x86, x64]
|
platform: [x86, x64]
|
||||||
cygwin: [0, 1]
|
cygwin: [0, 1]
|
||||||
|
hardlinks: [0, 1]
|
||||||
os: [ubuntu-18.04, windows-2019, windows-2016]
|
os: [ubuntu-18.04, windows-2019, windows-2016]
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
@ -28,10 +29,12 @@ jobs:
|
||||||
- {os: ubuntu-18.04, cygwin: 1}
|
- {os: ubuntu-18.04, cygwin: 1}
|
||||||
# Cygwin is the same on Windows Server 2016 & 2019.
|
# Cygwin is the same on Windows Server 2016 & 2019.
|
||||||
- {os: windows-2016, cygwin: 1}
|
- {os: windows-2016, cygwin: 1}
|
||||||
|
# Only test hardlinks on Cygwin.
|
||||||
|
- {cygwin: 0, hardlinks: 1}
|
||||||
|
|
||||||
runs-on: '${{ matrix.os }}'
|
runs-on: '${{ matrix.os }}'
|
||||||
|
|
||||||
name: '${{ matrix.name }} / ${{ matrix.platform }}'
|
name: '${{ matrix.name }} / ${{ matrix.platform }} / Hardlinks: ${{ matrix.hardlinks }}'
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
@ -57,7 +60,7 @@ jobs:
|
||||||
platform: '${{ matrix.platform }}'
|
platform: '${{ matrix.platform }}'
|
||||||
cygwin: '${{ matrix.cygwin }}'
|
cygwin: '${{ matrix.cygwin }}'
|
||||||
cc: 1
|
cc: 1
|
||||||
hardlinks: 1
|
hardlinks: '${{ matrix.hardlinks }}'
|
||||||
|
|
||||||
- name: Build foo.exe
|
- name: Build foo.exe
|
||||||
run: |
|
run: |
|
||||||
|
@ -70,6 +73,15 @@ jobs:
|
||||||
$flags += '-lpthread'
|
$flags += '-lpthread'
|
||||||
}
|
}
|
||||||
clang++ $flags
|
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
|
- name: Run foo.exe
|
||||||
run: |
|
run: |
|
||||||
|
@ -97,3 +109,14 @@ jobs:
|
||||||
$cxx = & c++ --version
|
$cxx = & c++ --version
|
||||||
echo $cxx
|
echo $cxx
|
||||||
$($cxx | Select-String -Pattern "clang version" -SimpleMatch -Quiet) -or $(throw "Unexpected `c++ --version` output")
|
$($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
|
||||||
|
|
Loading…
Add table
Reference in a new issue