feat: ci for module

This commit is contained in:
msojocs 2024-07-06 15:26:14 +08:00
parent c75bbaa754
commit fbe206ff73
5 changed files with 19 additions and 8 deletions

View File

@ -9,7 +9,7 @@ on:
push:
tags:
- v*
branches: [ master, dev, ci]
branches: [ master, dev, ci, module]
pull_request:
branches: [ master ]
# # Allows you to run this workflow manually from the Actions tab
@ -66,7 +66,7 @@ jobs:
echo "------------------------"
ls -l build
mkdir -p tmp/build
mv build/{wcc,wcsc} tmp/build
mv build/{wcc,wcsc,wcc_module.node} tmp/build
cd tmp/build
ls -l

View File

@ -4,7 +4,7 @@ module.exports = {
'ts-node/register'
],
recursive: true,
// spec: "./test/spec/**/*.spec.ts",
spec: "test/spec/wcc/module/module.spec.ts",
spec: "./test/spec/**/*.spec.ts",
// spec: "test/spec/wcc/module/module.spec.ts",
timeout: 20000,
}

View File

@ -9,5 +9,7 @@ cd build
cmake ..
cmake --build . --config Release --target wcc
cmake --build . --config Release --target wcsc
cmake --build . --config Release --target wcc_module
readelf -s ./wcc | grep -oP "GLIBC.*" | sort | uniq
readelf -s ./wcsc | grep -oP "GLIBC.*" | sort | uniq
readelf -s ./wcsc | grep -oP "GLIBC.*" | sort | uniq
readelf -s ./wcc_module.node | grep -oP "GLIBC.*" | sort | uniq

View File

@ -2,6 +2,7 @@ import * as fs from 'fs'
import { request } from "http";
import { CompilerOptions } from './types';
import path from 'path'
import { execFileSync } from 'child_process';
// 预先启动wine focker环境再使用HTTP协议最后销毁容器
const HTTP = {
@ -68,5 +69,11 @@ const wccNative = async (optionsPath: string) => {
export default {
wcsc: wcscNative,
wcc: wccNative
wcc: wccNative,
start: () => {
execFileSync(path.resolve(__dirname, './nwjs/wine-prepare.sh'), { stdio: 'inherit' })
},
close: () => {
request('http://localhost:8083/close').end()
}
}

View File

@ -5,11 +5,13 @@ import path from 'path';
import linux from '../../../runner/module-linux'
import windows from '../../../runner/module-windows'
import * as fs from 'fs'
import { execFileSync } from 'child_process';
describe("wcc - module", function () {
this.beforeAll(() => {
// execFileSync(path.resolve(__dirname, '../../../runner/nwjs/wine-prepare.sh'), { stdio: 'inherit' })
windows.start()
})
this.afterAll(() => {
windows.close()
})
describe("llw: linux output should deep equal with wine", function () {
// afterEach(function(){