Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Aug 29, 2024
1 parent 987305e commit 9e4abd9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/wf_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,12 @@ jobs:
- name: "Verify if we need to build"
id: verify-build
run: |
export drvPath=$(make check-dry-run-go)
export drvPath=$(make check-dry-run)
echo "drvPath - $drvPath"
nix store verify --no-trust --store http://127.0.0.1:37515 $drvPath \
&& export BUILD_NEEDED=no \
|| export BUILD_NEEDED=yes
if [ "$BUILD_NEEDED" != "yes" ]; then
export check_dry_run_output=$(make check-dry-run-node)
export drvPath=$(echo "$check_dry_run_output" | grep -oE '"out":.*"' | awk -F\" '{ print $4 }')
nix store verify --no-trust --store http://127.0.0.1:37515 $drvPath \
&& export BUILD_NEEDED=no \
|| export BUILD_NEEDED=yes
fi
echo BUILD_NEEDED=$BUILD_NEEDED >> $GITHUB_OUTPUT
echo DERIVATION_PATH=$drvPath >> $GITHUB_OUTPUT
Expand Down
34 changes: 29 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
ifdef VER
VERSION=$(shell echo $(VER) | sed -e 's/^v//g' -e 's/\//_/g')
else
VERSION=$(shell grep -oP 'version\s*=\s*"\K[^"]+' flake.nix)
endif

ifeq ($(shell uname -m),x86_64)
ARCH?=x86_64
else ifeq ($(shell uname -m),arm64)
ARCH?=aarch64
else ifeq ($(shell uname -m),aarch64)
ARCH?=aarch64
else
ARCH?=FIXME-$(shell uname -m)
endif

ifeq ($(shell uname -o),Darwin)
OS?=darwin
else
OS?=linux
endif

DEV_ENV_PATH=build/dev
DOCKER_DEV_ENV_PATH=$(DEV_ENV_PATH)/docker
GITHUB_REF_NAME?="0.0.0-dev"
VERSION=$(shell echo $(GITHUB_REF_NAME) | sed -e 's/^v//g' -e 's/\//_/g')


.PHONY: help
Expand All @@ -23,15 +44,18 @@ get-version: ## Return version
@echo $(VERSION)


.PHONY: tests
tests: dev-env-up check ## Spin environment and run nix flake check


.PHONY: check
check: ## Run nix flake check
./build/nix.sh flake check --print-build-logs


.PHONY: check-dry-run
check-dry-run: ## Run nix flake check
@nix path-info \
--derivation \
.\#checks.$(ARCH)-$(OS).go-checks


.PHONY: integration-tests
integration-tests: ## Run go test with integration flags
@HASURA_AUTH_BEARER=$(shell make -s dev-jwt) \
Expand Down

0 comments on commit 9e4abd9

Please sign in to comment.