mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-20 13:39:15 +00:00
ci: update OpenSSL environment variables in CI workflow and script
- Modified OpenSSL directory paths in the desktop publish workflow to point to the new installation location. - Enhanced the environment check script to include validation for the existence of the OpenSSL directories, improving error handling and logging for Windows platform. - Ensured consistency in OpenSSL directory references across the CI configuration.
This commit is contained in:
parent
82aca59dda
commit
f8d61808e9
6
.github/workflows/desktop-publish.yml
vendored
6
.github/workflows/desktop-publish.yml
vendored
@ -61,9 +61,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
choco install protoc
|
choco install protoc
|
||||||
choco install openssl
|
choco install openssl
|
||||||
echo OPENSSL_DIR='"C:\\Program Files\\OpenSSL-Win64"' >> $env:GITHUB_ENV
|
echo OPENSSL_DIR='"C:\\Program Files\\OpenSSL"' >> $env:GITHUB_ENV
|
||||||
echo OPENSSL_INCLUDE_DIR='"C:\\Program Files\\OpenSSL-Win64\\include"' >> $env:GITHUB_ENV
|
echo OPENSSL_INCLUDE_DIR='"C:\\Program Files\\OpenSSL\\include"' >> $env:GITHUB_ENV
|
||||||
echo OPENSSL_LIB_DIR='"C:\\Program Files\\OpenSSL-Win64\\lib\\VC\\x64\\MDd"' >> $env:GITHUB_ENV
|
echo OPENSSL_LIB_DIR='"C:\\Program Files\\OpenSSL\\lib\\VC\\x64\\MDd"' >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
@ -1,51 +1,52 @@
|
|||||||
import fs from 'fs'
|
import fs from "fs"
|
||||||
|
|
||||||
// run the following only on windows
|
// run the following only on windows
|
||||||
|
|
||||||
const OPENSSL_DIR = process.env.OPENSSL_DIR;
|
const OPENSSL_DIR = process.env.OPENSSL_DIR
|
||||||
const OPENSSL_INCLUDE_DIR = process.env.OPENSSL_INCLUDE_DIR;
|
const OPENSSL_INCLUDE_DIR = process.env.OPENSSL_INCLUDE_DIR
|
||||||
const OPENSSL_LIB_DIR = process.env.OPENSSL_LIB_DIR;
|
const OPENSSL_LIB_DIR = process.env.OPENSSL_LIB_DIR
|
||||||
|
|
||||||
console.log("OPENSSL_DIR", OPENSSL_DIR);
|
console.log("OPENSSL_DIR", OPENSSL_DIR)
|
||||||
console.log("OPENSSL_INCLUDE_DIR", OPENSSL_INCLUDE_DIR);
|
console.log("OPENSSL_INCLUDE_DIR", OPENSSL_INCLUDE_DIR)
|
||||||
console.log("OPENSSL_LIB_DIR", OPENSSL_LIB_DIR);
|
console.log("OPENSSL_LIB_DIR", OPENSSL_LIB_DIR)
|
||||||
|
|
||||||
|
|
||||||
if (process.platform === 'win32') {
|
|
||||||
|
|
||||||
|
if (process.platform === "win32") {
|
||||||
// check if each directory exists
|
// check if each directory exists
|
||||||
if (!OPENSSL_DIR || !OPENSSL_INCLUDE_DIR || !OPENSSL_LIB_DIR) {
|
if (!OPENSSL_DIR || !OPENSSL_INCLUDE_DIR || !OPENSSL_LIB_DIR) {
|
||||||
console.error("OPENSSL_DIR, OPENSSL_INCLUDE_DIR, or OPENSSL_LIB_DIR is not set");
|
console.error("OPENSSL_DIR, OPENSSL_INCLUDE_DIR, or OPENSSL_LIB_DIR is not set")
|
||||||
process.exit(1);
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
const programFilesDir = "C:\\Program Files"
|
||||||
|
console.log(
|
||||||
|
`Program Files Directory (${programFilesDir}) Exists: ${fs.existsSync(programFilesDir)}`
|
||||||
|
)
|
||||||
|
|
||||||
// check if each directory exists
|
// check if each directory exists
|
||||||
if (!fs.existsSync(OPENSSL_DIR)) {
|
if (!fs.existsSync(OPENSSL_DIR)) {
|
||||||
console.error("OPENSSL_DIR does not exist", OPENSSL_DIR);
|
console.error("OPENSSL_DIR does not exist", OPENSSL_DIR)
|
||||||
process.exit(1);
|
process.exit(1)
|
||||||
} else {
|
} else {
|
||||||
console.log("OPENSSL_DIR exists", OPENSSL_DIR);
|
console.log("OPENSSL_DIR exists", OPENSSL_DIR)
|
||||||
}
|
}
|
||||||
if (!fs.existsSync(OPENSSL_INCLUDE_DIR)) {
|
if (!fs.existsSync(OPENSSL_INCLUDE_DIR)) {
|
||||||
console.error("OPENSSL_INCLUDE_DIR does not exist", OPENSSL_INCLUDE_DIR);
|
console.error("OPENSSL_INCLUDE_DIR does not exist", OPENSSL_INCLUDE_DIR)
|
||||||
process.exit(1);
|
process.exit(1)
|
||||||
} else {
|
} else {
|
||||||
console.log("OPENSSL_INCLUDE_DIR exists", OPENSSL_INCLUDE_DIR);
|
console.log("OPENSSL_INCLUDE_DIR exists", OPENSSL_INCLUDE_DIR)
|
||||||
}
|
}
|
||||||
if (!fs.existsSync(OPENSSL_LIB_DIR)) {
|
if (!fs.existsSync(OPENSSL_LIB_DIR)) {
|
||||||
console.error("OPENSSL_LIB_DIR does not exist", OPENSSL_LIB_DIR);
|
console.error("OPENSSL_LIB_DIR does not exist", OPENSSL_LIB_DIR)
|
||||||
process.exit(1);
|
process.exit(1)
|
||||||
} else {
|
} else {
|
||||||
console.log("OPENSSL_LIB_DIR exists", OPENSSL_LIB_DIR);
|
console.log("OPENSSL_LIB_DIR exists", OPENSSL_LIB_DIR)
|
||||||
}
|
}
|
||||||
} else if (process.platform === "darwin") {
|
} else if (process.platform === "darwin") {
|
||||||
if (OPENSSL_DIR) {
|
if (OPENSSL_DIR) {
|
||||||
if (fs.existsSync(OPENSSL_DIR)) {
|
if (fs.existsSync(OPENSSL_DIR)) {
|
||||||
console.log("OPENSSL_DIR exists", OPENSSL_DIR);
|
console.log("OPENSSL_DIR exists", OPENSSL_DIR)
|
||||||
} else {
|
} else {
|
||||||
console.error("OPENSSL_DIR does not exist", OPENSSL_DIR);
|
console.error("OPENSSL_DIR does not exist", OPENSSL_DIR)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (process.platform === "linux") {
|
} else if (process.platform === "linux") {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user