diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3c2334186..c715fe73b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,6 +41,7 @@ jobs: uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} + build-mode: manual # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. @@ -48,21 +49,12 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh + - name: Build + run: | + make ${{ matrix.language == 'go' && 'daemon' || 'agent' }} - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/daemon/Makefile b/daemon/Makefile index 145d51147..6d2aca5fa 100644 --- a/daemon/Makefile +++ b/daemon/Makefile @@ -46,21 +46,13 @@ clean: clean-bin: $(GO) clean $(GOFLAGS) -i ./... -# setup depenencies for daemon -# THIS IS TEMPORARY NEEDS TO BE REPLACED BY PINNED VENDOR DEPENDENCIES -# will download vendor dependencies -.PHONY: go-setup-dependencies -go-setup-dependencies: - $(GO) mod tidy - $(GO) mod vendor - # Build the binaries .PHONY: $(BINARIES) -$(BINARIES): clean-bin go-setup-dependencies +$(BINARIES): clean-bin $(GO) install $(GOFLAGS) $(GO_MODULE)/cmd/$@ # the -race flag enabled the integrated Go race detector. Output to stderr. -race: clean-bin go-setup-dependencies +race: clean-bin $(GO) install -race $(GOFLAGS) $(GO_MODULE)/$@ # Test targets @@ -76,10 +68,10 @@ cover: rm -f $(DAEMON_COV_FILE) .PHONY: integration -integration: go-setup-dependencies +integration: $(GO) test $(GOFLAGS) -tags integration ./... .PHONY: test -test: go-setup-dependencies +test: $(GO) test $(GOFLAGS) ./... diff --git a/daemon/go.mod b/daemon/go.mod index 06d57f2a1..41f8c79ed 100644 --- a/daemon/go.mod +++ b/daemon/go.mod @@ -1,6 +1,7 @@ module github.com/newrelic/newrelic-php-agent/daemon -go 1.21.1 +go 1.21 +toolchain go1.22.3 require ( github.com/golang/protobuf v1.5.3 diff --git a/go.work b/go.work deleted file mode 100644 index 05e497662..000000000 --- a/go.work +++ /dev/null @@ -1,3 +0,0 @@ -go 1.21.1 - -use ./daemon diff --git a/go.work.sum b/go.work.sum deleted file mode 100644 index 207fd9712..000000000 --- a/go.work.sum +++ /dev/null @@ -1 +0,0 @@ -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=