code style
This commit is contained in:
parent
8759996de4
commit
691a2dc3b1
2 changed files with 8 additions and 5 deletions
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
@ -63,11 +63,7 @@ jobs:
|
||||||
if ('${{ matrix.platform }}' -eq 'x86') {
|
if ('${{ matrix.platform }}' -eq 'x86') {
|
||||||
$flags += '-m32'
|
$flags += '-m32'
|
||||||
}
|
}
|
||||||
$flags += @(
|
$flags += '-std=c++14','-o','foo.exe','foo.cpp'
|
||||||
'-std=c++14',
|
|
||||||
'-o', 'foo.exe',
|
|
||||||
'foo.cpp'
|
|
||||||
)
|
|
||||||
if ('${{ runner.os }}' -eq 'Linux') {
|
if ('${{ runner.os }}' -eq 'Linux') {
|
||||||
$flags += '-lpthread'
|
$flags += '-lpthread'
|
||||||
}
|
}
|
||||||
|
@ -80,8 +76,10 @@ jobs:
|
||||||
Doing something #2
|
Doing something #2
|
||||||
Doing something #3
|
Doing something #3
|
||||||
"@
|
"@
|
||||||
|
|
||||||
$actual = & (Join-Path . foo.exe)
|
$actual = & (Join-Path . foo.exe)
|
||||||
$actual = $actual -join [Environment]::NewLine
|
$actual = $actual -join [Environment]::NewLine
|
||||||
|
|
||||||
$($actual -eq $expected) -or $(throw @"
|
$($actual -eq $expected) -or $(throw @"
|
||||||
Unexpected output:
|
Unexpected output:
|
||||||
$actual
|
$actual
|
||||||
|
|
|
@ -92,6 +92,7 @@ runs:
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[string] $Path
|
[string] $Path
|
||||||
)
|
)
|
||||||
|
|
||||||
$realpath = realpath.exe --no-symlinks -- $Path
|
$realpath = realpath.exe --no-symlinks -- $Path
|
||||||
$dirname = dirname.exe -- $realpath
|
$dirname = dirname.exe -- $realpath
|
||||||
$dirname = cygpath.exe -wa $dirname
|
$dirname = cygpath.exe -wa $dirname
|
||||||
|
@ -108,11 +109,14 @@ runs:
|
||||||
$link_path = $Path
|
$link_path = $Path
|
||||||
$link_winpath = Convert-CygwinPath $link_path
|
$link_winpath = Convert-CygwinPath $link_path
|
||||||
$link_ext = [System.IO.Path]::GetExtension($link_path)
|
$link_ext = [System.IO.Path]::GetExtension($link_path)
|
||||||
|
|
||||||
$dest_path = readlink.exe --canonicalize-existing -- $link_path
|
$dest_path = readlink.exe --canonicalize-existing -- $link_path
|
||||||
$dest_winpath = Convert-CygwinPath $dest_path
|
$dest_winpath = Convert-CygwinPath $dest_path
|
||||||
$dest_ext = [System.IO.Path]::GetExtension($dest_path)
|
$dest_ext = [System.IO.Path]::GetExtension($dest_path)
|
||||||
|
|
||||||
echo "Removing symlink: $link_winpath"
|
echo "Removing symlink: $link_winpath"
|
||||||
Remove-Item $link_winpath -Force
|
Remove-Item $link_winpath -Force
|
||||||
|
|
||||||
if ($dest_ext.ToLower() -ne $link_ext.ToLower()) {
|
if ($dest_ext.ToLower() -ne $link_ext.ToLower()) {
|
||||||
$link_winpath += $dest_ext
|
$link_winpath += $dest_ext
|
||||||
}
|
}
|
||||||
|
@ -139,6 +143,7 @@ runs:
|
||||||
If you _are_ using 32-bit Cygwin, please ignore this message.
|
If you _are_ using 32-bit Cygwin, please ignore this message.
|
||||||
'@
|
'@
|
||||||
}
|
}
|
||||||
|
|
||||||
# IDK why, but without libiconv-devel, even a "Hello, world!"
|
# IDK why, but without libiconv-devel, even a "Hello, world!"
|
||||||
# C++ app cannot be compiled as of December 2020. Also, libstdc++
|
# C++ app cannot be compiled as of December 2020. Also, libstdc++
|
||||||
# is required; it's simpler to install gcc-g++ for all the
|
# is required; it's simpler to install gcc-g++ for all the
|
||||||
|
|
Loading…
Add table
Reference in a new issue