aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/actions
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-17 14:06:33 +0500
committerEgor Tensin <egor@tensin.name>2026-10-17 14:21:07 +0500
commit00e9f83b07d700342e7143bf0cc6245d7323501c (patch)
tree6dc67c5dda61e16889e9b94bb2670f1592c716c5 /.github/actions
parentconsistent short-vs-long parameter ordering (diff)
downloadcmake-common-00e9f83b07d700342e7143bf0cc6245d7323501c.tar.gz
cmake-common-00e9f83b07d700342e7143bf0cc6245d7323501c.zip
fix some zizmor warnings
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/build-boost/action.yml18
-rw-r--r--.github/actions/build-example/action.yml27
-rw-r--r--.github/actions/check-arch/action.yml9
-rw-r--r--.github/actions/check-boost-libraries/action.yml18
-rw-r--r--.github/actions/check-runtime-library/action.yml6
-rw-r--r--.github/actions/check-symbols/action.yml9
-rw-r--r--.github/actions/common-variables/action.yml22
-rw-r--r--.github/actions/download-boost/action.yml10
-rw-r--r--.github/actions/run-example-boost/action.yml6
-rw-r--r--.github/actions/run-example/action.yml6
-rw-r--r--.github/actions/software-environment/action.yml8
11 files changed, 82 insertions, 57 deletions
diff --git a/.github/actions/build-boost/action.yml b/.github/actions/build-boost/action.yml
index 71154b7..2c6f446 100644
--- a/.github/actions/build-boost/action.yml
+++ b/.github/actions/build-boost/action.yml
@@ -22,15 +22,21 @@ inputs:
runs:
using: composite
steps:
- - run: |
+ - env:
+ ARG_BOOST_DIR: ${{ inputs.boost-dir }}
+ ARG_LIBRARIES: ${{ inputs.libraries }}
+ ARG_TOOLSET: ${{ inputs.toolset }}
+ ARG_PLATFORM: ${{ inputs.platform }}
+ ARG_CONFIGURATION: ${{ inputs.configuration }}
+ run: |
$python = 'python'
- $boost_dir = '${{ inputs.boost-dir }}'
+ $boost_dir = $env:ARG_BOOST_DIR
if (-not $boost_dir) {
$boost_dir = $env:BOOST_DIR
}
- $libraries = '${{ inputs.libraries }}'
+ $libraries = $env:ARG_LIBRARIES
$libraries = $libraries.Split(' ')
if (-not $libraries) {
Remove-Variable libraries
@@ -38,9 +44,9 @@ runs:
& $python `
-m project.boost.build `
- --toolset '${{ inputs.toolset }}' `
- --platform '${{ inputs.platform }}' `
- --configuration '${{ inputs.configuration }}' `
+ --toolset $env:ARG_TOOLSET `
+ --platform $env:ARG_PLATFORM `
+ --configuration $env:ARG_CONFIGURATION `
-- `
$boost_dir `
$libraries
diff --git a/.github/actions/build-example/action.yml b/.github/actions/build-example/action.yml
index 9909398..cd49c28 100644
--- a/.github/actions/build-example/action.yml
+++ b/.github/actions/build-example/action.yml
@@ -22,32 +22,41 @@ inputs:
outputs:
install-dir:
description: Installation directory
- value: '${{ steps.install-dir.outputs.path }}'
+ value: ${{ steps.install-dir.outputs.path }}
runs:
using: composite
steps:
- id: install-dir
+ env:
+ ARG_SRC_DIR: ${{ inputs.src-dir }}
run: |
- $src_dir = Resolve-Path '${{ inputs.src-dir }}'
+ $src_dir = Resolve-Path $env:ARG_SRC_DIR
$project_name = Split-Path $src_dir -Leaf
$install_dir = Join-Path (Split-Path $env:GITHUB_WORKSPACE) "install_$project_name"
echo "path=$install_dir" >> $env:GITHUB_OUTPUT
shell: pwsh
- - run: |
+ - env:
+ ARG_SRC_DIR: ${{ inputs.src-dir }}
+ ARG_BOOST_DIR: ${{ inputs.boost-dir }}
+ ARG_TOOLSET: ${{ inputs.toolset }}
+ ARG_PLATFORM: ${{ inputs.platform }}
+ ARG_CONFIGURATION: ${{ inputs.configuration }}
+ INSTALL_DIR: ${{ steps.install-dir.outputs.path }}
+ run: |
$python = 'python'
- $src_dir = '${{ inputs.src-dir }}'
- $install_dir = '${{ steps.install-dir.outputs.path }}'
- $boost_dir = '${{ inputs.boost-dir }}'
+ $src_dir = $env:ARG_SRC_DIR
+ $install_dir = $env:INSTALL_DIR
+ $boost_dir = $env:ARG_BOOST_DIR
$args = @(
'--install',
$install_dir,
'--platform',
- '${{ inputs.platform }}',
+ $env:ARG_PLATFORM,
'--configuration',
- '${{ inputs.configuration }}',
+ $env:ARG_CONFIGURATION,
'--toolset',
- '${{ inputs.toolset }}'
+ $env:ARG_TOOLSET
)
if ($boost_dir) {
diff --git a/.github/actions/check-arch/action.yml b/.github/actions/check-arch/action.yml
index b8e4d64..3dce1d1 100644
--- a/.github/actions/check-arch/action.yml
+++ b/.github/actions/check-arch/action.yml
@@ -10,14 +10,17 @@ inputs:
runs:
using: composite
steps:
- - run: |
+ - env:
+ ARG_PATH: ${{ inputs.path }}
+ ARG_EXPECTED: ${{ inputs.expected }}
+ run: |
$script_path = if ($env:CI_TARGET_PE) {
Join-Path $env:GITHUB_WORKSPACE 'test' 'scripts' 'verify_arch.ps1'
} else {
Join-Path $env:GITHUB_WORKSPACE 'test' 'scripts' 'verify_arch.sh'
}
- $exe_path = (Join-Path '${{ inputs.path }}' 'bin' 'foo') + $env:CI_EXE_EXT
+ $exe_path = (Join-Path $env:ARG_PATH 'bin' 'foo') + $env:CI_EXE_EXT
- & $script_path $exe_path '${{ inputs.expected }}'
+ & $script_path $exe_path $env:ARG_EXPECTED
shell: pwsh
diff --git a/.github/actions/check-boost-libraries/action.yml b/.github/actions/check-boost-libraries/action.yml
index e41e028..58d9f49 100644
--- a/.github/actions/check-boost-libraries/action.yml
+++ b/.github/actions/check-boost-libraries/action.yml
@@ -18,19 +18,21 @@ inputs:
runs:
using: composite
steps:
- - run: |
- $boost_dir = '${{ inputs.boost-dir }}'
+ - env:
+ ARG_BOOST_DIR: ${{ inputs.boost-dir }}
+ ARG_LIBRARIES: ${{ inputs.libraries }}
+ ARG_PLATFORM: ${{ inputs.platform }}
+ ARG_CONFIGURATION: ${{ inputs.configuration }}
+ run: |
+ $boost_dir = $env:ARG_BOOST_DIR
if (-not $boost_dir) {
$boost_dir = $env:BOOST_DIR
}
- $libraries = '${{ inputs.libraries }}'
- $libraries = $libraries.Split(' ')
+ $libraries = $env:ARG_LIBRARIES.Split(' ')
+ $configuration = $env:ARG_CONFIGURATION.ToLower()
- $configuration = '${{ inputs.configuration }}'
- $configuration = $configuration.ToLower()
-
- $installdir = Join-Path 'install_dir' '${{ inputs.platform }}' $configuration
+ $installdir = Join-Path 'install_dir' $env:ARG_PLATFORM $configuration
$librarydir = Join-Path $boost_dir $installdir 'lib'
function Get-FileStubs {
diff --git a/.github/actions/check-runtime-library/action.yml b/.github/actions/check-runtime-library/action.yml
index a112687..be4823d 100644
--- a/.github/actions/check-runtime-library/action.yml
+++ b/.github/actions/check-runtime-library/action.yml
@@ -7,8 +7,10 @@ inputs:
runs:
using: composite
steps:
- - run: |
- New-Variable path -Value '${{ inputs.path }}' -Option Constant
+ - env:
+ ARG_PATH: ${{ inputs.path }}
+ run: |
+ $path = $env:ARG_PATH
function Parse-DllLine {
param(
diff --git a/.github/actions/check-symbols/action.yml b/.github/actions/check-symbols/action.yml
index 3681f52..50a6843 100644
--- a/.github/actions/check-symbols/action.yml
+++ b/.github/actions/check-symbols/action.yml
@@ -10,8 +10,11 @@ inputs:
runs:
using: composite
steps:
- - run: |
- $install_dir = '${{ inputs.path }}'
+ - env:
+ ARG_PATH: ${{ inputs.path }}
+ ARG_EXPECTED: ${{ inputs.expected }}
+ run: |
+ $install_dir = $env:ARG_PATH
$bin_dir = Join-Path $install_dir 'bin'
$lib_dir = Join-Path $install_dir 'lib'
@@ -21,7 +24,7 @@ runs:
throw "Verifying symbols for PE executables is not implemented"
}
- ConvertFrom-Json '${{ inputs.expected }}' | %{
+ ConvertFrom-Json $env:ARG_EXPECTED | %{
$target = $_.target
$type = $_.type
diff --git a/.github/actions/common-variables/action.yml b/.github/actions/common-variables/action.yml
index 3b197da..af86aff 100644
--- a/.github/actions/common-variables/action.yml
+++ b/.github/actions/common-variables/action.yml
@@ -7,21 +7,21 @@ inputs:
runs:
using: composite
steps:
- - run: |
- New-Variable toolset -Value '${{ inputs.toolset }}' -Option Constant
+ - env:
+ ARG_TOOLSET: ${{ inputs.toolset }}
+ run: |
+ $toolset = $env:ARG_TOOLSET
- New-Variable os -Value '${{ runner.os }}' -Option Constant
+ $host_linux = '${{ runner.os }}' -eq 'Linux'
+ $host_windows = '${{ runner.os }}' -eq 'Windows'
- New-Variable host_linux -Value ($os -eq 'Linux') -Option Constant
- New-Variable host_windows -Value ($os -eq 'Windows') -Option Constant
+ $mingw = $toolset -eq 'mingw' -or ($host_windows -and $toolset -eq 'gcc')
- New-Variable mingw -Value ($toolset -eq 'mingw' -or ($host_windows -and $toolset -eq 'gcc')) -Option Constant
+ $target_linux = $host_linux -and !$mingw
+ $target_windows = $mingw -or $host_windows
- New-Variable target_linux -Value ($host_linux -and !$mingw) -Option Constant
- New-Variable target_windows -Value ($mingw -or $host_windows) -Option Constant
-
- New-Variable target_pe -Value $target_windows -Option Constant
- New-Variable target_elf -Value $target_linux -Option Constant
+ $target_pe = $target_windows
+ $target_elf = $target_linux
function Set-BoolVar {
param(
diff --git a/.github/actions/download-boost/action.yml b/.github/actions/download-boost/action.yml
index 05f6bf3..2fea082 100644
--- a/.github/actions/download-boost/action.yml
+++ b/.github/actions/download-boost/action.yml
@@ -11,7 +11,9 @@ inputs:
runs:
using: composite
steps:
- - run: echo 'BOOST_VERSION=${{ inputs.boost-version }}' >> $env:GITHUB_ENV
+ - env:
+ ARG_BOOST_VERSION: ${{ inputs.boost-version }}
+ run: echo "BOOST_VERSION=$env:ARG_BOOST_VERSION" >> $env:GITHUB_ENV
shell: pwsh
- run: |
$parent_dir = Split-Path $env:GITHUB_WORKSPACE
@@ -23,7 +25,9 @@ runs:
$dir = Join-Path $env:BOOST_CACHE_DIR $dir_name
echo "BOOST_DIR=$dir" >> $env:GITHUB_ENV
shell: pwsh
- - run: |
+ - env:
+ ARG_NO_RETRY: ${{ inputs.no-retry }}
+ run: |
echo ''
echo '----------------------------------------------------------------'
echo "BOOST_VERSION: $env:BOOST_VERSION"
@@ -35,7 +39,7 @@ runs:
$python = 'python'
$cache_dir = $env:BOOST_CACHE_DIR
- $no_retry = '${{ inputs.no-retry }}' -eq '1'
+ $no_retry = $env:ARG_NO_RETRY -eq '1'
$args = @()
if ($no_retry) {
diff --git a/.github/actions/run-example-boost/action.yml b/.github/actions/run-example-boost/action.yml
index 0fd05ed..c2933f1 100644
--- a/.github/actions/run-example-boost/action.yml
+++ b/.github/actions/run-example-boost/action.yml
@@ -7,8 +7,10 @@ inputs:
runs:
using: composite
steps:
- - run: |
- New-Variable path -Value '${{ inputs.path }}' -Option Constant
+ - env:
+ ARG_PATH: ${{ inputs.path }}
+ run: |
+ $path = $env:ARG_PATH
if ($env:CI_HOST_LINUX -and -not $env:CI_TARGET_LINUX) {
echo 'Not going to do that on Linux/MinGW'
diff --git a/.github/actions/run-example/action.yml b/.github/actions/run-example/action.yml
index 5300ab9..9d3f90f 100644
--- a/.github/actions/run-example/action.yml
+++ b/.github/actions/run-example/action.yml
@@ -7,8 +7,10 @@ inputs:
runs:
using: composite
steps:
- - run: |
- New-Variable path -Value '${{ inputs.path }}' -Option Constant
+ - env:
+ ARG_PATH: ${{ inputs.path }}
+ run: |
+ $path = $env:ARG_PATH
if ($env:CI_HOST_LINUX -and -not $env:CI_TARGET_LINUX) {
echo 'Not going to do that on Linux/MinGW'
diff --git a/.github/actions/software-environment/action.yml b/.github/actions/software-environment/action.yml
index 9dd1486..25d3ce5 100644
--- a/.github/actions/software-environment/action.yml
+++ b/.github/actions/software-environment/action.yml
@@ -1,13 +1,5 @@
name: Set up software environment
description: Set up software paths and versions
-inputs:
- toolset:
- description: Toolset to use
- required: true
- platform:
- description: Target platform
- required: false
- default: x64
runs:
using: composite
steps: