Skip to content

Commit

Permalink
[WIP] mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Apr 14, 2024
1 parent 4c0ca2f commit 810fb76
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: release

on:
push:
tags:
- 'v*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

jobs:
release:
name: ${{ matrix.job.name }}
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
job:
- {os: "macos-12", goos: "darwin", goarch: "amd64", name: "x86_64-apple-darwin", suffix: "dylib"}
- {os: "macos-14", goos: "darwin", goarch: "arm64", name: "aarch64-apple-darwin", suffix: "dylib"}
- {os: "ubuntu-latest", goos: "linux", goarch: "amd64", name: "x86_64-linux-gnu", suffix: "so"}
- {os: "ubuntu-latest", goos: "linux", goarch: "arm64", name: "aarch64-linux-gnu", suffix: "so"}
- {os: "windows-latest", goos: "windows", goarch: "amd64", name: "x86_64-windows-msvc", suffix: "dll"}
fail-fast: false
env:
CGO_ENABLED: "1"
# set GO_VERSION according to
# https://github.com/cocoa-xu/arrow-adbc/blob/feat-mocks/.env
GO_VERSION: "1.21.8"
steps:
- name: fetch feat-mocks branch
run: |
git clone --branch feat-mocks --depth 1 https://github.com/cocoa-xu/arrow-adbc.git
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache: true
cache-dependency-path: arrow-adbc/go/adbc/go.sum

- name: Install binfmt
if: startsWith(matrix.job.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y binfmt-support qemu-user-static
- name: Go Build
shell: bash -l {0}
run: |
export PATH=$RUNNER_TOOL_CACHE/go/${GO_VERSION}/${{ matrix.job.goarch }}/bin:$PATH
export GOOS=${{ matrix.job.goos }} GOARCH=${{ matrix.job.goarch }}
cd arrow-adbc/go/adbc/pkg
go run gen/main.go -prefix Mocks -o ./mocks/ -driver ../driver/mocks
make "libadbc_driver_mocks.${{ matrix.job.suffix }}"
mv "libadbc_driver_mocks.${{ matrix.job.suffix }}" "../../../../libadbc_driver_mocks-${{ matrix.job.name }}.${{ matrix.job.suffix }}"
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
libadbc_driver_mocks-${{ matrix.job.name }}.${{ matrix.job.suffix }}

0 comments on commit 810fb76

Please sign in to comment.