Skip to content

Commit

Permalink
Fix rust build (#451)
Browse files Browse the repository at this point in the history
* Fix rust build

* Test: trigger the build of rust

* Add rust buid result

* Revert "Test: trigger the build of rust"

This reverts commit 165a27c.
  • Loading branch information
aaron-ai authored and imp2002 committed Apr 2, 2023
1 parent 24cd499 commit 7aeca73
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
golang: ${{ steps.filter.outputs.golang }}
csharp: ${{ steps.filter.outputs.csharp }}
php: ${{ steps.filter.outputs.php }}
rust: ${{ steps.filter.outputs.rust }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
Expand All @@ -31,6 +32,8 @@ jobs:
- 'csharp/**'
php:
- 'php/**'
rust:
- 'rust/**'
java-build:
needs: [paths-filter]
if: ${{ needs.paths-filter.outputs.java == 'true' }}
Expand All @@ -52,15 +55,19 @@ jobs:
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
build-result:
runs-on: ubuntu-latest
needs: [java-build, cpp-build, csharp-build, golang-build, php-build]
needs: [java-build, cpp-build, csharp-build, golang-build, php-build, rust-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 }} | grep -E 'cancelled|failure' -o > null
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 }} | grep -E 'cancelled|failure' -o > null
then
echo "There are failed/cancelled builds"
exit 1
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/rust.yml → .github/workflows/rust_build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
name: Rust
name: Rust Build
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'rust/**'
push:
branches:
- master
- rust_dev
paths:
- 'rust/**'

workflow_call:
jobs:
build_and_test:
name: Rust project
runs-on: ubuntu-latest
build:
name: "${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down

0 comments on commit 7aeca73

Please sign in to comment.