Skip to content

Commit

Permalink
Fixes issue where queries fail with undefined symbol: _res_search. C…
Browse files Browse the repository at this point in the history
…loses #408
  • Loading branch information
binaek authored Feb 1, 2024
1 parent 3e2ae64 commit 7816f7f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
build_and_test:
name: Build and run tests
needs: golangci_lint
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
Expand All @@ -39,24 +39,6 @@ jobs:
repository: turbot/steampipe
path: steampipe

- name: Build Steampipe
run: |
echo "PATH=$PATH:$HOME/build:/home/runner" >> $GITHUB_ENV
ls /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw
cd /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/steampipe
go get
go build -o /home/runner/steampipe
- name: Run steampipe
run: |
steampipe query "select 1 as col"
- name: Checkout FDW
uses: actions/checkout@v4
with:
repository: turbot/steampipe-postgres-fdw
path: steampipe-postgres-fdw

- name: Fetching Go Cache Paths
id: go-cache-paths
run: |
Expand All @@ -76,6 +58,24 @@ jobs:
with:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Build Steampipe
run: |
echo "PATH=$PATH:$HOME/build:/home/runner" >> $GITHUB_ENV
ls /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw
cd /home/runner/work/steampipe-postgres-fdw/steampipe-postgres-fdw/steampipe
go get
go build -o /home/runner/steampipe
- name: Run steampipe
run: |
steampipe query "select 1 as col"
- name: Checkout FDW
uses: actions/checkout@v4
with:
repository: turbot/steampipe-postgres-fdw
path: steampipe-postgres-fdw

- name: Setup apt-get
run: |-
Expand Down Expand Up @@ -113,6 +113,17 @@ jobs:
run: |
cd ~/work/steampipe-postgres-fdw/steampipe-postgres-fdw/steampipe-postgres-fdw/
make install
- name: GZip
run: |
cd ~/work/steampipe-postgres-fdw/steampipe-postgres-fdw/steampipe-postgres-fdw
tar -czvf ../build.tar.gz ./build-$(uname)
- name: Upload FDW Build
uses: actions/upload-artifact@v4
with:
name: fdw-build
path: build.tar.gz

- name: Setup BATS
uses: mig4/setup-bats@v1
Expand Down
2 changes: 1 addition & 1 deletion fdw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ go: ../fdw.go
# we are building with the net package from go
# this has the caveat that, since we are not binding to lresolv, DNS resolution may
# have some subtle differences from system DNS resolution
CGO_ENABLED=1 go build -o steampipe_postgres_fdw.a -tags "$(BUILD_TAGS)" -buildmode=c-archive ../*.go
CGO_ENABLED=1 go build -o steampipe_postgres_fdw.a -tags "$(BUILD_TAGS)" -buildmode=c-archive ../*.go

inst:
mkdir -p ../build-${PLATFORM}
Expand Down

0 comments on commit 7816f7f

Please sign in to comment.