Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build wrappers on Github Actions #2267

Merged
merged 96 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
1c1f6e5
First action attempt
LaPeste Feb 25, 2021
15a80ac
Wrong path to action
LaPeste Feb 25, 2021
7df6745
Renamed action
LaPeste Feb 25, 2021
dd7de5d
Sadly the action is brought back to do 1 thing only
LaPeste Feb 25, 2021
daf7487
Some mispelling
LaPeste Feb 25, 2021
957d11b
Created JS action to build wrapper
LaPeste Mar 1, 2021
02adbe4
Renamed folder in main.yml
LaPeste Mar 1, 2021
6bbc9bb
Reshuffled things
LaPeste Mar 2, 2021
b949fed
Hopefully nodejs 14 and not 12
LaPeste Mar 2, 2021
a278415
Few fixes
LaPeste Mar 2, 2021
41c72f6
Removed nodejs 14 stuff
LaPeste Mar 2, 2021
199a9fa
All compacted into index.js
LaPeste Mar 2, 2021
9c1f8ee
First iteration of build_wrappers action
LaPeste Mar 2, 2021
4ec814c
Added some info text
LaPeste Mar 2, 2021
9b9f97c
Forgot to update action path
LaPeste Mar 2, 2021
625a9aa
Moved from core.debug to core.info
LaPeste Mar 2, 2021
70ad2ed
Updated string to use template literals
LaPeste Mar 2, 2021
a1f8d68
Correct error to return success
LaPeste Mar 2, 2021
c4b6945
Forgot to build
LaPeste Mar 2, 2021
a13b145
I like it more with the dash
LaPeste Mar 2, 2021
8aed2fb
Forgot to build again
LaPeste Mar 2, 2021
c16c4d1
Fixed some checks on string content
LaPeste Mar 3, 2021
eada34d
Build forgotten
LaPeste Mar 3, 2021
9ba26c8
Live output for built cmd + removed exit code when error
LaPeste Mar 3, 2021
d06e75d
Reverted to cp.exec
LaPeste Mar 3, 2021
2457d4c
Better output folding
LaPeste Mar 3, 2021
d5eae6f
Check for error at caching
LaPeste Mar 3, 2021
1fdfcf5
Some fixes + lots of prints
LaPeste Mar 3, 2021
98f1219
Changed from exec to spawn
LaPeste Mar 3, 2021
18bee66
Try to fix spawn and env var
LaPeste Mar 3, 2021
53d19b0
Small improvements
LaPeste Mar 3, 2021
7f8989a
Async method should now be fixed
LaPeste Mar 4, 2021
96412da
Final test to check correctness
LaPeste Mar 4, 2021
53a6a43
Small code style changes
LaPeste Mar 4, 2021
7d274a9
First attempt at making caching and building general
LaPeste Mar 4, 2021
4ae20ce
Forgotten meta build action
LaPeste Mar 4, 2021
7174f12
Fixed some mispelling in commands in main
LaPeste Mar 4, 2021
e5f1ab1
Refactored lots of stuff
LaPeste Mar 5, 2021
2bf0ad5
Json in 1 line in main.yml workflow
LaPeste Mar 5, 2021
df9c5f7
Added test framework, added tests for input parsing, split utils in m…
LaPeste Mar 9, 2021
ecd348c
Added a TODO and better logging in spawned child
LaPeste Mar 9, 2021
b9ef36d
Removed hash options, it doesn't seem necessary
LaPeste Mar 10, 2021
8f1b69b
Unit test added for all common functionalities
LaPeste Mar 10, 2021
01769b2
Extracted main functionalities from action
LaPeste Mar 10, 2021
d68c1cc
Updated action.yml name and description
LaPeste Mar 11, 2021
db4e087
Folder rename
LaPeste Mar 11, 2021
7c31482
Small cleanup main.yml
LaPeste Mar 11, 2021
22f411c
Extrapolated core code in it's own folder
LaPeste Mar 11, 2021
4c02188
Forgotten to change path to action in workflow
LaPeste Mar 11, 2021
b437502
Fix path for action
LaPeste Mar 11, 2021
1229c89
This time path to action should be fixed
LaPeste Mar 11, 2021
0806f31
Minor fixes
LaPeste Mar 11, 2021
c5625c1
Temporary test with external repo for core code
LaPeste Mar 11, 2021
f435a04
Just a test with types in lib
LaPeste Mar 15, 2021
887f34d
Small error correction
LaPeste Mar 15, 2021
56c45f2
Test with checkout action
LaPeste Mar 15, 2021
3aee3fe
Attempt moving checkout js in same dist of build_executor
LaPeste Mar 15, 2021
a67a3a3
Test with double checkout
LaPeste Mar 15, 2021
d2e8ed9
Postponment of checkout action inclued
LaPeste Mar 15, 2021
7bf644e
Fixed some wrong build command
LaPeste Mar 15, 2021
53f0029
Added package folder (lib) and changed input parsing for paths
LaPeste Mar 15, 2021
148d9e4
Updated path to packages in main
LaPeste Mar 15, 2021
f65f62c
Added optional hash prefix
LaPeste Mar 16, 2021
2bcce0e
HashKey used as index by the cache function is now returned as output
LaPeste Mar 16, 2021
82c7e1c
Cmds in input aren't anymore a json array of json objects
LaPeste Mar 17, 2021
88cb081
Reshaped tasks.json, added scripts in package.json and updated struct…
LaPeste Mar 18, 2021
4f18e43
Eslinter and prettifier setup and run
LaPeste Mar 18, 2021
65c7b0a
Removed result struct and reintroduced exceptions
LaPeste Mar 18, 2021
12a9ecc
As far as I can go with the linter
LaPeste Mar 18, 2021
8511296
Made utils internal, linted and prettified action
LaPeste Mar 19, 2021
3f65ee8
Final adjustments for PR review
LaPeste Mar 19, 2021
691a444
Added one more test to check prefix on hash
LaPeste Mar 19, 2021
f12e192
Fixed wrongly passed hash prefix
LaPeste Mar 19, 2021
3f8b58f
Returned wrong value from main
LaPeste Mar 19, 2021
8c16d0d
Some rephrasing
LaPeste Mar 19, 2021
42f6b02
Improved comments
LaPeste Mar 19, 2021
290af10
Added settings for debugging source code and tests
LaPeste Mar 19, 2021
d77fefd
Reshaped hashing function to better account json structure + improved…
LaPeste Mar 22, 2021
8c73699
Rephrased a log
LaPeste Mar 22, 2021
1b87736
Final minor corrections before PR review
LaPeste Mar 22, 2021
9e36ada
Forgotten to build and lint/prettify
LaPeste Mar 22, 2021
8e78825
Better fail message
LaPeste Mar 23, 2021
40cf654
Improved input_parsing and expanded tests
LaPeste Mar 24, 2021
fc8dc3f
More unit testing, more safety checks and few other minor changes
LaPeste Mar 24, 2021
be9ecf9
Fixes for the GA package (#2306)
nirinchev Mar 25, 2021
743e252
Indent code with 4 spaces (#2307)
nirinchev Mar 25, 2021
4cff531
Simplified according to PR review
LaPeste Mar 25, 2021
df868fc
Fixed input in action
LaPeste Mar 25, 2021
63df1d7
Compacted code in only 1 file
LaPeste Mar 26, 2021
d756af7
Added options to debug typescript files directly
LaPeste Mar 26, 2021
8e8f746
Forgot to remove a comment
LaPeste Mar 26, 2021
d51ae0c
Migrate GA to a pure workflow (#2322)
nirinchev Apr 9, 2021
06bcff0
Remove the typescript action (#2326)
nirinchev Apr 9, 2021
8cf1ad8
remove some leftovers
nirinchev Apr 9, 2021
0a6ec39
Merge branch 'master' into ac/build-macos-wrappers-github-actions
nirinchev Apr 9, 2021
4e87b31
Remove process.sh
nirinchev Apr 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

results
tmp

# Build
public/css/main.css

# Coverage directory used by tools like istanbul
coverage
.nyc_output
coverage.*

# API keys and secrets
.env

# Dependency directory
node_modules
bower_components

# Optional npm cache directory
.npm

# Editors
.idea
*.iml

# OS metadata
.DS_Store
Thumbs.db

# ignore yarn.lock
yarn.lock

**/lib/*

# debug "symbols"
*.js.map
37 changes: 37 additions & 0 deletions .github/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"console": "integratedTerminal",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
//"preLaunchTask": "npm: distribute - actions/build_cache_executor",
"program": "${file}",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
},
{
"name": "mocha tests",
"type": "node",
"protocol": "inspector",
"request": "launch",
"console": "integratedTerminal",
"program": "${workspaceRoot}/ga_packages/build_cache_executor/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"cwd": "${workspaceRoot}/ga_packages/build_cache_executor/",
"args": [ "-r", "ts-node/register", "${workspaceRoot}/ga_packages/build_cache_executor/__tests__/**/*.ts", "--no-timeouts", "--colors"],
"runtimeExecutable": null,
"env": {
"NODE_ENV": "testing"
}
}
]
}
23 changes: 23 additions & 0 deletions .github/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build_to_distribute",
"path": "actions/build_cache_executor/",
"group": "build",
"problemMatcher": [],
"label": "npm: distribute - actions/build_cache_executor",
"detail": "tsc"
},
{
"type": "npm",
"script": "build",
"path": "ga_packages/build_cache_executor/",
"group": "build",
"problemMatcher": [],
"label": "npm: build - ga_packages/build_cache_executor",
"detail": "tsc"
}
]
}
1 change: 1 addition & 0 deletions .github/actions/build_cache_executor/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.eslintignore
19 changes: 19 additions & 0 deletions .github/actions/build_cache_executor/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"env": {
"commonjs": true,
"mocha": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"rules": {
}
}
18 changes: 18 additions & 0 deletions .github/actions/build_cache_executor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and cache executor
description: Once supplied build commands, the action checks for cached binaries and builds if not found. The outcome of a build is then cached for later use
inputs:
cmds:
description: New line separated commands that need to be executed to produce the build
required: true
cachePaths:
description: New line separated paths that the action is going to use to produce an index to look up cached artifacts or to save them if none were found
required: true
hashPrefix:
description: Optional prefix to add to the resulting hash used to search and save for cached builds
required: false
outputs:
hashKey:
description: Key used to retrieve the just cached build at a later time
runs:
using: node12
main: ./dist/index.js
Loading