From 6cc5bf73641e7aef6c0b0d0a8fd69a7c7e5c23ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 7 Dec 2023 00:24:52 +0100 Subject: [PATCH 1/2] Simplify Makefile --- .github/workflows/ci.yml | 14 +++----------- Makefile | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad58e522..8d2685c72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -365,27 +365,19 @@ jobs: - uses: actions/checkout@v3 - name: build - - # Plain `make` fails here with this error: - # No rule to make target '/cygdrive/d/a/quickjs-ng/quickjs-ng/cutils.c', - # needed by 'CMakeFiles/qjs.dir/cutils.c.o'. Stop. - # - # For some reason, making the build directory then `make`ing in there - # fixes it. run: | cd $GITHUB_WORKSPACE - make build/CMakeCache.txt - make --directory build + make - name: stats run: | cd $GITHUB_WORKSPACE - make --debug stats + make stats - name: test run: | cd $GITHUB_WORKSPACE - make --debug test + make test openbsd: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 92192e517..d2d2354dc 100644 --- a/Makefile +++ b/Makefile @@ -32,15 +32,15 @@ QJS=$(BUILD_DIR)/qjs RUN262=$(BUILD_DIR)/run-test262 -all: build +all: $(QJS) -build: $(BUILD_DIR)/CMakeCache.txt - cmake --build $(BUILD_DIR) -j $(JOBS) - -$(BUILD_DIR)/CMakeCache.txt: +$(BUILD_DIR): cmake -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -install: build +$(QJS): $(BUILD_DIR) + cmake --build $(BUILD_DIR) -j $(JOBS) + +install: $(QJS) cmake --build $(BUILD_DIR) --target install clean: @@ -52,10 +52,10 @@ debug: distclean: @rm -rf $(BUILD_DIR) -stats: build +stats: $(QJS) $(QJS) -qd -test: build +test: $(QJS) $(QJS) tests/test_bigint.js $(QJS) tests/test_closure.js $(QJS) tests/test_language.js @@ -65,19 +65,19 @@ test: build $(QJS) tests/test_worker.js $(QJS) tests/test_queue_microtask.js -test262: build +test262: $(QJS) $(RUN262) -m -c test262.conf -a -test262-update: build +test262-update: $(QJS) $(RUN262) -u -c test262.conf -a -test262-check: build +test262-check: $(QJS) $(RUN262) -m -c test262.conf -E -a -microbench: build +microbench: $(QJS) $(QJS) tests/microbench.js -unicode_gen: $(BUILD_DIR)/CMakeCache.txt +unicode_gen: $(BUILD_DIR) cmake --build $(BUILD_DIR) --target unicode_gen libunicode-table.h: unicode_gen From d7b77348cb36c7acbaafaf7209d2c57ffc5a31dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 7 Dec 2023 09:26:11 +0100 Subject: [PATCH 2/2] fixup! --- .github/workflows/ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d2685c72..bf0952e86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -356,6 +356,9 @@ jobs: defaults: run: shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + env: + CYGWIN_NOWINPATH: 1 + CHERE_INVOKING: 1 steps: - name: Set up Cygwin uses: cygwin/cygwin-install-action@master @@ -365,19 +368,13 @@ jobs: - uses: actions/checkout@v3 - name: build - run: | - cd $GITHUB_WORKSPACE - make + run: make - name: stats - run: | - cd $GITHUB_WORKSPACE - make stats + run: make stats - name: test - run: | - cd $GITHUB_WORKSPACE - make test + run: make test openbsd: runs-on: ubuntu-latest