Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] remove duplicate keys, add sccache for upgrade tests #331

Merged
merged 5 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/actions/build_env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ runs:
shell: bash
run: rustup component add rustfmt clippy

- name: also rust cache
uses: Swatinem/[email protected]
with:
shared-key: "libra"
cache-on-failure: "true"

# call own action for libra_cli
# known issue with needing to hard code the @version
# https://github.com/orgs/community/discussions/41927
Expand Down
46 changes: 32 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

# fail fast if types doesnt compile, everything else will fail.
# fail fast if types doesn't compile, everything else will fail.
- name: types
working-directory: ./types
run: cargo test --no-fail-fast
Expand All @@ -67,10 +68,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- name: wallet
if: always()
Expand All @@ -94,10 +96,11 @@ jobs:
name: framework-build
path: framework/

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

# Check test suite meta tests
- name: smoke-tests # NOTE: needs working DIEM_FORGE_NODE_BIN_PATH
Expand All @@ -114,10 +117,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- uses: actions/[email protected]
with:
Expand All @@ -140,10 +144,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- uses: actions/[email protected]
with:
Expand All @@ -165,10 +170,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -204,10 +210,14 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -258,17 +268,20 @@ jobs:
- uses: actions/checkout@v3

- name: setup env
# if: ${{runner.environment == 'self-hosted'}}
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- uses: actions/[email protected]
# if: ${{runner.environment == 'self-hosted'}}
with:
name: framework-build
path: framework/
- name: rescue
if: always()
# if: ${{runner.environment == 'self-hosted'}}
working-directory: ./tools/rescue
run: RUST_MIN_STACK=104857600 cargo test --no-fail-fast -- --test-threads=1
storage:
Expand All @@ -277,16 +290,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- name: storage
working-directory: ./tools/storage
# TODO: not testing the V6 file parsing
run: cargo test --no-fail-fast

twin-testsuite:
Expand All @@ -295,13 +310,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- name: twin
working-directory: ./testsuites/twin
run: cargo test --no-fail-fast
3 changes: 2 additions & 1 deletion .github/workflows/cleanliness.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
cache-all-crates: true
cache-on-failure: true

- name: format
uses: actions-rs/cargo@v1
Expand Down
Loading