Skip to content

Update go.yml

Update go.yml #24

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.5'
- name: Install clidriver
run: |
pwd
go run installer/setup.go
pwd
ibm_db_home=/home/runner/work/clidriver
cgo_cflags=-I$ibm_db_home/include
cgo_ldflags=-L$ibm_db_home/lib
ld_library_path=$ibm_db_home/lib
echo "IBM_DB_HOME=$ibm_db_home" >> "$GITHUB_ENV"
echo "CGO_CFLAGS=$cgo_cflags" >> "$GITHUB_ENV"
echo "CGO_LDFLAGS=$cgo_ldflags" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$ld_library_path" >> "$GITHUB_ENV"
# - name: Test
# env:
# DB2_CONNSTR: ${{ secrets.DB2_CONNSTR }}
# run: |
# pwd
# cd testdata
# echo "============TEST CASES ======"
# go test -v