Skip to content

Commit

Permalink
Try to fix the github actions bug again
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Nov 24, 2023
1 parent 34178a3 commit 7db5fe6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Test Compilation Error Cases
working-directory: ./packages/errors
run: npm install && npm start
- name: Build Benchmark Program
- name: Check Benchmark Program
working-directory: ./packages/benchmark
run: npm install && npm run build

16 changes: 8 additions & 8 deletions packages/benchmark/build/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const path = require("path");
const ROOT = path.resolve(`${__dirname}/../../..`);
const TEST = path.resolve(`${__dirname}/..`);

const execute = (command, cwd) => {
console.log(command);
const execute = (command, root) => {
console.log(`\n${root ? "typia" : "@typia/benchmark"} > ${command}`);
cp.execSync(command, {
stdio: "ignore",
cwd,
stdio: "inherit",
cwd: root ? ROOT : TEST,
});
};

Expand All @@ -29,16 +29,16 @@ const main = async () => {
const { version } = JSON.parse(
await fs.promises.readFile(`${ROOT}/package.json`, "utf8"),
);
execute("npm run build", ROOT);
execute("npm pack", ROOT);
execute("npm run build", true);
execute("npm pack", true);

//----
// INSTALL TYPIA
//----
title("Install Typia");

if (fs.existsSync(`${TEST}/node_modules/typia`))
execute("npm uninstall typia", TEST);
execute("npm uninstall typia", false);

const composer = JSON.parse(fs.readFileSync(`${TEST}/package.json`, "utf8"));
composer.dependencies ??= {};
Expand All @@ -48,7 +48,7 @@ const main = async () => {
`${TEST}/package.json`,
JSON.stringify(composer, null, 2),
);
execute("npm install --ignore-scripts", TEST);
execute("npm install --ignore-scripts", false);
};
main().catch((exp) => {
console.error(exp);
Expand Down
16 changes: 8 additions & 8 deletions packages/errors/build/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const path = require("path");
const ROOT = path.resolve(`${__dirname}/../../..`);
const TEST = path.resolve(`${__dirname}/..`);

const execute = (command, cwd) => {
console.log(command);
const execute = (command, root) => {
console.log(`\n${root ? "typia" : "@typia/errors"} > ${command}`);
cp.execSync(command, {
stdio: "ignore",
cwd,
stdio: "inherit",
cwd: root ? ROOT : TEST,
});
};

Expand All @@ -29,16 +29,16 @@ const main = async () => {
const { version } = JSON.parse(
await fs.promises.readFile(`${ROOT}/package.json`, "utf8"),
);
execute("npm run build", ROOT);
execute("npm pack", ROOT);
execute("npm run build", true);
execute("npm pack", true);

//----
// INSTALL TYPIA
//----
title("Install Typia");

if (fs.existsSync(`${TEST}/node_modules/typia`))
execute("npm uninstall typia", TEST);
execute("npm uninstall typia", false);

const composer = JSON.parse(fs.readFileSync(`${TEST}/package.json`, "utf8"));
composer.dependencies ??= {};
Expand All @@ -48,7 +48,7 @@ const main = async () => {
`${TEST}/package.json`,
JSON.stringify(composer, null, 2),
);
execute("npm install --ignore-scripts", TEST);
execute("npm install --ignore-scripts", false);
};
main().catch((exp) => {
console.error(exp);
Expand Down
16 changes: 8 additions & 8 deletions packages/test/build/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const path = require("path");
const ROOT = path.resolve(`${__dirname}/../../..`);
const TEST = path.resolve(`${__dirname}/..`);

const execute = (command, cwd) => {
console.log(command);
const execute = (command, root) => {
console.log(`\n${root ? "typia" : "@typia/test"} > ${command}`);
cp.execSync(command, {
stdio: "ignore",
cwd,
stdio: "inherit",
cwd: root ? ROOT : TEST,
});
};

Expand All @@ -29,16 +29,16 @@ const main = async () => {
const { version } = JSON.parse(
await fs.promises.readFile(`${ROOT}/package.json`, "utf8"),
);
execute("npm run build", ROOT);
execute("npm pack", ROOT);
execute("npm run build", true);
execute("npm pack", true);

//----
// INSTALL TYPIA
//----
title("Install Typia");

if (fs.existsSync(`${TEST}/node_modules/typia`))
execute("npm uninstall typia", TEST);
execute("npm uninstall typia", false);

const composer = JSON.parse(fs.readFileSync(`${TEST}/package.json`, "utf8"));
composer.dependencies ??= {};
Expand All @@ -48,7 +48,7 @@ const main = async () => {
`${TEST}/package.json`,
JSON.stringify(composer, null, 2),
);
execute("npm install --ignore-scripts", TEST);
execute("npm install --ignore-scripts", false);
};
main().catch((exp) => {
console.error(exp);
Expand Down
6 changes: 3 additions & 3 deletions packages/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"source-map-support": "^0.5.21",
"suppress-warnings": "^1.0.2",
"tstl": "^2.5.13",
"typia": "file:D:\\github\\samchon\\typia/typia-5.3.0-dev.20231122.tgz",
"uuid": "^9.0.1"
"uuid": "^9.0.1",
"typia": "file:D:\\github\\samchon\\typia/typia-5.3.0-dev.20231122.tgz"
}
}
}

0 comments on commit 7db5fe6

Please sign in to comment.