Skip to content

Commit

Permalink
squash! test amalgamation build on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Feb 27, 2025
1 parent 44034c4 commit 1d3a358
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,29 @@ jobs:
- name: test
run: |
make test
amalgam:
strategy:
matrix:
# TODO(bnoordhuis) test on windows
config:
- { os: ubuntu-latest }
- { os: macos-latest }
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
- name: build
run: |
make
- name: copy files
run: |
cp quickjs.h run-test262.c $RUNNER_TEMP
- name: create amalgamation
run: |
build/qjs amalgam.js $RUNNER_TEMP/quickjs-amalgam.c
- name: build amalgamation
run: |
cd $RUNNER_TEMP && cc -Wall -o run-test262 run-test262.c quickjs-amalgam.c
- name: test
run: |
make test RUN262=$RUNNER_TEMP/run-test262
2 changes: 1 addition & 1 deletion amalgam.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ source = source.replace(/#include "quickjs-atom.h"/g, quickjs_atom_h)
source = source.replace(/#include "quickjs-opcode.h"/g, quickjs_opcode_h)
source = source.replace(/#include "libregexp-opcode.h"/g, libregexp_opcode_h)
source = source.replace(/#include "[^"]+"/g, "")
writeFile("quickjs-amalgam.c", source)
writeFile(execArgv[2] ?? "quickjs-amalgam.c", source)

0 comments on commit 1d3a358

Please sign in to comment.