Skip to content

Commit 1d3a358

Browse files
committed
squash! test amalgamation build on ci
1 parent 44034c4 commit 1d3a358

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,3 +566,29 @@ jobs:
566566
- name: test
567567
run: |
568568
make test
569+
570+
amalgam:
571+
strategy:
572+
matrix:
573+
# TODO(bnoordhuis) test on windows
574+
config:
575+
- { os: ubuntu-latest }
576+
- { os: macos-latest }
577+
runs-on: ${{ matrix.config.os }}
578+
steps:
579+
- uses: actions/checkout@v4
580+
- name: build
581+
run: |
582+
make
583+
- name: copy files
584+
run: |
585+
cp quickjs.h run-test262.c $RUNNER_TEMP
586+
- name: create amalgamation
587+
run: |
588+
build/qjs amalgam.js $RUNNER_TEMP/quickjs-amalgam.c
589+
- name: build amalgamation
590+
run: |
591+
cd $RUNNER_TEMP && cc -Wall -o run-test262 run-test262.c quickjs-amalgam.c
592+
- name: test
593+
run: |
594+
make test RUN262=$RUNNER_TEMP/run-test262

amalgam.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ source = source.replace(/#include "quickjs-atom.h"/g, quickjs_atom_h)
4343
source = source.replace(/#include "quickjs-opcode.h"/g, quickjs_opcode_h)
4444
source = source.replace(/#include "libregexp-opcode.h"/g, libregexp_opcode_h)
4545
source = source.replace(/#include "[^"]+"/g, "")
46-
writeFile("quickjs-amalgam.c", source)
46+
writeFile(execArgv[2] ?? "quickjs-amalgam.c", source)

0 commit comments

Comments
 (0)