From 3753ce847130eac4bd3b11417ecbfb3a35a5f27a Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 3 Apr 2023 16:13:27 -0400 Subject: [PATCH 1/3] ci: add running rust tests --- .github/workflows/rust.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 57ed83dd..ab8c5ef2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,7 +16,14 @@ jobs: - uses: ./.github/actions/asdf with: rust: true - - run: cargo check - working-directory: bindings/rust - 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 + - run: cargo test + working-directory: bindings/rust From 28a31167bbc2ee1fec5bc26ff6cf376f4881057f Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 3 Apr 2023 16:20:58 -0400 Subject: [PATCH 2/3] ci: cache rust stuff --- .github/workflows/rust.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ab8c5ef2..747a9ba1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,6 +16,20 @@ jobs: - 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 check working-directory: cmd/tests/reprolang rust-bindings-test: @@ -25,5 +39,19 @@ jobs: - 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 From 7087a5af3024edc8c6d38c63ff0b5d2662512246 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Mon, 3 Apr 2023 16:35:54 -0400 Subject: [PATCH 3/3] ci: cache '.bin' folder --- .github/workflows/protobuf.yml | 6 ++++++ 1 file changed, 6 insertions(+) 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