ci #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'v1.x' | |
- 'master' | |
tags: | |
- v* | |
jobs: | |
build: | |
name: Build the thrift compiler | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-12, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Generate build configuration | |
run: | | |
cmake \ | |
-DBUILD_COMPILER=ON \ | |
-DBUILD_LIBRARIES=OFF \ | |
-DBUILD_TESTING=OFF \ | |
-DTYPES_PREFIX=${HOME} \ | |
-DBUILD_EXAMPLES=OFF | |
- name: Build | |
run: | | |
cmake --build . --config Release | |
mv bin/thrift bin/thrift-${{ matrix.os }} | |
- name: Upload Binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: thrift-${{ matrix.os }} | |
retention-days: 1 | |
path: | | |
bin/* | |
release: | |
name: "Release binaries" | |
runs-on: ubuntu-20.04 | |
needs: build | |
if: contains(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: thrift-ubuntu-20.04 | |
path: bin/ | |
- uses: actions/download-artifact@v2 | |
with: | |
name: thrift-macos-12 | |
path: bin/ | |
- uses: actions/download-artifact@v2 | |
with: | |
name: thrift-macos-14 | |
path: bin/ | |
- name: Get Package Version | |
id: pkg_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} | |
- name: Create a new Release | |
uses: marvinpinto/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
title: ${{ steps.pkg_version.outputs.VERSION }} | |
files: | | |
bin/* |