Skip to content

Upgrade to 0.19.0

Upgrade to 0.19.0 #66

name: Build and upload binaries after release
on:
pull_request:
release:
types: [created]
jobs:
publish:
name: Build and upload for ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- platform: Linux x86_64
os: ubuntu-latest
artifact-path: compiler/cpp/cmake-build/bin
asset-name: thrift-${{ github.ref_name }}-linux-amd64.tar.gz
install-deps: sudo apt update && sudo apt install -yq automake bison flex cmake
build-command: make
cmake-parameters: -DSTATIC=ON
- platform: Macos ARM64
os: macos-latest
artifact-path: compiler/cpp/cmake-build/bin/Debug
asset-name: thrift-${{ github.ref_name }}-darwin-arm64.tar.gz
install-deps: brew install automake bison flex cmake && echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV
build-command: cmake --build .
cmake-parameters: -G "Xcode"
- platform: Linux ARM64
os: ubuntu-latest
artifact-path: compiler/cpp/cmake-build/bin
asset-name: thrift-${{ github.ref_name }}-linux-arm64.tar.gz
install-deps: sudo apt update && sudo apt install -yq automake bison flex cmake g++-aarch64-linux-gnu
build-command: make
cmake-parameters: -DSTATIC=ON -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/build/cmake/Linux-ARM64.cmake"
steps:
- uses: actions/checkout@v2
- name: Install deps
run: ${{ matrix.install-deps }}
- name: Build
run: |
cd compiler/cpp && \
mkdir cmake-build && \
cd cmake-build && \
cmake ${{ matrix.cmake-parameters }} .. && \
${{ matrix.build-command }}
env:
CMAKE_OSX_ARCHITECTURES: arm64
CXXFLAGS: -std=c++11
- name: Make dist
if: ${{ github.event_name == 'release' }}
run: mkdir dist && tar -czvf dist/${{ matrix.asset-name }} -C ${{ matrix.artifact-path }} thrift
- name: Upload binaries to release
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/${{ matrix.asset-name }}
tag: ${{ github.ref }}