aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2025-12-29 22:32:57 +0100
committerEgor Tensin <egor@tensin.name>2025-12-29 22:35:29 +0100
commit03f3e841176d3b1f94fd9434943b16441493dbc1 (patch)
tree3fc48694a9cf0fa4ecae8d872dfed916b794a00a /.github
parentworkflows/example_toolsets: upgrade actions (diff)
downloadcmake-common-03f3e841176d3b1f94fd9434943b16441493dbc1.tar.gz
cmake-common-03f3e841176d3b1f94fd9434943b16441493dbc1.zip
drop Cygwin, it's obsolete
Diffstat (limited to '.github')
-rw-r--r--.github/actions/build-boost/action.yml5
-rw-r--r--.github/actions/build-example/action.yml9
-rw-r--r--.github/actions/check-boost-bootstrapped/action.yml4
-rw-r--r--.github/actions/check-runtime-library/action.yml9
-rw-r--r--.github/actions/common-variables/action.yml17
-rw-r--r--.github/actions/download-boost/action.yml5
-rw-r--r--.github/actions/run-example-boost/action.yml13
-rw-r--r--.github/actions/software-environment/action.yml17
-rw-r--r--.github/workflows/cygwin_static_libstdc++.yml81
9 files changed, 11 insertions, 149 deletions
diff --git a/.github/actions/build-boost/action.yml b/.github/actions/build-boost/action.yml
index 2a47ea4..fdd4fdc 100644
--- a/.github/actions/build-boost/action.yml
+++ b/.github/actions/build-boost/action.yml
@@ -36,11 +36,6 @@ runs:
Remove-Variable libraries
}
- if ($env:CI_HOST_CYGWIN) {
- $python = 'python3'
- $boost_dir = cygpath.exe -ua $boost_dir
- }
-
& $python `
-m project.boost.build `
--toolset '${{ inputs.toolset }}' `
diff --git a/.github/actions/build-example/action.yml b/.github/actions/build-example/action.yml
index 8d684c1..7a77582 100644
--- a/.github/actions/build-example/action.yml
+++ b/.github/actions/build-example/action.yml
@@ -42,15 +42,6 @@ runs:
$install_dir = '${{ steps.install-dir.outputs.path }}'
$boost_dir = '${{ inputs.boost-dir }}'
- if ($env:CI_HOST_CYGWIN) {
- $python = 'python3'
- $src_dir = cygpath.exe -ua $src_dir
- $install_dir = cygpath.exe -ua $install_dir
- if ($boost_dir) {
- $boost_dir = cygpath.exe -ua $boost_dir
- }
- }
-
$args = @(
'--install',
$install_dir,
diff --git a/.github/actions/check-boost-bootstrapped/action.yml b/.github/actions/check-boost-bootstrapped/action.yml
index cd901cc..fa96575 100644
--- a/.github/actions/check-boost-bootstrapped/action.yml
+++ b/.github/actions/check-boost-bootstrapped/action.yml
@@ -32,9 +32,7 @@ runs:
$exists_plain = Test-Path $path -Type Leaf
$exists_exe = Test-Path "${path}.exe" -Type Leaf
- $exists = if ($env:CI_HOST_CYGWIN) {
- $exists_plain -or $exists_exe
- } elseif ($env:CI_HOST_WINDOWS) {
+ $exists = if ($env:CI_HOST_WINDOWS) {
$exists_exe
} else {
$exists_plain
diff --git a/.github/actions/check-runtime-library/action.yml b/.github/actions/check-runtime-library/action.yml
index 32d2246..a112687 100644
--- a/.github/actions/check-runtime-library/action.yml
+++ b/.github/actions/check-runtime-library/action.yml
@@ -130,16 +130,9 @@ runs:
$windows_forbidden = @()
}
}
- # Linking libstdc++ statically on Cygwin is broken, see the
- # cygwin_static_libstdc++.yml workflow.
- $cygwin_forbidden = @('msvcrt.dll')
$linux_forbidden = @()
- if ($env:CI_TARGET_CYGWIN) {
- Do-ValidateLinkedLibraries `
- -Actual $Actual `
- -Forbidden $cygwin_forbidden
- } elseif ($env:CI_TARGET_WINDOWS) {
+ if ($env:CI_TARGET_WINDOWS) {
Do-ValidateLinkedLibraries `
-Actual $Actual `
-Forbidden $windows_forbidden
diff --git a/.github/actions/common-variables/action.yml b/.github/actions/common-variables/action.yml
index 3d40cdd..3b197da 100644
--- a/.github/actions/common-variables/action.yml
+++ b/.github/actions/common-variables/action.yml
@@ -4,30 +4,23 @@ inputs:
toolset:
description: Toolset used
required: true
- cygwin:
- description: Targeting Cygwin
- required: false
- default: 0
runs:
using: composite
steps:
- run: |
New-Variable toolset -Value '${{ inputs.toolset }}' -Option Constant
- New-Variable cygwin -Value ('${{ inputs.cygwin }}' -eq '1') -Option Constant
New-Variable os -Value '${{ runner.os }}' -Option Constant
New-Variable host_linux -Value ($os -eq 'Linux') -Option Constant
- New-Variable host_cygwin -Value $cygwin -Option Constant
- New-Variable host_windows -Value ($os -eq 'Windows' -and !$host_cygwin) -Option Constant
+ New-Variable host_windows -Value ($os -eq 'Windows') -Option Constant
New-Variable mingw -Value ($toolset -eq 'mingw' -or ($host_windows -and $toolset -eq 'gcc')) -Option Constant
New-Variable target_linux -Value ($host_linux -and !$mingw) -Option Constant
- New-Variable target_cygwin -Value ($host_cygwin -and !$mingw) -Option Constant
New-Variable target_windows -Value ($mingw -or $host_windows) -Option Constant
- New-Variable target_pe -Value ($target_windows -or $target_cygwin) -Option Constant
+ New-Variable target_pe -Value $target_windows -Option Constant
New-Variable target_elf -Value $target_linux -Option Constant
function Set-BoolVar {
@@ -57,11 +50,9 @@ runs:
}
Set-BoolVar 'CI_HOST_LINUX' $host_linux
- Set-BoolVar 'CI_HOST_CYGWIN' $host_cygwin
Set-BoolVar 'CI_HOST_WINDOWS' $host_windows
Set-BoolVar 'CI_MINGW' $mingw
Set-BoolVar 'CI_TARGET_LINUX' $target_linux
- Set-BoolVar 'CI_TARGET_CYGWIN' $target_cygwin
Set-BoolVar 'CI_TARGET_WINDOWS' $target_windows
Set-BoolVar 'CI_TARGET_PE' $target_pe
@@ -70,8 +61,8 @@ runs:
$lib_prefix = 'lib'
$lib_ext = if ($target_windows -and -not $mingw) { '.lib' } else { '.a' }
- $dll_prefix = if ($target_windows -and -not $mingw) { '' } elseif ($target_cygwin) { 'cyg' } else { 'lib' }
- $dll_ext = if ($target_windows -or $target_cygwin) { '.dll' } else { '.so' }
+ $dll_prefix = if ($target_windows -and -not $mingw) { '' } else { 'lib' }
+ $dll_ext = if ($target_windows) { '.dll' } else { '.so' }
$exe_ext = if ($target_pe) { '.exe' } else { '' }
diff --git a/.github/actions/download-boost/action.yml b/.github/actions/download-boost/action.yml
index 7e15075..05f6bf3 100644
--- a/.github/actions/download-boost/action.yml
+++ b/.github/actions/download-boost/action.yml
@@ -42,10 +42,5 @@ runs:
$args += '--no-retry'
}
- if ($env:CI_HOST_CYGWIN) {
- $python = 'python3'
- $cache_dir = cygpath.exe -ua $cache_dir
- }
-
& $python -m project.boost.download --cache $cache_dir $args -- $env:BOOST_VERSION
shell: pwsh
diff --git a/.github/actions/run-example-boost/action.yml b/.github/actions/run-example-boost/action.yml
index 0dd9f44..0fd05ed 100644
--- a/.github/actions/run-example-boost/action.yml
+++ b/.github/actions/run-example-boost/action.yml
@@ -19,23 +19,14 @@ runs:
$absolute_test = Join-Path (Get-Location).Path 'test.txt'
$exe_path = (Join-Path $path 'bin' 'foo')
- if (-not $env:CI_TARGET_CYGWIN) {
- $exe_path += $env:CI_EXE_EXT
- }
-
- $argv0 = $exe_path
- if ($env:CI_TARGET_CYGWIN) {
- # Apparently, Cygwin programs convert argv[0] when executing native
- # programs or being executed by them.
- $argv0 = cygpath.exe -ua $argv0
- }
+ $exe_path += $env:CI_EXE_EXT
$actual = & $exe_path $relative_test
echo 'Actual output:'
echo $actual
- $expected = $argv0,$absolute_test
+ $expected = $exe_path,$absolute_test
echo 'Expected output:'
echo $expected
diff --git a/.github/actions/software-environment/action.yml b/.github/actions/software-environment/action.yml
index 872449d..9dd1486 100644
--- a/.github/actions/software-environment/action.yml
+++ b/.github/actions/software-environment/action.yml
@@ -26,9 +26,7 @@ runs:
function Print-Info {
param(
[Parameter(Mandatory=$true)]
- [string] $name,
- [Parameter()]
- [string] $exe
+ [string] $name
)
echo ''
@@ -36,11 +34,7 @@ runs:
echo $name
echo '------------------------------------------------------------'
- if (!$exe) {
- $exe = $name
- }
-
- $full_path = Get-Command $exe -ErrorAction SilentlyContinue
+ $full_path = Get-Command $name -ErrorAction SilentlyContinue
if ($full_path) {
$full_path = $full_path.Path
echo "Location: $full_path"
@@ -51,12 +45,7 @@ runs:
}
}
- $python = 'python'
- if ($env:CI_HOST_CYGWIN) {
- $python = 'python3'
- }
-
- Print-Info 'python' $python
+ Print-Info 'python'
Print-Info 'cmake'
Print-Info 'make'
Print-Info 'mingw32-make'
diff --git a/.github/workflows/cygwin_static_libstdc++.yml b/.github/workflows/cygwin_static_libstdc++.yml
deleted file mode 100644
index aa5631d..0000000
--- a/.github/workflows/cygwin_static_libstdc++.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-# -static-libstdc++ is broken on Cygwin for some reason, as this workflow tries
-# to demonstrate. I don't know why exactly, but I'm not the only one with this
-# problem:
-#
-# * https://stackoverflow.com/q/46854365/514684
-# * https://sourceforge.net/p/stlplus/discussion/345536/thread/48c7fc9c17/?limit=25
-
-name: Cygwin & -static-libstdc++
-
-on:
- #push:
- #pull_request:
- schedule:
- # Weekly, at 5:30 AM on Saturday (somewhat randomly chosen).
- - cron: '30 5 * * 6'
- workflow_dispatch:
-
-jobs:
- test:
- runs-on: windows-latest
-
- name: Test
-
- defaults:
- run:
- shell: pwsh
-
- steps:
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Clean up PATH
- uses: egor-tensin/cleanup-path@v3
- if: runner.os == 'Windows'
-
- - name: Set common variables
- uses: ./.github/actions/common-variables
- with:
- toolset: gcc
- cygwin: 1
-
- - name: Install Cygwin
- uses: egor-tensin/setup-cygwin@v3
-
- - name: Install GCC
- uses: egor-tensin/setup-gcc@v1
- with:
- cygwin: 1
-
- - name: Set up software environment
- uses: ./.github/actions/software-environment
- with:
- toolset: gcc
-
- - name: test.cpp
- run: |
- $src = @"
- #include <stdexcept>
-
- int main() {
- std::runtime_error x{"x"};
- std::runtime_error y{x};
- return 0;
- }
- "@
-
- echo $src > test.cpp
-
- - name: Build w/ -static-libstdc++
- run: C:\tools\cygwin\bin\g++.exe -static-libstdc++ -o test test.cpp
- continue-on-error: true
-
- - name: Should fail
- run: $(Test-Path test.exe -Type Leaf) -and $(throw "test.exe shouldn't have been built")
-
- - name: Build w/ --allow-multiple-definition
- run: C:\tools\cygwin\bin\g++.exe '-Wl,--allow-multiple-definition' -static-libstdc++ -o test test.cpp
- continue-on-error: true
-
- - name: Should succeed
- run: $(Test-Path test.exe -Type Leaf) -or $(throw "test.exe should have been built")