diff --git a/.github/workflows/dev-cli.yml b/.github/workflows/dev-cli.yml index 0cfdd0ffb..927ed87a1 100644 --- a/.github/workflows/dev-cli.yml +++ b/.github/workflows/dev-cli.yml @@ -46,6 +46,41 @@ jobs: deno task test env: CI: true + build: + if: github.event_name != 'workflow_dispatch' + runs-on: ubuntu-latest + strategy: + matrix: + lang: [lua, c] + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 🦕 Setup Deno + uses: denoland/setup-deno@v1 + with: + deno-version: 1.x + + - name: Initialize and build template projects + run: | + docker build container -t p3rmaw3b/ao + echo 'export AO_INSTALL=/home/runner/.ao' >> $GITHUB_PATH + echo 'export PATH="$AO_INSTALL/bin:$PATH"' >> $GITHUB_PATH + source $GITHUB_PATH + echo 'Building and installing binaries' + deno task build-binaries && deno task install-local + echo "Building for language: ${{ matrix.lang }}" + ao init my-template -l ${{ matrix.lang }} && cd my-template && ao build + + echo 'Checking that process.wasm exists' + if [ -f "process.wasm" ]; then + echo "✅ process.wasm exists" + else + echo "❌ process.wasm is missing!" >&2 + exit 1 + fi test-node-commands: if: github.event_name != 'workflow_dispatch' diff --git a/dev-cli/container/src/ao_module_lib/languages/c.py b/dev-cli/container/src/ao_module_lib/languages/c.py index be2dedf27..fe051a063 100644 --- a/dev-cli/container/src/ao_module_lib/languages/c.py +++ b/dev-cli/container/src/ao_module_lib/languages/c.py @@ -1,8 +1,7 @@ import glob from ao_module_lib.definition import Definition -from ao_module_lib.file import BundleFile -def inject_c_files(definition: Definition, c_program: str, c_source_files: list, link_libraries: list): +def inject_c_files(definition: Definition, c_program: str, c_source_files: list): c_header_files = [] diff --git a/dev-cli/src/deps.js b/dev-cli/src/deps.js index 3a568d201..291746616 100644 --- a/dev-cli/src/deps.js +++ b/dev-cli/src/deps.js @@ -1,4 +1,4 @@ -export { Command } from 'https://deno.land/x/cliffy@v1.0.0-rc.3/command/mod.ts' +export { Command } from 'https://deno.land/x/cliffy@v1.0.0-rc.4/command/mod.ts'; export { basename, resolve } from 'https://deno.land/std@0.224.0/path/mod.ts' export { copy } from 'https://deno.land/std@0.224.0/fs/copy.ts' export { parse } from 'jsr:@std/yaml'