From 7d86e2f2859e515a90ba56c4ec851a64f73d3f0c Mon Sep 17 00:00:00 2001 From: lwthiker Date: Sun, 17 Apr 2022 17:30:53 +0300 Subject: [PATCH] Add make target to check that build is correct Add a few checks as in f320cec to ensure that 'curl-impersonate' was compiled with all the required features (compression, tls, http2). --- .github/workflows/build-and-test-make.yml | 2 ++ Makefile.in | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/build-and-test-make.yml b/.github/workflows/build-and-test-make.yml index 4433035..8a15e68 100644 --- a/.github/workflows/build-and-test-make.yml +++ b/.github/workflows/build-and-test-make.yml @@ -47,11 +47,13 @@ jobs: - name: Build the Chrome version of curl-impersonate run: | make chrome-build + make chrome-checkbuild make chrome-install - name: Build the Firefox version of curl-impersonate run: | make firefox-build + make firefox-checkbuild make firefox-install - name: Prepare the tests diff --git a/Makefile.in b/Makefile.in index 1b7ba46..ef4c92d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -48,6 +48,16 @@ firefox-build: $(CURL_VERSION)/.firefox ## Build the Firefox version of curl-imp $(MAKE) MAKEFLAGS= .PHONY: firefox-build +firefox-checkbuild: ## Run basic checks on the built binary + cd $(CURL_VERSION) + # Make sure all needed features were compiled in + ./src/curl-impersonate-ff -V | grep -q zlib + ./src/curl-impersonate-ff -V | grep -q brotli + ./src/curl-impersonate-ff -V | grep -q nghttp2 + ./src/curl-impersonate-ff -V | grep -q NSS + $(info Build OK) +.PHONY: firefox-checkbuild + firefox-install: ## Install the Firefox version of curl-impersonate after build cd $(CURL_VERSION) $(MAKE) install-exec MAKEFLAGS= @@ -67,6 +77,16 @@ chrome-build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impers $(MAKE) MAKEFLAGS= .PHONY: chrome-build +chrome-checkbuild: ## Run basic checks on the built binary + cd $(CURL_VERSION) + # Make sure all needed features were compiled in + ./src/curl-impersonate-chrome -V | grep -q zlib + ./src/curl-impersonate-chrome -V | grep -q brotli + ./src/curl-impersonate-chrome -V | grep -q nghttp2 + ./src/curl-impersonate-chrome -V | grep -q BoringSSL + $(info Build OK) +.PHONY: chrome-checkbuild + chrome-install: ## Install the Chrome version of curl-impersonate after build cd $(CURL_VERSION) $(MAKE) install-exec MAKEFLAGS=