build: add Guix reproducible release flow for Linux, MacOS, Windows
#8842
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci_benchmarks_ubuntu | |
| concurrency: | |
| group: ci_benchmarks_ubuntu-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| push: | |
| branches: ['**'] | |
| merge_group: {} | |
| workflow_dispatch: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: full | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| ci_benchmarks_ubuntu: | |
| name: ci_benchmarks_ubuntu | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ${{ github.repository_owner == 'nervosnetwork' && 'self-hosted-ci-ubuntu-20.04' || 'ubuntu-22.04' }} | |
| steps: | |
| - name: Free up disk space | |
| if: github.repository_owner != 'nervosnetwork' | |
| run: | | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: 1.92.0 | |
| components: rustfmt, clippy | |
| - run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config libclang-dev build-essential | |
| - uses: actions/checkout@v4 | |
| - name: Cache cargo target | |
| if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/rc/')) | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ci-${{ runner.os }}-cargo-bench-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ci-${{ runner.os }}-cargo-bench- | |
| - name: Run benchmark tests | |
| run: make bench-test | |
| shell: bash | |
| - name: Disk usage summary | |
| if: always() && (github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/develop' && github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/rc/'))) | |
| run: | | |
| echo "=== Disk Space Summary ===" | |
| df -h | |
| echo "" | |
| echo "=== Target Directory Usage ===" | |
| du -sh target/ 2>/dev/null || echo "target/ directory not found" | |
| du -sh target/*/ 2>/dev/null || echo "No subdirectories in target/" |