mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[PR #405] [CLOSED] Special handling of cmake scripts #1436
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1436
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/405
Author: @winksaville
Created: 11/1/2020
Status: ❌ Closed
Base:
master← Head:Special-handling-cmake-scripts📝 Commits (1)
4820769Special handling of cmake scripts📊 Changes
1 file changed (+6 additions, -3 deletions)
View changed files
📝
pkg/runner/step_context.go(+6 -3)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.