Skip to content

Commit

Permalink
Back to working
Browse files Browse the repository at this point in the history
  • Loading branch information
docktermj committed Feb 26, 2025
1 parent aa4a2aa commit 0a82836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/go-test-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,20 @@ jobs:
with:
senzingsdk-repository-path: ${{ secrets.SENZING_OSX_BETA_REPOSITORY }}

- name: Set environment variables
run: |
SENZING_PATH="${HOME}/senzing"
{
echo "SENZING_PATH=${SENZING_PATH}"
echo "LD_LIBRARY_PATH=${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
echo "DYLD_LIBRARY_PATH=${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
echo "SENZING_DATA_DIR=${SENZING_PATH}/er/data"
echo CGO_CFLAGS="-g -I${SENZING_PATH}/er/sdk/c"
echo CGO_LDFLAGS="-L${SENZING_PATH}/er/lib -lSz -Wl,-no_warn_duplicate_libraries"
} >> "$GITHUB_ENV"
- name: Copy /etc files
run: sudo mkdir -p "${SENZING_PATH}/etc" && sudo cp testdata/senzing-license/g2.lic "${SENZING_PATH}/etc/g2.lic"
run: sudo mkdir -p "${HOME}/senzing/er/etc" && sudo cp testdata/senzing-license/g2.lic "${HOME}/senzing/er/etc/g2.lic"

- name: Copy test database files
run: mkdir -p /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/

- name: Run go test
run: go test -exec "${GITHUB_WORKSPACE}/bin/macos_exec_dyld.sh" -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
run: |
export SENZING_PATH="${HOME}/senzing"
export DYLD_LIBRARY_PATH="${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
export LD_LIBRARY_PATH="${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
export CGO_CFLAGS="-g -I${SENZING_PATH}/er/sdk/c"
export CGO_LDFLAGS="-L${SENZING_PATH}/er/lib -lSz -Wl,-no_warn_duplicate_libraries"
go test -exec "${GITHUB_WORKSPACE}/bin/macos_exec_dyld.sh" -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Store coverage file
uses: actions/upload-artifact@v4
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
go-test-linux:
name: "Go test with Senzing: ${{ matrix.senzingsdk-version }}; OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
name: "Go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -47,13 +47,11 @@ jobs:
- name: Copy test database files
run: mkdir -p /tmp/sqlite && cp testdata/sqlite/G2C.db /tmp/sqlite/

- name: Set environment variables
- name: Run go test
run: |
export SENZING_PATH="/opt/senzing"
export LD_LIBRARY_PATH="${SENZING_PATH}/er/lib:${SENZING_PATH}/er/lib/macos"
- name: Run go test
run: go test -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
go test -json -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Store coverage file
uses: actions/upload-artifact@v4
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/go-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,11 @@ jobs:
- name: Copy test database files
run: mkdir "C:\Temp\sqlite" && copy testdata/sqlite/G2C.db "C:\Temp\sqlite\G2C.db"

- name: Set environment variables
- name: Run go test
run: |
$Env:SENZING_PATH = "$Env:USERPROFILE\Senzing"
$Env:CGO_CFLAGS = "-g -I$Env:SENZING_PATH\er\sdk\c"
$Env:CGO_LDFLAGS = "-L$Env:SENZING_PATH\er\lib -lSz"
- name: view environemnt variables
run: env

- name: Run go test
run: |
go test -json -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./... 2>&1 | tee "C:\Temp\gotest.log" | gotestfmt
cp cover cover.out
Expand Down

0 comments on commit 0a82836

Please sign in to comment.