Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Oct 10, 2024
1 parent c0d6908 commit 1304c86
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: /package/app

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
2 changes: 1 addition & 1 deletion packages/app/src/lib/circuit-gen/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const CIRCUIT_OUT_DIR = "./output/circuit"
const CODE_OUT_DIR = "./output/code"
const PTAU_PATH = process.env.PTAU_PATH || ""

export function circuitCompilationLogPath(circuitSlug: string): string {
function circuitCompilationLogPath(circuitSlug: string): string {
return path.join(CIRCUIT_OUT_DIR, circuitSlug, 'circuit.log');
}

Expand Down
14 changes: 12 additions & 2 deletions packages/app/src/lib/models/logs.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
"use server";

import { circuitCompilationLogPath } from "../circuit-gen/gen";
import { codeGenerationLogPath } from "../code-gen/gen";
import fs from "fs";
import path from "path";

const CIRCUIT_OUT_DIR = "./output/circuit"
const outputDir = path.join(process.env.GENERATED_OUTPUT_DIR || "./output", 'code')

function codeGenerationLogPath(circuitSlug: string): string {
return path.join(outputDir, circuitSlug, 'code.log');
}

function circuitCompilationLogPath(circuitSlug: string): string {
return path.join(CIRCUIT_OUT_DIR, circuitSlug, 'circuit.log');
}

export async function getLogs(slug: string) {
const codeLogPath = codeGenerationLogPath(slug);
Expand Down

0 comments on commit 1304c86

Please sign in to comment.