diff --git a/.github/workflows/node-python-matrix.yaml b/.github/workflows/node-python-matrix.yaml new file mode 100644 index 00000000..6200e88d --- /dev/null +++ b/.github/workflows/node-python-matrix.yaml @@ -0,0 +1,794 @@ +# This workflow will build and test pframes component (core, nodejs, wasm) + +name: Build and Test PFrames component + +on: + workflow_call: + inputs: + # + # Common settings + # + app-name: + description: | + Application name in human-readable form. + As it is supposed to be shown in messages + type: string + required: false + default: ${{ github.repository }} + + app-name-slug: + description: | + Application name slug (part of release file name) + type: string + required: true + + # + # Checkout settings + # + checkout-submodules: + description: | + 'Submodules' mode for 'actions/checkout' action + '', 'false' - disable submodules support + 'true' - checkout submodules + 'recursive' - checkout submodules recursive + type: string + required: false + default: "" + + # + # Environment settings + # + env: + description: | + custom environment variables to set for all jobs in workflow + as JSON-encoded map: + { "MY_VAR_1": "awesome value", + "VARIABLE_2": "not so awesome :)" } + + This input's envs are merged with secrets.env + This input's envs have lower priority compared than secrets.env + type: string + required: false + default: "{}" + + # + # Node settings + # + node-version: + description: | + Node version to use + type: string + required: true + + # + # Python settings + # + python-version: + description: | + Python version to use: i.e. '3.12' + type: string + required: true + + # + # Cache control + # + cache-version: + description: | + Simple hack, that allows to 'reset' cache for particular job. + + Just change the value of this parameter and the next run will + not find build cache and will have to start from scratch. + + type: string + required: false + default: "v1" + + cache-paths: + description: | + Additional paths to be cached after build + type: string + required: false + default: "" + + # + # Matrix control + # + matrix: + description: | + List of agents to run CI jobs: [ {"os": "ubuntu-latest", "arch": "amd64"}, ... ] + type: string + required: false + default: | + [ + {"os":"windows-latest", "arch":"amd64"}, + + {"os":"ubuntu-22.04", "arch":"amd64"}, + {"os":"ubuntu-arm64", "arch":"arm64"}, + + {"os":"macos-13", "arch":"amd64"}, + {"os":"macos-14", "arch":"arm64"} + ] + + # + # Build control + # + build-script-name: + description: | + The name of a build script + type: string + required: true + default: "build" + + build-artifacts: + description: | + List of paths to collect as build artifacts after 'build' step. + Supports globbing (**/my-file.bin, **/*.bin). + type: string + required: false + default: "" + + # + # Test control + # + test: + description: | + Run unit tests + type: boolean + required: false + default: false + + test-script-name: + description: | + The name of npm test script + e.g. 'test:e2e', 'test:main' etc. + type: string + required: false + default: "test" + + # + # NPM registry settings + # + + registry-url: + description: | + The npm registry url to set up for auth + and publication of the node js package. + type: string + required: false + default: "https://npm.pkg.github.com" + + scope: + description: | + Scope for authenticating against npm registries. + type: string + required: false + default: ${{ format('{0}{1}', '@', github.repository_owner) }} + + always-auth: + description: | + Set always-auth in npmrc. + type: string + required: false + default: "false" + + npmrc-config: + description: | + Generates a .npmrc file based on provided configuration. + type: string + required: false + + # + # Codesign control + # + + sign-binaries: + description: | + List of globbing patterns that match files to be signed after build step. + When built, the selected files will be signed with methods appropriate for current operating system. + type: string + required: false + default: "" + + notarize-paths: + description: | + List of globbing patterns that match files and directories to be notarized. + Matched files would be notarized for releases. + type: string + required: false + default: "" + + # + # Distribution control + # + + publish-script-name: + description: | + Run 'npm run