chore: bump bitcoin version to 0.32.4 #1554
This file contains 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 | |
env: | |
RUST_VERSION: 1.76.0 | |
DFX_VERSION: 0.21.0 | |
POCKET_IC_SERVER_VERSION: 7.0.0 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
cargo-build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-13 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
rustup target add wasm32-unknown-unknown | |
- name: Build | |
shell: bash | |
run: | | |
cargo build --release --all-targets | |
cargo build --release --bin build-utxos --bin main-state-builder --features=file_memory | |
env: | |
RUST_BACKTRACE: 1 | |
cargo-tests: | |
runs-on: ${{ matrix.os }} | |
needs: cargo-build | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macos-13 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
rustup target add wasm32-unknown-unknown | |
- name: Install PocketIC (mac) | |
if: runner.os == 'macOS' | |
run: | | |
wget https://github.com/dfinity/pocketic/releases/download/$POCKET_IC_SERVER_VERSION/pocket-ic-x86_64-darwin.gz | |
gzip -d pocket-ic-x86_64-darwin.gz | |
mv pocket-ic-x86_64-darwin pocket-ic | |
chmod +x pocket-ic | |
mv pocket-ic ./canister/ | |
- name: Install PocketIC (linux) | |
if: runner.os == 'Linux' | |
run: | | |
wget https://github.com/dfinity/pocketic/releases/download/$POCKET_IC_SERVER_VERSION/pocket-ic-x86_64-linux.gz | |
gzip -d pocket-ic-x86_64-linux.gz | |
mv pocket-ic-x86_64-linux pocket-ic | |
chmod +x pocket-ic | |
mv pocket-ic ./canister/ | |
- name: Install brew packages (mac) | |
if: runner.os == 'macOS' | |
run: | | |
brew install llvm | |
- name: Run Tests | |
shell: bash | |
run: | | |
cargo test --release --all-targets --workspace --exclude benchmarks | |
env: | |
RUST_BACKTRACE: 1 | |
cargo-clippy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust + Clippy | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
rustup target add wasm32-unknown-unknown | |
rustup component add clippy | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-targets -- -D warnings | |
rustfmt: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust + Clippy | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
- name: Install Rust + Rustfmt | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
shell-checks: | |
name: ShellCheck | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
env: | |
SHELLCHECK_OPTS: -e SC1090 -e SC2119 -e SC1091 | |
e2e-scenario-1: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run scenario 1 | |
run: | | |
bash e2e-tests/scenario-1.sh | |
e2e-scenario-2: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run scenario 2 | |
run: | | |
bash e2e-tests/scenario-2.sh | |
e2e-scenario-3: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run scenario 3 | |
run: | | |
bash e2e-tests/scenario-3.sh | |
e2e-disable-api-if-not-fully-synced-flag: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run disable api if not fully synced flag | |
run: | | |
bash e2e-tests/disable-api-if-not-fully-synced-flag.sh | |
charge-cycles-on-reject: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run charge cycles on reject | |
run: | | |
bash e2e-tests/charge-cycles-on-reject.sh | |
upgradability: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run upgradability test | |
run: | | |
bash e2e-tests/upgradability.sh | |
set_config: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run set_config test | |
run: | | |
bash e2e-tests/set_config.sh | |
post_upgrade_config: | |
runs-on: ubuntu-latest | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run post_upgrade_config test | |
run: | | |
bash e2e-tests/post_upgrade_config.sh | |
cycles_burn: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run cycles_burn test | |
run: bash e2e-tests/cycles_burn.sh | |
bitcoin_canister_metadata: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run bitcoin_canister_metadata test | |
run: bash e2e-tests/bitcoin-canister-metadata.sh | |
benchmark: | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_DIR: . | |
steps: | |
- name: Checkout current PR | |
uses: actions/checkout@v4 | |
- name: Checkout master branch | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
path: _canbench_main_branch | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update $RUST_VERSION --no-self-update | |
rustup default $RUST_VERSION | |
rustup target add wasm32-unknown-unknown | |
- name: Benchmark | |
run: | | |
bash ./scripts/canbench_ci_run_benchmark.sh $PROJECT_DIR ${{ github.job }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: canbench_result_${{github.job}} | |
path: /tmp/canbench_result_${{ github.job }} | |
- name: Save PR number | |
run: | | |
echo ${{ github.event.number }} > /tmp/pr_number | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pr_number | |
path: /tmp/pr_number | |
- name: Pass or fail | |
run: | | |
bash ./scripts/canbench_ci_post_run_benchmark.sh | |
watchdog_health_status: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run health_status test | |
run: | | |
bash watchdog/e2e-tests/health_status.sh | |
watchdog_get_config: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run get_config test | |
run: | | |
bash watchdog/e2e-tests/get_config.sh | |
watchdog_metrics: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run metrics test | |
run: | | |
bash watchdog/e2e-tests/metrics.sh | |
watchdog_upgradability: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run upgradability test | |
run: | | |
bash watchdog/e2e-tests/upgradability.sh | |
watchdog_canister_metadata: | |
runs-on: ubuntu-20.04 | |
needs: cargo-build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-1 | |
- name: Install Rust | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
rustup target add wasm32-unknown-unknown | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: $DFX_VERSION | |
- name: Run watchdog_canister_metadata test | |
run: bash watchdog/e2e-tests/watchdog-canister-metadata.sh | |
canister-build-reproducibility: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Verify Reproducibility | |
run: | | |
./e2e-tests/reproducibility.sh Dockerfile | |
checks-pass: | |
# Always run this job! | |
if: always() | |
needs: [cargo-tests, shell-checks, cargo-clippy, rustfmt, e2e-disable-api-if-not-fully-synced-flag, e2e-scenario-1, e2e-scenario-2, | |
e2e-scenario-3, charge-cycles-on-reject, upgradability, set_config, cycles_burn, benchmark, watchdog_health_status, | |
watchdog_get_config, watchdog_metrics, watchdog_upgradability, canister-build-reproducibility, bitcoin_canister_metadata] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: check cargo-tests result | |
if: ${{ needs.cargo-tests.result != 'success' }} | |
run: exit 1 | |
- name: check shell-checks result | |
if: ${{ needs.shell-checks.result != 'success' }} | |
run: exit 1 | |
- name: check cargo-clippy result | |
if: ${{ needs.cargo-clippy.result != 'success' }} | |
run: exit 1 | |
- name: check rustfmt result | |
if: ${{ needs.rustfmt.result != 'success' }} | |
run: exit 1 | |
- name: check e2e-disable-api-if-not-fully-synced-flag result | |
if: ${{ needs.e2e-disable-api-if-not-fully-synced-flag.result != 'success' }} | |
run: exit 1 | |
- name: check e2e-scenario-1 result | |
if: ${{ needs.e2e-scenario-1.result != 'success' }} | |
run: exit 1 | |
- name: check e2e-scenario-2 result | |
if: ${{ needs.e2e-scenario-2.result != 'success' }} | |
run: exit 1 | |
- name: check e2e-scenario-3 result | |
if: ${{ needs.e2e-scenario-3.result != 'success' }} | |
run: exit 1 | |
- name: check charge-cycles-on-reject result | |
if: ${{ needs.charge-cycles-on-reject.result != 'success' }} | |
run: exit 1 | |
- name: check upgradability result | |
if: ${{ needs.upgradability.result != 'success' }} | |
run: exit 1 | |
- name: check set_config result | |
if: ${{ needs.set_config.result != 'success' }} | |
run: exit 1 | |
- name: check cycles_burn result | |
if: ${{ needs.cycles_burn.result != 'success' }} | |
run: exit 1 | |
- name: check bitcoin_canister_metadata result | |
if: ${{ needs.bitcoin_canister_metadata.result != 'success' }} | |
run: exit 1 | |
- name: check benchmark result | |
if: ${{ needs.benchmark.result != 'success' }} | |
run: exit 1 | |
- name: check watchdog_health_status result | |
if: ${{ needs.watchdog_health_status.result != 'success' }} | |
run: exit 1 | |
- name: check watchdog_get_config result | |
if: ${{ needs.watchdog_get_config.result != 'success' }} | |
run: exit 1 | |
- name: check watchdog_metrics result | |
if: ${{ needs.watchdog_metrics.result != 'success' }} | |
run: exit 1 | |
- name: check watchdog_upgradability result | |
if: ${{ needs.watchdog_upgradability.result != 'success' }} | |
run: exit 1 | |
- name: check canister-build-reproducibility result | |
if: ${{ needs.canister-build-reproducibility.result != 'success' }} | |
run: exit 1 |