From f6fad0848d7a8782fef52e4267ec60ed2b99725b Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 19 Jun 2024 00:51:49 +0200 Subject: [PATCH] Use the rust cache all around --- .github/workflows/codeql.yml | 36 ++++++++++++++++++------------- .github/workflows/rust.yml | 2 +- .github/workflows/soroban-rpc.yml | 14 +++++------- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d48e5f05..54dbaa1f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,21 +21,27 @@ jobs: fail-fast: false matrix: include: - - language: go - build-mode: autobuild - + - language: go + build-mode: autobuild + steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 + - uses: ./.github/actions/setup-go + with: + go-version: 1.22 + - run: rustup update + - uses: stellar/actions/rust-cache@main + - run: make build-libpreflight - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 87c5afe8..6f9dd3fa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: stellar/actions/rust-cache@main - run: rustup update + - uses: stellar/actions/rust-cache@main - run: make rust-check - run: make rust-test diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 03d6c336..e9122e82 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -29,6 +29,7 @@ jobs: with: go-version: ${{ matrix.go }} - run: rustup update + - uses: stellar/actions/rust-cache@main - run: make build-libpreflight - run: go test -race -cover -timeout 25m -v ./cmd/soroban-rpc/... @@ -81,9 +82,8 @@ jobs: - run: | rustup target add ${{ matrix.rust_target }} rustup update - - - name: Build libpreflight - run: make build-libpreflight + - uses: stellar/actions/rust-cache@main + - run: make build-libpreflight env: CARGO_BUILD_TARGET: ${{ matrix.rust_target }} @@ -132,8 +132,6 @@ jobs: docker pull "$PROTOCOL_${{ matrix.protocol-version }}_CORE_DOCKER_IMG" echo SOROBAN_RPC_INTEGRATION_TESTS_DOCKER_IMG="$PROTOCOL_${{ matrix.protocol-version }}_CORE_DOCKER_IMG" >> $GITHUB_ENV - - uses: stellar/actions/rust-cache@main - - name: Install Captive Core shell: bash run: | @@ -176,10 +174,8 @@ jobs: docker-compose version - run: rustup update - - - name: Build libpreflight - shell: bash - run: make build-libpreflight + - uses: stellar/actions/rust-cache@main + - run: make build-libpreflight - name: Run Soroban RPC Integration Tests run: |