mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-13 14:30:15 +08:00
Merge 2a0fb032eb63d5aff49a76e0e18de2ba85a94783 into 2063b36b7962810d981a72b576aab805ef4aba8f
This commit is contained in:
commit
054e250842
@ -72,6 +72,6 @@ outputs:
|
|||||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node20'
|
||||||
main: 'dist/main/index.js'
|
main: 'dist/main.js'
|
||||||
post: 'dist/cleanup/index.js'
|
post: 'dist/cleanup.js'
|
||||||
post-if: 'success()'
|
post-if: 'success()'
|
||||||
|
118310
dist/cleanup/index.js → dist/cleanup.js
generated
vendored
118310
dist/cleanup/index.js → dist/cleanup.js
generated
vendored
File diff suppressed because one or more lines are too long
121659
dist/main/index.js → dist/main.js
generated
vendored
121659
dist/main/index.js → dist/main.js
generated
vendored
File diff suppressed because one or more lines are too long
@ -1,14 +1,29 @@
|
|||||||
module.exports = {
|
// See: https://jestjs.io/docs/configuration
|
||||||
|
|
||||||
|
/** @type {import('ts-jest').JestConfigWithTsJest} **/
|
||||||
|
export default {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
collectCoverage: true,
|
collectCoverage: true,
|
||||||
collectCoverageFrom: ['./src/**'],
|
collectCoverageFrom: ['./src/**'],
|
||||||
coverageDirectory: './coverage',
|
coverageDirectory: './coverage',
|
||||||
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
|
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
|
||||||
coverageReporters: ['json-summary', 'text', 'lcov'],
|
coverageReporters: ['json-summary', 'text', 'lcov'],
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
extensionsToTreatAsEsm: ['.ts'],
|
||||||
|
moduleFileExtensions: ['ts', 'js'],
|
||||||
|
preset: 'ts-jest',
|
||||||
|
reporters: ['default'],
|
||||||
|
resolver: 'ts-jest-resolver',
|
||||||
|
testEnvironment: 'node',
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
|
testPathIgnorePatterns: ['/dist/', '/node_modules/'],
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': [
|
||||||
|
'ts-jest',
|
||||||
|
{
|
||||||
|
tsconfig: 'tsconfig.eslint.json',
|
||||||
|
useESM: true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
}
|
||||||
|
954
package-lock.json
generated
954
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -3,6 +3,7 @@
|
|||||||
"author": "GraalVM Community",
|
"author": "GraalVM Community",
|
||||||
"description": "GitHub Action for GraalVM",
|
"description": "GitHub Action for GraalVM",
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -26,8 +27,8 @@
|
|||||||
"format:check": "npx prettier --check .",
|
"format:check": "npx prettier --check .",
|
||||||
"lint": "npx eslint .",
|
"lint": "npx eslint .",
|
||||||
"package": "npm run package:main && npm run package:cleanup",
|
"package": "npm run package:main && npm run package:cleanup",
|
||||||
"package:main": "npx ncc build src/main.ts -o dist/main",
|
"package:main": "npx rollup --config rollup.main.config.ts --configPlugin @rollup/plugin-typescript",
|
||||||
"package:cleanup": "npx ncc build src/cleanup.ts -o dist/cleanup",
|
"package:cleanup": "npx rollup --config rollup.cleanup.config.ts --configPlugin @rollup/plugin-typescript",
|
||||||
"test": "npx jest",
|
"test": "npx jest",
|
||||||
"all": "npm run format:write && npm run lint && npm run test && npm run package"
|
"all": "npm run format:write && npm run lint && npm run test && npm run package"
|
||||||
},
|
},
|
||||||
@ -41,7 +42,7 @@
|
|||||||
"@actions/http-client": "^2.2.3",
|
"@actions/http-client": "^2.2.3",
|
||||||
"@actions/io": "^1.1.3",
|
"@actions/io": "^1.1.3",
|
||||||
"@actions/tool-cache": "^2.0.2",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@octokit/core": "^5.2.0",
|
"@octokit/core": "^6.1.4",
|
||||||
"@octokit/types": "^13.8.0",
|
"@octokit/types": "^13.8.0",
|
||||||
"@github/dependency-submission-toolkit": "^2.0.4",
|
"@github/dependency-submission-toolkit": "^2.0.4",
|
||||||
"semver": "^7.7.1",
|
"semver": "^7.7.1",
|
||||||
@ -49,13 +50,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^1.2.7",
|
"@eslint/compat": "^1.2.7",
|
||||||
|
"@rollup/plugin-commonjs": "^28.0.1",
|
||||||
|
"@rollup/plugin-json": "^6.1.0",
|
||||||
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||||
|
"@rollup/plugin-typescript": "^12.1.1",
|
||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^20.17.22",
|
"@types/node": "^20.17.22",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||||
"@typescript-eslint/parser": "^8.25.0",
|
"@typescript-eslint/parser": "^8.25.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
|
||||||
"eslint": "^9.21.0",
|
"eslint": "^9.21.0",
|
||||||
"eslint-config-prettier": "^10.0.2",
|
"eslint-config-prettier": "^10.0.2",
|
||||||
"eslint-import-resolver-typescript": "^3.8.3",
|
"eslint-import-resolver-typescript": "^3.8.3",
|
||||||
@ -68,8 +72,18 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"prettier-eslint": "^16.3.0",
|
"prettier-eslint": "^16.3.0",
|
||||||
|
"rollup": "^4.34.1",
|
||||||
"ts-jest": "^29.2.6",
|
"ts-jest": "^29.2.6",
|
||||||
|
"ts-jest-resolver": "^2.0.1",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.7.3"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@rollup/rollup-linux-x64-gnu": "*"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"@actions/glob": {
|
||||||
|
"minimatch": "^10.0.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
rollup.cleanup.config.ts
Normal file
19
rollup.cleanup.config.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// See: https://rollupjs.org/introduction/
|
||||||
|
|
||||||
|
import commonjs from '@rollup/plugin-commonjs'
|
||||||
|
import json from '@rollup/plugin-json'
|
||||||
|
import nodeResolve from '@rollup/plugin-node-resolve'
|
||||||
|
import typescript from '@rollup/plugin-typescript'
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
input: 'src/cleanup.ts',
|
||||||
|
output: {
|
||||||
|
esModule: true,
|
||||||
|
file: 'dist/cleanup.js',
|
||||||
|
format: 'es',
|
||||||
|
sourcemap: false
|
||||||
|
},
|
||||||
|
plugins: [typescript(), nodeResolve(), commonjs(), json()]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
19
rollup.main.config.ts
Normal file
19
rollup.main.config.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// See: https://rollupjs.org/introduction/
|
||||||
|
|
||||||
|
import commonjs from '@rollup/plugin-commonjs'
|
||||||
|
import json from '@rollup/plugin-json'
|
||||||
|
import nodeResolve from '@rollup/plugin-node-resolve'
|
||||||
|
import typescript from '@rollup/plugin-typescript'
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
input: 'src/main.ts',
|
||||||
|
output: {
|
||||||
|
esModule: true,
|
||||||
|
file: 'dist/main.js',
|
||||||
|
format: 'es',
|
||||||
|
sourcemap: false
|
||||||
|
},
|
||||||
|
plugins: [typescript(), nodeResolve(), commonjs(), json()]
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
@ -25,10 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as constants from './constants'
|
import * as constants from './constants.js'
|
||||||
import { save } from './features/cache'
|
import { save } from './features/cache.js'
|
||||||
import { generateReports } from './features/reports'
|
import { generateReports } from './features/reports.js'
|
||||||
import { processSBOM } from './features/sbom'
|
import { processSBOM } from './features/sbom.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check given input and run a save process for the specified package manager
|
* Check given input and run a save process for the specified package manager
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import { GRAALVM_PLATFORM } from './constants'
|
import { GRAALVM_PLATFORM } from './constants.js'
|
||||||
import { exec } from './utils'
|
import { exec } from './utils.js'
|
||||||
|
|
||||||
const APT_GET_INSTALL_BASE = 'sudo apt-get -y --no-upgrade install'
|
const APT_GET_INSTALL_BASE = 'sudo apt-get -y --no-upgrade install'
|
||||||
const COMPONENT_TO_DEPS = new Map<string, Map<string, string>>([
|
const COMPONENT_TO_DEPS = new Map<string, Map<string, string>>([
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as c from '../constants'
|
import * as c from '../constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as tc from '@actions/tool-cache'
|
import * as tc from '@actions/tool-cache'
|
||||||
import { exec } from '../utils'
|
import { exec } from '../utils.js'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
||||||
const MUSL_NAME = 'x86_64-linux-musl-native'
|
const MUSL_NAME = 'x86_64-linux-musl-native'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as c from '../constants'
|
import * as c from '../constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
@ -11,7 +11,7 @@ import {
|
|||||||
updatePRComment,
|
updatePRComment,
|
||||||
tmpfile,
|
tmpfile,
|
||||||
setNativeImageOption
|
setNativeImageOption
|
||||||
} from '../utils'
|
} from '../utils.js'
|
||||||
|
|
||||||
const BUILD_OUTPUT_JSON_PATH = tmpfile('native-image-build-output.json')
|
const BUILD_OUTPUT_JSON_PATH = tmpfile('native-image-build-output.json')
|
||||||
const BYTES_TO_KiB = 1024
|
const BYTES_TO_KiB = 1024
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import * as c from '../constants'
|
import * as c from '../constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import { basename } from 'path'
|
import { basename } from 'path'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import { setNativeImageOption } from '../utils'
|
import { setNativeImageOption } from '../utils.js'
|
||||||
|
|
||||||
const INPUT_NI_SBOM = 'native-image-enable-sbom'
|
const INPUT_NI_SBOM = 'native-image-enable-sbom'
|
||||||
const SBOM_FILE_SUFFIX = '.sbom.json'
|
const SBOM_FILE_SUFFIX = '.sbom.json'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as httpClient from '@actions/http-client'
|
import * as httpClient from '@actions/http-client'
|
||||||
@ -8,8 +8,8 @@ import * as stream from 'stream'
|
|||||||
import * as util from 'util'
|
import * as util from 'util'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'
|
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'
|
||||||
import { RetryHelper } from '@actions/tool-cache/lib/retry-helper'
|
import { RetryHelper } from '@actions/tool-cache/lib/retry-helper.js'
|
||||||
import { calculateSHA256 } from './utils'
|
import { calculateSHA256 } from './utils.js'
|
||||||
import { ok } from 'assert'
|
import { ok } from 'assert'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import {
|
import {
|
||||||
@ -8,8 +8,8 @@ import {
|
|||||||
getLatestRelease,
|
getLatestRelease,
|
||||||
getMatchingTags,
|
getMatchingTags,
|
||||||
getTaggedRelease
|
getTaggedRelease
|
||||||
} from './utils'
|
} from './utils.js'
|
||||||
import { downloadGraalVM, downloadGraalVMEELegacy } from './gds'
|
import { downloadGraalVM, downloadGraalVMEELegacy } from './gds.js'
|
||||||
import { downloadTool } from '@actions/tool-cache'
|
import { downloadTool } from '@actions/tool-cache'
|
||||||
import { basename } from 'path'
|
import { basename } from 'path'
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import { GRAALVM_PLATFORM } from './constants'
|
import { GRAALVM_PLATFORM } from './constants.js'
|
||||||
import { exec } from './utils'
|
import { exec } from './utils.js'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
|
|
||||||
const BASE_FLAGS = ['--non-interactive', 'install', '--no-progress']
|
const BASE_FLAGS = ['--non-interactive', 'install', '--no-progress']
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import { downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils'
|
import { downloadExtractAndCacheJDK, getTaggedRelease, getMatchingTags } from './utils.js'
|
||||||
import { downloadTool } from '@actions/tool-cache'
|
import { downloadTool } from '@actions/tool-cache'
|
||||||
import { spawnSync } from 'child_process'
|
import { spawnSync } from 'child_process'
|
||||||
|
|
||||||
|
24
src/main.ts
24
src/main.ts
@ -1,20 +1,20 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as graalvm from './graalvm'
|
import * as graalvm from './graalvm.js'
|
||||||
import * as semver from 'semver'
|
import * as semver from 'semver'
|
||||||
import { isFeatureAvailable as isCacheAvailable } from '@actions/cache'
|
import { isFeatureAvailable as isCacheAvailable } from '@actions/cache'
|
||||||
import { basename, join } from 'path'
|
import { basename, join } from 'path'
|
||||||
import { restore } from './features/cache'
|
import { restore } from './features/cache.js'
|
||||||
import { setUpDependencies } from './dependencies'
|
import { setUpDependencies } from './dependencies.js'
|
||||||
import { setUpGUComponents } from './gu'
|
import { setUpGUComponents } from './gu.js'
|
||||||
import { setUpMandrel } from './mandrel'
|
import { setUpMandrel } from './mandrel.js'
|
||||||
import { setUpLiberica } from './liberica'
|
import { setUpLiberica } from './liberica.js'
|
||||||
import { checkForUpdates } from './features/check-for-updates'
|
import { checkForUpdates } from './features/check-for-updates.js'
|
||||||
import { setUpNativeImageMusl } from './features/musl'
|
import { setUpNativeImageMusl } from './features/musl.js'
|
||||||
import { setUpWindowsEnvironment } from './msvc'
|
import { setUpWindowsEnvironment } from './msvc.js'
|
||||||
import { setUpNativeImageBuildReports } from './features/reports'
|
import { setUpNativeImageBuildReports } from './features/reports.js'
|
||||||
import { exec } from '@actions/exec'
|
import { exec } from '@actions/exec'
|
||||||
import { setUpSBOMSupport } from './features/sbom'
|
import { setUpSBOMSupport } from './features/sbom.js'
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as httpClient from '@actions/http-client'
|
import * as httpClient from '@actions/http-client'
|
||||||
import { downloadExtractAndCacheJDK } from './utils'
|
import { downloadExtractAndCacheJDK } from './utils.js'
|
||||||
import { downloadTool } from '@actions/tool-cache'
|
import { downloadTool } from '@actions/tool-cache'
|
||||||
import { basename } from 'path'
|
import { basename } from 'path'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import { existsSync } from 'fs'
|
import { existsSync } from 'fs'
|
||||||
import { VERSION_DEV } from './constants'
|
import { VERSION_DEV } from './constants.js'
|
||||||
|
|
||||||
// Keep in sync with https://github.com/actions/virtual-environments
|
// Keep in sync with https://github.com/actions/virtual-environments
|
||||||
const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [
|
const KNOWN_VISUAL_STUDIO_INSTALLATIONS = [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as c from './constants'
|
import * as c from './constants.js'
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import * as httpClient from '@actions/http-client'
|
import * as httpClient from '@actions/http-client'
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
"noUnusedParameters": false,
|
"noUnusedParameters": false,
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"sourceMap": true,
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"target": "ES2022"
|
"target": "ES2022"
|
||||||
|
@ -6,5 +6,12 @@
|
|||||||
"noEmit": true
|
"noEmit": true
|
||||||
},
|
},
|
||||||
"exclude": ["dist", "node_modules"],
|
"exclude": ["dist", "node_modules"],
|
||||||
"include": ["__tests__", "src", "eslint.config.mjs", "jest.config.js"]
|
"include": [
|
||||||
|
"__tests__",
|
||||||
|
"src",
|
||||||
|
"eslint.config.mjs",
|
||||||
|
"jest.config.js",
|
||||||
|
"rollup.cleanup.config.ts",
|
||||||
|
"rollup.main.config.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user