diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dba86d..7185994 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,16 @@ name: "run-aqa build with push to master" on: push: +<<<<<<< HEAD branches: - master pull_request: types: [opened, synchronize, reopened, ready_for_review] +======= + branches-ignore: + - '**' + +>>>>>>> 79a6303 (support custom_target) jobs: openjdk: # make sure build/ci work properly runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 5aee1c1..cbf51c2 100644 --- a/README.md +++ b/README.md @@ -91,11 +91,19 @@ You can also: | version | 8 | | build_list | openjdk | | target | _jdk_math | +<<<<<<< HEAD +<<<<<<< HEAD | custom_target | | +======= +>>>>>>> 0aaf44c (Update README.md) +======= +| custom_target | | +>>>>>>> 43100af (support custom_target) | jdksource | upstream | | aqa-testsRepo | | | tkg_Repo | | + ### version The Java version that tests are running against (Supported values are: 8, 9, 10, 11, 12, 13, ...) By default, this action will run against upstream jdk build action installed JDK. Specifying this parameter is required when jdksource is not `upstream`. diff --git a/action.yml b/action.yml index 0ae5ead..5ca9fd6 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,8 @@ inputs: target: # test description: default: '_jdk_math' +<<<<<<< HEAD +<<<<<<< HEAD custom_target: # Used if need to set non-default custom target description: required: false @@ -27,6 +29,9 @@ inputs: openj9_repo: description: 'openj9 Repo' required: false + openj9-systemtestsRepo: + description: 'Personal openj9-systemtests Repo' + required: false tkg_Repo: description: 'Personal TKG Repo. For example, octocat/TKG:test' required: false @@ -42,6 +47,14 @@ inputs: vendor_testShas: description: 'Comma-separated list of vendor SHAs' required: false +======= + custom_target: +======= + custom_target: # Used if need to set non-default custom target +>>>>>>> 43100af (support custom_target) + description: + required: false +>>>>>>> 79a6303 (support custom_target) runs: using: 'node12' - main: 'dist/index.js' + main: 'dist/index.js' \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 1c92eba..a9fb4c0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2953,9 +2953,11 @@ function run() { const buildList = core.getInput('build_list', { required: false }); const target = core.getInput('target', { required: false }); const customTarget = core.getInput('custom_target', { required: false }); +<<<<<<< HEAD const aqatestsRepo = core.getInput('aqa-testsRepo', { required: false }); const aqasystemtestsRepo = core.getInput('aqa-systemtestsRepo', {required: false}); const openj9Repo = core.getInput('openj9_repo', { required: false }); + const openj9systemtestsRepo = core.getInput('openj9-systemtestsRepo', { required: false }); const tkgRepo = core.getInput('tkg_Repo', { required: false }); const vendorTestRepos = core.getInput('vendor_testRepos', { required: false }); const vendorTestBranches = core.getInput('vendor_testBranches', { @@ -2964,6 +2966,8 @@ function run() { const vendorTestDirs = core.getInput('vendor_testDirs', { required: false }); const vendorTestShas = core.getInput('vendor_testShas', { required: false }); let vendorTestParams = ''; +======= +>>>>>>> 79a6303 (support custom_target) // let arch = core.getInput("architecture", { required: false }) if (jdksource !== 'upstream' && jdksource !== 'github-hosted' && @@ -2980,6 +2984,7 @@ function run() { if (jdksource !== 'upstream' && version.length === 0) { core.setFailed('Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.'); } +<<<<<<< HEAD if (vendorTestRepos !== '') { vendorTestParams = `--vendor_repos ${vendorTestRepos}`; } @@ -2992,7 +2997,10 @@ function run() { if (vendorTestShas !== '') { vendorTestParams += ` --vendor_shas ${vendorTestShas}`; } - yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo); + yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo,openj9systemtestsRepo); +======= + yield runaqa.runaqaTest(version, jdksource, buildList, target, customTarget); +>>>>>>> 79a6303 (support custom_target) } catch (error) { core.setFailed(error.message); @@ -3377,6 +3385,7 @@ const core = __importStar(__webpack_require__(470)); const io = __importStar(__webpack_require__(1)); const tc = __importStar(__webpack_require__(533)); const path = __importStar(__webpack_require__(622)); +<<<<<<< HEAD const fs = __importStar(__webpack_require__(747)); let tempDirectory = process.env['RUNNER_TEMP'] || ''; const IS_WINDOWS = process.platform === 'win32'; @@ -3394,10 +3403,23 @@ if (!tempDirectory) { } tempDirectory = path.join(baseLocation, 'actions', 'temp'); } -function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo) { +function runaqaTest(version, jdksource, buildList, target, customTarget, aqatestsRepo, openj9Repo, tkgRepo, vendorTestParams, aqasystemtestsRepo, openj9systemtestsRepo) { return __awaiter(this, void 0, void 0, function* () { yield installDependencyAndSetup(); setSpec(); +======= +const isWindows = process.platform === 'win32'; +function runaqaTest(version, jdksource, buildList, target, customTarget) { + return __awaiter(this, void 0, void 0, function* () { + yield installDependency(); +<<<<<<< HEAD + let customOption = ''; + if (target.includes('custom') && customTarget !== '') { + customOption = `${target.toUpperCase()}_TARGET=${customTarget}`; + } +>>>>>>> 79a6303 (support custom_target) +======= +>>>>>>> 43100af (support custom_target) process.env.BUILD_LIST = buildList; if (!('TEST_JDK_HOME' in process.env)) process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource); @@ -3413,6 +3435,7 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest // Test.dependency only has one level of archive directory, none of actions toolkit support mv files by regex. Using 7zip discards the directory directly yield exec.exec(`${sevenzexe} e ${dependents} -o${process.env.GITHUB_WORKSPACE}/aqa-tests/TKG/lib`); if (buildList.includes('system')) { + getOpenj9SystemTestsRepo(openj9systemtestsRepo); getAqaSystemTestsRepo(aqasystemtestsRepo); dependents = yield tc.downloadTool('https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip'); // System.dependency has different levels of archive structures archive/systemtest_prereqs/*.* @@ -3431,15 +3454,27 @@ function runaqaTest(version, jdksource, buildList, target, customTarget, aqatest process.chdir('TKG'); try { yield exec.exec('make compile'); +<<<<<<< HEAD +<<<<<<< HEAD if (target.includes('custom') && customTarget !== '') { const customOption = `${target .substr(1) .toUpperCase()}_TARGET=${customTarget}`; +======= + if (target.includes('custom') && customTarget !== '') { + const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}`; +>>>>>>> 43100af (support custom_target) yield exec.exec('make', [`${target}`, `${customOption}`], options); } else { yield exec.exec('make', [`${target}`], options); } +<<<<<<< HEAD +======= + yield exec.exec('make', [`${target} ${customOption}`], options); +>>>>>>> 79a6303 (support custom_target) +======= +>>>>>>> 43100af (support custom_target) } catch (error) { core.setFailed(error.message); @@ -3572,6 +3607,15 @@ function getAqaSystemTestsRepo(aqasystemtestsRepo) { process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1]; } +function getOpenj9SystemTestsRepo(openj9systemtestsRepo) { + let repoBranch = ['eclipse-openj9/openj9-systemtest', 'master']; + if (openj9systemtestsRepo.length !== 0) { + repoBranch = parseRepoBranch(openj9systemtestsRepo); + } + process.env.ADOPTOPENJDK_SYSTEMTEST_REPO = repoBranch[0]; + process.env.ADOPTOPENJDK_SYSTEMTEST_BRANCH = repoBranch[1]; +} + function runGetSh(tkgRepo, openj9Repo, vendorTestParams) { return __awaiter(this, void 0, void 0, function* () { let parameters = ''; @@ -5048,4 +5092,5 @@ exports.exec = exec; /***/ }) -/******/ }); \ No newline at end of file +/******/ }); + diff --git a/src/aqa.ts b/src/aqa.ts index 8c005de..00d66b9 100644 --- a/src/aqa.ts +++ b/src/aqa.ts @@ -7,10 +7,12 @@ async function run(): Promise { const version = core.getInput('version', {required: false}) const buildList = core.getInput('build_list', {required: false}) const target = core.getInput('target', {required: false}) +<<<<<<< HEAD const customTarget = core.getInput('custom_target', {required: false}) const aqatestsRepo = core.getInput('aqa-testsRepo', {required: false}) const aqasystemtestsRepo = core.getInput('aqa-systemtestsRepo', {required: false}) const openj9Repo = core.getInput('openj9_repo', {required: false}) + const openj9systemtestsRepo=core.getInput('openj9-systemtestsRepo', {required: false}) const tkgRepo = core.getInput('tkg_Repo', {required: false}) const vendorTestRepos = core.getInput('vendor_testRepos', {required: false}) const vendorTestBranches = core.getInput('vendor_testBranches', { @@ -20,6 +22,9 @@ async function run(): Promise { const vendorTestShas = core.getInput('vendor_testShas', {required: false}) let vendorTestParams = '' +======= + const customTarget = core.getInput('custom_target',{required: false}) +>>>>>>> 79a6303 (support custom_target) // let arch = core.getInput("architecture", { required: false }) if ( jdksource !== 'upstream' && @@ -47,6 +52,7 @@ async function run(): Promise { 'Please provide jdkversion if jdksource is github-hosted installed or AdoptOpenJKD/install-jdk installed.' ) } +<<<<<<< HEAD if (vendorTestRepos !== '') { vendorTestParams = `--vendor_repos ${vendorTestRepos}` } @@ -70,7 +76,12 @@ async function run(): Promise { tkgRepo, vendorTestParams, aqasystemtestsRepo, + openj9systemtestsRepo, ) +======= + + await runaqa.runaqaTest(version, jdksource, buildList, target, customTarget) +>>>>>>> 79a6303 (support custom_target) } catch (error) { core.setFailed(error.message) } diff --git a/src/runaqa.ts b/src/runaqa.ts index 9e9483e..044d754 100644 --- a/src/runaqa.ts +++ b/src/runaqa.ts @@ -28,15 +28,29 @@ export async function runaqaTest( jdksource: string, buildList: string, target: string, +<<<<<<< HEAD customTarget: string, aqatestsRepo: string, openj9Repo: string, tkgRepo: string, vendorTestParams: string, aqasystemtestsRepo: string, + openj9systemtestsRepo: string, ): Promise { await installDependencyAndSetup() setSpec() +======= + customTarget: string +): Promise { + await installDependency() +<<<<<<< HEAD + let customOption = '' + if (target.includes('custom') && customTarget !== '') { + customOption = `${target.toUpperCase()}_TARGET=${customTarget}` + } +>>>>>>> 79a6303 (support custom_target) +======= +>>>>>>> 43100af (support custom_target) process.env.BUILD_LIST = buildList if (!('TEST_JDK_HOME' in process.env)) process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource) @@ -61,6 +75,7 @@ export async function runaqaTest( if (buildList.includes('system')) { getAqaSystemTestsRepo(aqasystemtestsRepo); + getOpenj9SystemTestsRepo(openj9systemtestsRepo); dependents = await tc.downloadTool( 'https://ci.adoptopenjdk.net/view/all/job/systemtest.getDependency/lastSuccessfulBuild/artifact/*zip*/dependents.zip' ) @@ -87,14 +102,26 @@ export async function runaqaTest( process.chdir('TKG') try { await exec.exec('make compile') +<<<<<<< HEAD +<<<<<<< HEAD if (target.includes('custom') && customTarget !== '') { const customOption = `${target .substr(1) .toUpperCase()}_TARGET=${customTarget}` +======= + if (target.includes('custom') && customTarget !== '') { + const customOption = `${target.substr(1).toUpperCase()}_TARGET=${customTarget}` +>>>>>>> 43100af (support custom_target) await exec.exec('make', [`${target}`, `${customOption}`], options) } else { await exec.exec('make', [`${target}`], options) } +<<<<<<< HEAD +======= + await exec.exec('make', [`${target} ${customOption}`], options) +>>>>>>> 79a6303 (support custom_target) +======= +>>>>>>> 43100af (support custom_target) } catch (error) { core.setFailed(error.message) } @@ -231,6 +258,14 @@ async function getAqaTestsRepo(aqatestsRepo: string): Promise { process.chdir('aqa-tests') } +function getOpenj9SystemTestsRepo(openj9systemtestsRepo: string){ +let repoBranch=['eclipse-openj9/openj9-systemtest','master']; +if(openj9systemtestsRepo.length!==0){ + repoBranch=parseRepoBranch(openj9systemtestsRepo); +} +process.env.OPENJ9_SYSTEMTEST_REPO = repoBranch[0]; +process.env.OPENJ9_SYSTEMTEST_BRANCH = repoBranch[1]; +} function getAqaSystemTestsRepo(aqasystemtestsRepo: string) { let repoBranch = ['adoptium/aqa-systemtests', 'master'] if (aqasystemtestsRepo.length !== 0) {