Skip to content

Commit

Permalink
Support cu12 (#122)
Browse files Browse the repository at this point in the history
* add

* upgrade

* fix

* publishing
  • Loading branch information
jackalcooper authored Oct 30, 2023
1 parent f542e5f commit 5bc8980
Show file tree
Hide file tree
Showing 17 changed files with 14,781 additions and 10,987 deletions.
129 changes: 76 additions & 53 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,77 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
"plugins": [
"jest",
"@typescript-eslint"
],
"extends": [
"plugin:github/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"filenames/match-regex": "off",
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
],
"@typescript-eslint/func-call-spacing": [
"error",
"never"
],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": [
"error",
"never"
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
3 changes: 1 addition & 2 deletions __tests__/cache-complete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ test(
await cache.postCacheRun()
process.env['OSS_ACCESS_KEY_ID'] = ''
process.env['OSS_ACCESS_KEY_SECRET'] = ''
// await new Promise(resolve => setTimeout(resolve, 2000))
ok(await cache.checkComplete(keys))
env.setBooleanInput('check-not-completed', false)
await cache.cacheRun()
// await cache.cacheRun()
},
MINUTES15
)
Expand Down
14 changes: 2 additions & 12 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ test('test runs', () => {
const options: cp.ExecFileSyncOptions = {
env: process.env
}
try {
cp.execFileSync(np, [ip], options).toString()
} catch (error) {
console.log(error.output.toString())
throw error
}
cp.execFileSync(np, [ip], options).toString()
})

test(
Expand Down Expand Up @@ -60,12 +55,7 @@ test(
const options: cp.ExecFileSyncOptions = {
env: process.env
}
try {
cp.execFileSync(np, [ip], options).toString()
} catch (error) {
console.log(error.output.toString())
throw error
}
cp.execFileSync(np, [ip], options).toString()
},
MINUTES15
)
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ outputs:
pip-index-url:
description: "pip index url could be use to install oneflow"
runs:
using: "node12"
using: "node20"
main: "dist/index.js"
Binary file added dist/build/Release/cpufeatures.node
Binary file not shown.
194 changes: 44 additions & 150 deletions dist/index.js

Large diffs are not rendered by default.

Binary file not shown.
Binary file removed dist/pagent1.exe
Binary file not shown.
Binary file removed dist/pagent2.exe
Binary file not shown.
Loading

0 comments on commit 5bc8980

Please sign in to comment.