Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue where queries fail with undefined symbol: _res_search. Closes #408 #409

Merged
merged 12 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading