perforce / setup-p4 Goto Github PK
View Code? Open in Web Editor NEW[Community Supported] Perforce Helix Core Actions
Home Page: https://perforce.com
License: Other
[Community Supported] Perforce Helix Core Actions
Home Page: https://perforce.com
License: Other
GitHub Actions is deprecating set-output
behaviour. This task will stop working after 31st May 2023. Recommended way is to use new GITHUB_OUTPUT
environment variable instead.
Here is a link to the announcement: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
https://github.blog/changelog/2023-05-04-github-actions-all-actions-will-run-on-node16-instead-of-node12/
As of May 18th, all actions will be forced to run run under node.js v16
No warnings when the action is used in a build.
Warning when this action is used in a build:
Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: perforce/setup-p4@v1. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
Add a troubleshooting section to the README and update the bug template to reference the new section
On long submits without the -I
arguments
it will look like the action is "frozen". Include a log that we recommend including the -I
argument so the user can see a progress bar.
After merging in #50 integration tests started failing with the following error:
(node:1684) UnhandledPromiseRejectionWarning: TypeError: arguments.includes is not a function
at main (/home/runner/work/setup-p4-example-build-template/setup-p4-example-build-template/.github/actions/setup-p4/dist/index.js:13710:19)
at setupP4 (/home/runner/work/setup-p4-example-build-template/setup-p4-example-build-template/.github/actions/setup-p4/dist/index.js:13646:3)
at /home/runner/work/setup-p4-example-build-template/setup-p4-example-build-template/.github/actions/setup-p4/dist/index.js:13793:1
at /home/runner/work/setup-p4-example-build-template/setup-p4-example-build-template/.github/actions/setup-p4/dist/index.js:13795:3
at Object.<anonymous> (/home/runner/work/setup-p4-example-build-template/setup-p4-example-build-template/.github/actions/setup-p4/dist/index.js:13798:12)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:10[27](https://github.com/perforce/setup-p4-example-build-template/runs/5500668658?check_suite_focus=true#step:6:27):10)
at Module.load (internal/modules/cjs/loader.js:863:[32](https://github.com/perforce/setup-p4-example-build-template/runs/5500668658?check_suite_focus=true#step:6:32))
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
(node:1684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Here is an example.
The setup
input was used originally to ease some of the javascript but it is really unnecessary. Now that we are getting close to releasing and we are focusing on ease of use for the end user we should remove this input.
The new plan is to always run the setup routine and rely on caching to keep step execution fast. The different use cases that need to be supported are:
p4_version
is not changed then the default version will get installed with the very first setup-p4
stepp4_version
is changed in the first step we will install the requested versionp4_version
is changed in a subsequent step we will download and install the secondary versionp4_version
is left as default for step A, changed in step B, and again left as default in step C then in step C we should use the cached version in the step A smoke:
name: smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: p4 info 21.2
uses: ./
with:
command: -V
smoke:
name: smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: p4 info 20.1
uses: ./
with:
p4_version: 20.1
command: -V
smoke:
name: smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: p4 info 21.2
uses: ./
with:
command: -V
- name: p4 info 20.1
uses: ./
with:
p4_version: 20.1
command: -V
smoke:
name: smoke
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- name: p4 info 21.2
uses: ./
with:
command: -V
- name: p4 info 20.1
uses: ./
with:
p4_version: 20.1
command: -V
- name: p4 info 21.2
uses: ./
with:
command: -V
p4 gets installed on self hosted windows runner
Expand-Archive : is not a supported archive file format. .zip is the only supported archive file format.
- name: p4 setup
id: setup
with:
command: setup
p4_version: 21.2
self hosted windows 2019 runner
Depending on what arguments are used it is possible p4
will expect user input forever. An example is the following:
- name: p4 submit
uses: setup-p4
id: submit
env:
P4CLIENT: ci
with:
command: submit
global_options: -I
working_directory: "C:/Users/perforce/Perforce/ci/Game/"
Without -d
being included in arguments
p4 expects input from an interactive user.
Dependabot created PR currently do not have access to secrets which causes our integration tests to fail.
For the original js implementation I hijacked command: setup
attribute to perform the installation, caching, etc of p4
. It would be better to remove this and perform setup when p4_version
is included.
After dropping to the shell the expanded working directory on Linux was set to expanded working directory is set to: .%0A
. I added .trim()
to remove leading and trailing whitespace.
After dropping to the shell the expanded working directory on windwos was set to: 'working_directory' set to "."
. I added .replace(/['"]+/g, '')
to remove single and double quotes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.