Skip to content

Commit

Permalink
Merge branch 'fraccaman/ci-here-we-go-again-20'
Browse files Browse the repository at this point in the history
* origin/fraccaman/ci-here-we-go-again-20:
  [ci skip] change cache, update triggerable task
  • Loading branch information
Fraccaman committed Oct 5, 2023
2 parents dbbc9e7 + 56364a1 commit 328a646
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 43 deletions.
100 changes: 82 additions & 18 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,18 @@ jobs:
# to disallow that.
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
wasm/wasm_source/target
key: ${{ runner.os }}-wasm-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-wasm-
- name: Build WASM
run: make build-wasm-scripts
- name: Upload wasm artifacts (github)
Expand All @@ -75,6 +83,10 @@ jobs:
wasm/tx_*.wasm
wasm/vp_*.wasm
wasm/checksums.json
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
test-wasm:
timeout-minutes: 30
Expand Down Expand Up @@ -118,17 +130,29 @@ jobs:
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
wasm/wasm_source/target
key: ${{ runner.os }}-wasm-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-wasm-
- name: Test Wasm
run: make test-wasm
- name: Check wasm up-to-date
run: cmp -- wasm/checksums.json wasm/original-checksums.json
- name: Print diff
if: failure()
run: diff -y -W 150 wasm/checksums.json wasm/original-checksums.json --suppress-common-lines
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
upload-wasm:
timeout-minutes: 5
Expand Down Expand Up @@ -203,10 +227,16 @@ jobs:
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
Expand Down Expand Up @@ -244,6 +274,10 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
run-benchmarks:
runs-on:
Expand Down Expand Up @@ -288,10 +322,16 @@ jobs:
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
Expand Down Expand Up @@ -319,6 +359,10 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
namada-release:
runs-on:
Expand Down Expand Up @@ -356,10 +400,16 @@ jobs:
with:
profile: default
override: true
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install mold linker
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
Expand Down Expand Up @@ -405,6 +455,10 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
namada-e2e:
Expand Down Expand Up @@ -455,10 +509,16 @@ jobs:
with:
toolchain: ${{ matrix.nightly_version }}
profile: default
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
Expand Down Expand Up @@ -526,3 +586,7 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
17 changes: 15 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,17 @@ jobs:
profile: default
- name: Show rust toolchain info
run: rustup show
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Start sccache server
Expand All @@ -90,3 +99,7 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
19 changes: 15 additions & 4 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,17 @@ jobs:
profile: minimal
- name: Show rust toolchain info
run: rustup show
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install cargo ${{ matrix.make.command }}
run: curl https://i.jpillora.com/${{ matrix.make.version }}! | bash
- name: Install Protoc
Expand All @@ -57,5 +66,7 @@ jobs:
python3 ${{ matrix.make.command }}.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Clean cache folder
run: cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache && cargo-cache
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
10 changes: 9 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
rust-docs:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -180,4 +184,8 @@ jobs:
file: docker/docs/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ jobs:
with:
profile: minimal
override: true
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install cargo-about
Expand All @@ -70,6 +76,10 @@ jobs:
- name: Stop sccache server
if: always()
run: sccache --stop-server || true
- name: Clean cargo cache
run: |
cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo-cache
release:
needs: build
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/triggerable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ on:
default: 150
type: number

permissions:
id-token: read
contents: read
pull-requests: write

env:
RUSTC_WRAPPER: sccache
SCCACHE_S3_USE_SSL: ${{ secrets.CACHE_SSL }}
Expand All @@ -32,16 +27,15 @@ env:
jobs:
pos:
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.make.timeout }}
timeout-minutes: ${{ matrix.timeout }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
mold_version: [2.1.0]
make:
- name: Run PoS state-machine tests
command: make test-pos-sm
timeout: 360
name: ["Run PoS state-machine tests"]
command: ["make test-pos-sm"]
timeout: [360]

steps:
- uses: actions/checkout@v4
Expand All @@ -58,18 +52,24 @@ jobs:
with:
profile: default
override: true
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
cache-targets: false
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Run task `${{ matrix.make.name }}`
run: ${{ matrix.make.command }}
- name: Run task `${{ matrix.name }}`
run: ${{ matrix.command }}
env:
PROPTEST_CASES: ${{ inputs.total_tests }}
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
Expand Down

0 comments on commit 328a646

Please sign in to comment.