Skip to content

Commit

Permalink
#143 Update template (#171)
Browse files Browse the repository at this point in the history
* #143 Update go version

* #143 Add enablement for macOS/Windows

* #143 Added CGO_LDFLAGS

* #143 Update FROM

* #143 Update dependencies

* #143 Update docker

* #143 Update

* #143 Update template

* #143 Update dependencies
  • Loading branch information
docktermj authored Nov 1, 2024
1 parent 1038a69 commit 593e65d
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ docs/
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
docker-compose.test.yml
docker-compose.test.yaml
LICENSE
README.md
3 changes: 2 additions & 1 deletion .github/workflows/go-test-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Go test darwin
on: [pull_request, workflow_dispatch]

env:
CGO_LDFLAGS: "-Wl,-no_warn_duplicate_libraries"
DYLD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
LD_LIBRARY_PATH: /opt/senzing/er/lib:/opt/senzing/er/lib/macos
SENZING_LOG_LEVEL: TRACE
Expand All @@ -18,7 +19,7 @@ jobs:
strategy:
matrix:
go: ["1.21"]
os: [macos-13]
os: [macos-latest]
senzingapi-version: [staging-v4]

steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/go-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
senzingapi-version: ${{ matrix.senzingapi-version }}

- name: Add to "Path" environment variable
run: printf "C:\Program Files\Senzing\er\lib" | Out-File -FilePath "$env:GITHUB_PATH" -Encoding utf8 -Append
run: |
# shellcheck disable=SC2028
echo "C:\Program Files\Senzing\er\lib" >> "$env:GITHUB_PATH"
- name: Copy /etc files
run: copy testdata/senzing-license/g2.lic "C:\Program Files\Senzing\er\etc\g2.lic"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ jobs:

- name: Copy Senzing headers
run: |
mkdir --parents ./szconfig/gohelpers
mkdir --parents ./szconfig/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szconfig/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfig/gohelpers
mkdir --parents ./szconfigmanager/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szconfig/szhelpers
mkdir --parents ./szconfigmanager/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szconfigmanager/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfigmanager/gohelpers
mkdir --parents ./szdiagnostic/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szconfigmanager/szhelpers
mkdir --parents ./szdiagnostic/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szdiagnostic/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szdiagnostic/gohelpers
mkdir --parents ./szengine/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szdiagnostic/szhelpers
mkdir --parents ./szengine/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szengine/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szengine/gohelpers
mkdir --parents ./szproduct/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szengine/szhelpers
mkdir --parents ./szproduct/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szproduct/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szproduct/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szproduct/szhelpers
- name: Setup go
uses: actions/setup-go@v5
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Stages
# -----------------------------------------------------------------------------

ARG IMAGE_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_FINAL=senzing/senzingapi-runtime-staging:latest
ARG IMAGE_BUILDER=golang:1.23.2-bullseye
ARG IMAGE_FINAL=senzing/senzingapi-runtime-beta:latest

# -----------------------------------------------------------------------------
# Stage: senzingapi_runtime
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ require (
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -30,9 +30,9 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
19 changes: 10 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
Expand Down Expand Up @@ -53,12 +54,12 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
4 changes: 2 additions & 2 deletions makefiles/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

SENZING_DIR ?= /opt/senzing/er
SENZING_TOOLS_SENZING_DIRECTORY ?= $(SENZING_DIR)

LD_LIBRARY_PATH ?= $(SENZING_TOOLS_SENZING_DIRECTORY)/lib:$(SENZING_TOOLS_SENZING_DIRECTORY)/lib/macos
DYLD_LIBRARY_PATH := $(LD_LIBRARY_PATH)
SENZING_TOOLS_DATABASE_URL ?= sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
CGO_LDFLAGS := "-Wl,-no_warn_duplicate_libraries"
PATH := $(MAKEFILE_DIRECTORY)/bin:/$(HOME)/go/bin:$(PATH)
SENZING_TOOLS_DATABASE_URL ?= sqlite3://na:na@nowhere/tmp/sqlite/G2C.db

# -----------------------------------------------------------------------------
# OS specific targets
Expand Down
4 changes: 2 additions & 2 deletions package.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Stages
# -----------------------------------------------------------------------------

ARG IMAGE_SENZINGAPI_RUNTIME=senzing/senzingapi-runtime-staging:latest
ARG IMAGE_BUILDER=golang:1.22.3-bullseye
ARG IMAGE_SENZINGAPI_RUNTIME=senzing/senzingapi-runtime-beta:latest
ARG IMAGE_BUILDER=golang:1.22.4-bullseye
ARG IMAGE_FPM=dockter/fpm:latest
ARG IMAGE_FINAL=alpine

Expand Down

0 comments on commit 593e65d

Please sign in to comment.