diff --git a/.github/workflows/protobuf.yml b/.github/workflows/protobuf.yml index e02e1b47..9c25edaf 100644 --- a/.github/workflows/protobuf.yml +++ b/.github/workflows/protobuf.yml @@ -19,5 +19,11 @@ jobs: js: true rust: true golang: true + - name: Cache `.bin` folder + id: cache-setup + uses: actions/cache@v2 + with: + path: .bin + key: ${{ runner.os }}-bin - run: ./dev/proto-generate.sh - run: git diff --exit-code diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 57ed83dd..747a9ba1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,7 +16,42 @@ jobs: - uses: ./.github/actions/asdf with: rust: true - - run: cargo check - working-directory: bindings/rust + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cache cargo target + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-target- - run: cargo check working-directory: cmd/tests/reprolang + rust-bindings-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/asdf + with: + rust: true + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cache cargo target + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-target- + - run: cargo test + working-directory: bindings/rust