Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix only works with cmake, but I suspect other scripting languages
would have similar problems. I'm hoping there is a better solution, but
something like this does work for my particular problem.
The problem is having the first line of scripts be: Path="xxx:${PATH}"
where xxx is rc.ExtraPath, does not work for all scripting languages.
For example: 'cmake -P {0}' is used by Cristian Adam HelloWorld:
https://github.com/cristianadam/HelloWorld/blob/master/.github/workflows/build_cmake.yml#:~:text=shell:
Here is some test code:
name: CMake Build Matrix
on: [push, pull_request]
env:
CMAKE_VERSION: 3.18.3
NINJA_VERSION: 1.10.1
BUILD_TYPE: Release
CCACHE_VERSION: 3.7.7
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu Latest GCC",
artifact: "Linux.7z",
os: ubuntu-latest,
cc: "gcc",
cxx: "g++",
}
Executing the above results in the following error:
$ ~/prgs/nektos/forks/act/act
[CMake Build Matrix/Ubuntu Latest GCC] 🧪 Matrix: map[config:map[artifact:Linux.7z cc:gcc cxx:g++ name:Ubuntu Latest GCC os:ubuntu-latest]]
[CMake Build Matrix/Ubuntu Latest GCC] 🚀 Start image=ubuntu-with-hello
[CMake Build Matrix/Ubuntu Latest GCC] 🐳 docker run image=ubuntu-with-hello entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CMake Build Matrix/Ubuntu Latest GCC] 🐳 docker cp src=/home/wink/prgs/cmake/projects/gha-cmake-HelloWorld/. dst=/github/workspace
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run actions/checkout@v1
[CMake Build Matrix/Ubuntu Latest GCC] ✅ Success - actions/checkout@v1
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run Test bash
| Using host CMake version: 3.18.3
[CMake Build Matrix/Ubuntu Latest GCC] ✅ Success - Test bash
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run Test cmake
| CMake Error at /github/workflow/2:1:
| Parse error. Expected a command name, got unquoted argument with text
| "PATH=":${PATH}"".
|
|
| CMake Error: Error processing file: /github/workflow/2
[CMake Build Matrix/Ubuntu Latest GCC] ❌ Failure - Test cmake
Error: exit with
FAILURE
: 1With this change the output is:
$ ~/prgs/nektos/forks/act/act
[CMake Build Matrix/Ubuntu Latest GCC] 🧪 Matrix: map[config:map[artifact:Linux.7z cc:gcc cxx:g++ name:Ubuntu Latest GCC os:ubuntu-latest]]
[CMake Build Matrix/Ubuntu Latest GCC] 🚀 Start image=ubuntu-with-hello
[CMake Build Matrix/Ubuntu Latest GCC] 🐳 docker run image=ubuntu-with-hello entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CMake Build Matrix/Ubuntu Latest GCC] 🐳 docker cp src=/home/wink/prgs/cmake/projects/gha-cmake-HelloWorld/. dst=/github/workspace
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run actions/checkout@v1
[CMake Build Matrix/Ubuntu Latest GCC] ✅ Success - actions/checkout@v1
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run Test bash
| Using host CMake version: 3.18.3
[CMake Build Matrix/Ubuntu Latest GCC] ✅ Success - Test bash
[CMake Build Matrix/Ubuntu Latest GCC] ⭐ Run Test cmake
| -- hello from cmake script
[CMake Build Matrix/Ubuntu Latest GCC] ✅ Success - Test cmake