release(rust): get ready to launch the Rust SDK (#578) #939
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: Build | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: | |
- master | |
jobs: | |
paths-filter: | |
runs-on: ubuntu-latest | |
outputs: | |
java: ${{ steps.filter.outputs.java }} | |
cpp: ${{ steps.filter.outputs.cpp }} | |
golang: ${{ steps.filter.outputs.golang }} | |
csharp: ${{ steps.filter.outputs.csharp }} | |
php: ${{ steps.filter.outputs.php }} | |
rust: ${{ steps.filter.outputs.rust }} | |
python: ${{ steps.filter.outputs.python }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
java: | |
- 'java/**' | |
cpp: | |
- 'cpp/**' | |
golang: | |
- 'golang/**' | |
csharp: | |
- 'csharp/**' | |
php: | |
- 'php/**' | |
rust: | |
- 'rust/**' | |
python: | |
- 'python/**' | |
java-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.java == 'true' }} | |
uses: ./.github/workflows/java_build.yml | |
cpp-build: | |
needs: [paths-filter] | |
secrets: inherit | |
if: ${{ needs.paths-filter.outputs.cpp == 'true' }} | |
uses: ./.github/workflows/cpp_build.yml | |
csharp-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.csharp == 'true' }} | |
uses: ./.github/workflows/csharp_build.yml | |
golang-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.golang == 'true' }} | |
uses: ./.github/workflows/golang_build.yml | |
php-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.php == 'true' }} | |
uses: ./.github/workflows/php_build.yml | |
rust-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.rust == 'true' }} | |
uses: ./.github/workflows/rust_build.yml | |
python-build: | |
needs: [paths-filter] | |
if: ${{ needs.paths-filter.outputs.python == 'true' }} | |
uses: ./.github/workflows/python_build.yml | |
build-result: | |
runs-on: ubuntu-latest | |
needs: [java-build, cpp-build, csharp-build, golang-build, php-build, rust-build, python-build] | |
if: ${{ always() }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Collect build result | |
run: | | |
if echo java-${{ needs.java-build.result }},\ | |
cpp-${{ needs.cpp-build.result }},\ | |
csharp-${{ needs.csharp-build.result }},\ | |
golang-${{ needs.golang-build.result }},\ | |
php-${{ needs.php-build.result }},\ | |
rust-${{ needs.rust-build.result }},\ | |
python-${{ needs.python-build.result }} | grep -E 'cancelled|failure' -o > null | |
then | |
echo "There are failed/cancelled builds" | |
exit 1 | |
else | |
echo "All builds are successful/skipped" | |
exit 0 | |
fi |