mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-05 16:15:56 +00:00
176 lines
6.4 KiB
YAML
176 lines
6.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release-build'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
meta:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
ldflags: ${{ steps.ldflags.outputs.ldflags }}
|
|
tag: ${{ steps.tag.outputs.tag }}
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- run: echo $(git describe --tags)
|
|
- id: version
|
|
run: echo "version=$(.github/workflows/version.sh)" >> $GITHUB_OUTPUT
|
|
- id: tag
|
|
run: echo "tag=v${{ steps.version.outputs.version }}-community" >> $GITHUB_OUTPUT
|
|
- id: ldflags
|
|
run: echo "ldflags=-X github.com/featurebasedb/featurebase/v3.Version=${{ steps.tag.outputs.tag }} -X github.com/featurebasedb/featurebase/v3.Commit=${{ github.sha }}" >> $GITHUB_OUTPUT
|
|
|
|
test-meta:
|
|
runs-on: ubuntu-latest
|
|
needs: [meta]
|
|
steps:
|
|
- run: echo "version ${{needs.meta.outputs.version}}"
|
|
- run: echo "tag ${{needs.meta.outputs.tag}}"
|
|
- run: echo "ldflags ${{needs.meta.outputs.ldflags}}"
|
|
|
|
build-lattice:
|
|
runs-on: ubuntu-latest
|
|
needs: [meta]
|
|
env:
|
|
CI: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 14
|
|
|
|
- run: |
|
|
cd lattice
|
|
yarn install
|
|
yarn build
|
|
mv build ../
|
|
cd ../
|
|
rm -r lattice
|
|
mv build lattice
|
|
tar -czvf lattice.tar.gz lattice
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lattice.tar.gz
|
|
path: ./lattice.tar.gz
|
|
|
|
build-featurebase:
|
|
runs-on: ubuntu-latest
|
|
needs: [meta]
|
|
|
|
strategy:
|
|
matrix:
|
|
goos:
|
|
- "darwin"
|
|
- "linux"
|
|
goarch:
|
|
- "amd64"
|
|
- "arm64"
|
|
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: "^1.19.1"
|
|
|
|
- name: build featurebase
|
|
run: |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./cmd/featurebase |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-csv-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-csv |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-kafka-static-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kafka-static |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-sql-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-sql |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-github-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-github |
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-kinesis-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kinesis |
|
|
tar -cvf featurebase-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz ./build/${{ matrix.goos }}-${{ matrix.goarch }}/
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
path: ./build/${{ matrix.goos }}-${{ matrix.goarch }}/featurebase-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
|
|
|
|
# build-ingest:
|
|
# runs-on: ubuntu-latest
|
|
# needs: [meta]
|
|
|
|
# strategy:
|
|
# matrix:
|
|
# goos:
|
|
# - "darwin"
|
|
# - "linux"
|
|
# goarch:
|
|
# - "amd64"
|
|
# - "arm64"
|
|
|
|
# env:
|
|
# GOOS: ${{ matrix.goos }}
|
|
# GOARCH: ${{ matrix.goarch }}
|
|
|
|
# steps:
|
|
# - uses: actions/checkout@v3
|
|
|
|
# - uses: actions/setup-go@v3
|
|
# with:
|
|
# go-version: "^1.19.1"
|
|
|
|
# - name: build ingester
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/ingester-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/ingester
|
|
|
|
# - name: build consumer-csv
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-csv-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-csv
|
|
|
|
# - name: build consumer-kafka-static
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-kafka-static-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kafka-static
|
|
|
|
# - name: build consumer-sql
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-sql-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-sql
|
|
|
|
# - name: build consumer-github
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-github-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-github
|
|
|
|
# - name: build consumer-kinesis
|
|
# run: go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer-kinesis-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kinesis
|
|
|
|
# - uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: ingester-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
# path: ./build/${{ matrix.goos }}-${{ matrix.goarch }}/ingester-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
|
|
# - uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: consumers-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
# path: ./build/${{ matrix.goos }}-${{ matrix.goarch }}/consumer*
|
|
|
|
# bundle:
|
|
# runs-on: ubuntu-latest
|
|
# needs:
|
|
# - meta
|
|
# - build-featurebase
|
|
# - build-lattice
|
|
# - build-ingest
|
|
|
|
# strategy:
|
|
# matrix:
|
|
# goos:
|
|
# - "darwin"
|
|
# - "linux"
|
|
# goarch:
|
|
# - "amd64"
|
|
# - "arm64"
|
|
|
|
# steps:
|
|
# - uses: actions/download-artifact@v3
|
|
# with:
|
|
# name:
|
|
# path: ./build/${{ matrix.goos }}-${{ matrix.goarch }}/*
|
|
# - name: Display structure of downloaded files
|
|
# run: ls -R
|