diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1734632..8ebe276 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,7 +5,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest] + os: [ubuntu-latest, macOS-latest] rust: [nightly] steps: @@ -13,7 +13,11 @@ jobs: with: rust-version: ${{ matrix.rust }} - uses: actions/checkout@master + - name: Run fmt + run: cargo fmt -- --check + - name: Run check + run: cargo check --all --all-features --all-targets - name: Run tests - run: cargo test --all --verbose + run: cargo test --all - name: Run interop tests run: ./tonic-interop/test.sh diff --git a/tonic-interop/bin/darwin/client b/tonic-interop/bin/client_darwin_amd64 similarity index 100% rename from tonic-interop/bin/darwin/client rename to tonic-interop/bin/client_darwin_amd64 diff --git a/tonic-interop/bin/client_linux_amd64 b/tonic-interop/bin/client_linux_amd64 new file mode 100755 index 0000000..7314933 Binary files /dev/null and b/tonic-interop/bin/client_linux_amd64 differ diff --git a/tonic-interop/bin/darwin/server b/tonic-interop/bin/server_darwin_amd64 similarity index 100% rename from tonic-interop/bin/darwin/server rename to tonic-interop/bin/server_darwin_amd64 diff --git a/tonic-interop/bin/server_linux_amd64 b/tonic-interop/bin/server_linux_amd64 new file mode 100755 index 0000000..975a6e9 Binary files /dev/null and b/tonic-interop/bin/server_linux_amd64 differ diff --git a/tonic-interop/test.sh b/tonic-interop/test.sh index 52841a0..8f29c80 100755 --- a/tonic-interop/test.sh +++ b/tonic-interop/test.sh @@ -3,7 +3,13 @@ set -eu set -o pipefail -SERVER="tonic-interop/bin/darwin/server" +case "$OSTYPE" in + darwin*) OS="darwin" ;; + linux*) OS="linux" ;; + *) exit 2 ;; +esac + +SERVER="tonic-interop/bin/server_${OS}_amd64" # run the test server ./"${SERVER}" &