Skip to content

Commit

Permalink
Merge pull request #56 from sophia-guo/mac
Browse files Browse the repository at this point in the history
update mac os runner shmmax parameter
  • Loading branch information
Shelley Lambert authored Dec 15, 2020
2 parents 5d1e6ce + 73b88ae commit 009ccca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3376,7 +3376,7 @@ if (!tempDirectory) {
}
function runaqaTest(version, jdksource, buildList, target, customTarget, openjdktestRepo, tkgRepo) {
return __awaiter(this, void 0, void 0, function* () {
yield installDependency();
yield installDependencyAndSetup();
setSpec();
process.env.BUILD_LIST = buildList;
if (!('TEST_JDK_HOME' in process.env))
Expand Down Expand Up @@ -3431,7 +3431,7 @@ function getTestJdkHome(version, jdksource) {
return javaHome;
}
// This function is an alternative of extra install step in workflow or alternative install action. This could also be implemented as github action
function installDependency() {
function installDependencyAndSetup() {
return __awaiter(this, void 0, void 0, function* () {
if (IS_WINDOWS) {
const cygwinPath = 'C:\\cygwin64';
Expand All @@ -3458,6 +3458,8 @@ function installDependency() {
}
else if (process.platform === 'darwin') {
yield exec.exec('brew install ant-contrib');
yield exec.exec('sudo sysctl -w kern.sysv.shmall=655360');
yield exec.exec('sudo sysctl -w kern.sysv.shmmax=125839605760');
}
else {
yield exec.exec('sudo apt-get update');
Expand Down
6 changes: 4 additions & 2 deletions src/runaqa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function runaqaTest(
openjdktestRepo: string,
tkgRepo: string
): Promise<void> {
await installDependency()
await installDependencyAndSetup()
setSpec()
process.env.BUILD_LIST = buildList
if (!('TEST_JDK_HOME' in process.env)) process.env.TEST_JDK_HOME = getTestJdkHome(version, jdksource)
Expand Down Expand Up @@ -86,7 +86,7 @@ function getTestJdkHome(version: string, jdksource: string): string {
}

// This function is an alternative of extra install step in workflow or alternative install action. This could also be implemented as github action
async function installDependency(): Promise<void> {
async function installDependencyAndSetup(): Promise<void> {
if (IS_WINDOWS) {
const cygwinPath = 'C:\\cygwin64'
try {
Expand All @@ -110,6 +110,8 @@ async function installDependency(): Promise<void> {
await io.cp(`${tempDirectory}/ant-contrib/lib/ant-contrib.jar`,`${process.env.ANT_HOME}\\lib`)
} else if (process.platform === 'darwin') {
await exec.exec('brew install ant-contrib')
await exec.exec('sudo sysctl -w kern.sysv.shmall=655360')
await exec.exec('sudo sysctl -w kern.sysv.shmmax=125839605760')
} else {
await exec.exec('sudo apt-get update')
await exec.exec('sudo apt-get install ant-contrib -y')
Expand Down

0 comments on commit 009ccca

Please sign in to comment.