Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 33d743f

Browse files
committed
chore: check ci missing files
1 parent 64364c2 commit 33d743f

File tree

3 files changed

+113
-1
lines changed

3 files changed

+113
-1
lines changed

.github/workflows/cortex-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI Cortex CPP
1+
name: CI Cortex Release
22

33
on:
44
push:

.github/workflows/test-cortex-js.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CI Cortex
2+
3+
on:
4+
push:
5+
branches:
6+
- chore/ci-missing-files
7+
workflow_dispatch:
8+
jobs:
9+
build-cortex-single-binary:
10+
runs-on: ${{ matrix.runs-on }}
11+
timeout-minutes: 20
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- os: "linux"
17+
name: "amd64"
18+
runs-on: "ubuntu-latest"
19+
20+
- os: "windows"
21+
name: "amd64"
22+
runs-on: "windows-2019"
23+
24+
- os: "mac"
25+
name: "amd64"
26+
runs-on: "macos-13"
27+
28+
- os: "mac"
29+
name: "arm64"
30+
runs-on: "macos-latest"
31+
steps:
32+
- name: Clone
33+
id: checkout
34+
uses: actions/checkout@v3
35+
with:
36+
submodules: recursive
37+
38+
- uses: actions/setup-dotnet@v3
39+
if: runner.os == 'Windows'
40+
with:
41+
dotnet-version: "8.0.x"
42+
43+
- name: Install choco on Windows
44+
if: runner.os == 'Windows'
45+
run: |
46+
choco install make -y
47+
48+
- uses: actions/setup-node@v3
49+
with:
50+
node-version: "20.x"
51+
registry-url: "https://registry.npmjs.org"
52+
53+
- run: npm install -g yarn
54+
55+
- run: yarn install && yarn build && yarn build:binary
56+
working-directory: ./cortex-js
57+
58+
- name: Get Cer for code signing
59+
if: runner.os == 'macOS'
60+
run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12
61+
shell: bash
62+
env:
63+
CODE_SIGN_P12_BASE64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
64+
65+
- uses: apple-actions/import-codesign-certs@v2
66+
if: runner.os == 'macOS'
67+
with:
68+
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
69+
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
70+
71+
- name: Code Signing macOS
72+
if: runner.os == 'macOS'
73+
run: |
74+
cd cortex-js
75+
make codesign CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}"
76+
77+
- name: Compile .ISS to .EXE Installer
78+
uses: Minionguyjpro/[email protected]
79+
if: runner.os == 'Windows'
80+
with:
81+
path: cortex-js/installer.iss
82+
options: /O+
83+
84+
- uses: nick-fields/retry@v3
85+
with:
86+
continue_on_error: true
87+
retry_wait_seconds: 10
88+
timeout_minutes: 10
89+
max_attempts: 3
90+
shell: cmd
91+
command: |
92+
cd cortex-js
93+
set PATH=%PATH%;%USERPROFILE%\.dotnet\tools
94+
make codesign CODE_SIGN=true AZURE_KEY_VAULT_URI="${{ secrets.AZURE_KEY_VAULT_URI }}" AZURE_CLIENT_ID="${{ secrets.AZURE_CLIENT_ID }}" AZURE_TENANT_ID="${{ secrets.AZURE_TENANT_ID }}" AZURE_CLIENT_SECRET="${{ secrets.AZURE_CLIENT_SECRET }}" AZURE_CERT_NAME="${{ secrets.AZURE_CERT_NAME }}"
95+
name: Code Signing Windows
96+
if: runner.os == 'Windows'
97+
98+
- name: Post-Bundle
99+
run: |
100+
cd cortex-js
101+
make postbundle
102+
103+
- name: Upload Artifact
104+
uses: actions/upload-artifact@v2
105+
with:
106+
name: cortex-${{ matrix.os }}-${{ matrix.name }}
107+
path: |
108+
./cortex-js/cortex
109+
./cortex-js/cortex.exe
110+
./cortex-js/setup.exe

cortex-js/src/infrastructure/commanders/serve.command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { join } from 'path';
88
import { SetCommandContext } from './decorators/CommandContext';
99
import { ServeStopCommand } from './sub-commands/serve-stop.command';
1010
import { ContextService } from '../services/context/context.service';
11+
import { readdirSync } from 'fs';
1112

1213
type ServeOptions = {
1314
address?: string;
@@ -38,6 +39,7 @@ export class ServeCommand extends CommandRunner {
3839
port: number,
3940
options: ServeOptions = { detach: false },
4041
) {
42+
console.log(readdirSync(join('../../../dist')));
4143
const serveProcess = spawn(
4244
'node',
4345
[join(__dirname, '../../../dist/src/main.js')],

0 commit comments

Comments
 (0)