From fd4ee70016f3441a239d99fb94cdff9343c63cdd Mon Sep 17 00:00:00 2001 From: Oleg Utkin Date: Wed, 30 Aug 2023 12:15:55 +0200 Subject: [PATCH] add ci --- .github/workflows/build.yml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a323139 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: build + +on: + push: + tags: + - "v*.*.*" + +env: + K6_VERSION: v0.46.0 + XK6_VERSION: v0.9.2 + GO_VERSION: 1.21 + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + os: [linux, darwin] + arch: [amd64] + env: + ARTIFACT_NAME: k6-${{ matrix.os }}-${{ matrix.arch }} + steps: + - uses: actions/setup-go@v4 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Checkout + uses: actions/checkout@v3 + + - name: Install xk6 + run: go install go.k6.io/xk6/cmd/xk6@${{ env.XK6_VERSION }} + + - name: Build k6 with tarantool-xk6 extension + run: | + xk6 build ${{ env.K6_VERSION }} \ + --with github.com/tarantool/xk6-tarantool=. \ + --output ${{ env.ARTIFACT_NAME }} + env: + CGO_ENABLED: "0" + GOFLAGS: "-tags=go_tarantool_ssl_disable,go_tarantool_call_17,go_tarantool_msgpack_v5" + GOOS: ${{ matrix.os }} + GOARCH: ${{ matrix.arch }} + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ${{ env.ARTIFACT_NAME }}