Skip to content

Commit

Permalink
Fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
auxten committed Dec 23, 2023
1 parent 9845a5c commit d00ae3b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/chdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@ on:
- '**/.md'

jobs:
build:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
make install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: |
go mod tidy
make build
- name: Test
run: LD_LIBRARY_PATH=./ ./chdb-go "SELECT 12345"

build_mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
make install
Expand Down
40 changes: 36 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
types: [created]

jobs:

build:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +21,7 @@ jobs:
go mod tidy
make build
- name: Test
run: ./chdb-go "SELECT 12345"
run: LD_LIBRARY_PATH=. ./chdb-go "SELECT 12345"
- name: Get Version
run: |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
Expand All @@ -38,4 +37,37 @@ jobs:
release_name: chdbgo_${{ env.VERSION }}
draft: false
prerelease: false
overwrite: true
overwrite: true
build_mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Fetch library
run: |
make install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: |
go mod tidy
make build
- name: Test
run: ./chdb-go "SELECT 12345"
- name: Get Version
run: |
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Upload release
if: github.event_name != 'pull_request'
uses: boxpositron/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_config: |
chdb-go-macos
tag_name: ${{ env.VERSION }}
release_name: chdbgo_${{ env.VERSION }}
draft: false
prerelease: false
overwrite: true
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ install: update_libchdb
sudo cp -a libchdb.so /usr/local/lib
# if on Linux run `sudo ldconfig` to update the cache
# if on macOS run `sudo update_dyld_shared_cache` to update the cache
if [ "$$OSTYPE" == "linux-gnu" ]; then sudo ldconfig; fi

test:
CGO_ENABLED=1 go test -v -coverprofile=coverage.out ./...

Expand Down

0 comments on commit d00ae3b

Please sign in to comment.