Skip to content

contrib/thrift-docker: Ditch the tty binding #57

contrib/thrift-docker: Ditch the tty binding

contrib/thrift-docker: Ditch the tty binding #57

Workflow file for this run

name: ci
on:
push:
branches:
- 'master'
pull_request:
jobs:
compute-version:
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.bump-version.outputs.version }}
steps:
- name: Bump version
id: bump-version
uses: upfluence/actions/bump-version@master
build:
name: Build the thrift compiler
needs: compute-version
strategy:
matrix:
os: [ubuntu-20.04, macos-12, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate build configuration
env:
THRIFT_VERSION: ${{ needs.compute-version.outputs.version }}
run: |
cmake \
-DTHRIFT_VERSION=${THRIFT_VERSION#v}-upfluence \
-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@v4
with:
name: thrift-${{ matrix.os }}
retention-days: 2
path: bin/*
release:
name: "Release binaries"
runs-on: ubuntu-20.04
needs:
- compute-version
- build
if: contains('refs/heads/master', github.ref)
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: thrift-ubuntu-20.04
path: dist/
- uses: actions/download-artifact@v4
with:
name: thrift-macos-12
path: dist/
- uses: actions/download-artifact@v4
with:
name: thrift-macos-14
path: dist/
- name: tar types
run: |
tar -cvf dist/types.tar types
- name: move thrift-docker
run: |
cp contrib/thrift-docker dist
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker container
uses: upfluence/actions/build-docker@master
with:
version: ${{ needs.compute-version.outputs.version }}
registries: ghcr.io
- name: Create release
uses: upfluence/actions/create-github-release@master
with:
attachments: dist/*
version: ${{ needs.compute-version.outputs.version }}