Skip to content

Main Build Test

Main Build Test #22

Workflow file for this run

name: Main Build Test
on:
schedule:
- cron: '30 0 * * 6' # Runs every Saturday at midnight
workflow_dispatch: # Allows manual triggering
jobs:
build-and-deploy:
runs-on: ubuntu-latest
#permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
#contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
repository: eelab-dev/EEcircuit-engine
ref: main # Checkout the "main" branch
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create Empty Build Directory
run: mkdir -p Docker/build
- name: Build Docker Image
run: docker build --no-cache -t eecircuit ./Docker
- name: Run Docker Container
run: docker run -t -v $(realpath ./Docker):/mnt eecircuit
- name: Run Inject.mjs
run: node ./Docker/inject.mjs
- name: Rename and Copy Files to Main Directory
run: |
cp ./Docker/build/spice.wasm ./src/spice.wasm
cp ./Docker/build/spice-eesim.js ./src/spice.js
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- name: Update Dependencies
run: npx --yes npm-check-updates -u
- name: Install Dependencies
run: npm install
- name: Build Project with Vite
run: npm run build
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Test
run: deno --allow-read --allow-write ./test/test.ts