Merge rust-bitcoin/rust-bitcoin#2617: Revert #2525 (filter CI)

50e772fe79 Revert "ci: introduce `classify-pr.sh` script which determines whether a PR should have CI run" (Andrew Poelstra)
ae381fcc01 Revert "ci: gate CI workflow on source being changed" (Andrew Poelstra)
495d7e8acd Revert "ci: gate fuzztesting on whether source code changed" (Andrew Poelstra)
ec3e4e8801 Revert "ci: gate coverage analysis on whether source code changed" (Andrew Poelstra)

Pull request description:

  This PR did not work on the "master" CI runs and I really don't care enough to figure it out (or even how to test it). Just revert it.

ACKs for top commit:
  tcharding:
    ACK 50e772fe79

Tree-SHA512: c56b77dab93e9917b2420f5b7f178bfa05500f8329852296102d72df33c5de87d45ee79f235a4ce30e629bc79b2b290a2fcb97d7808c406bfe07c9fe7e1cc997
This commit is contained in:
Andrew Poelstra 2024-03-20 21:57:57 +00:00
commit 2b9568158b
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
4 changed files with 3 additions and 75 deletions

View File

@ -5,20 +5,7 @@ on:
name: Code coverage with llvm-cov name: Code coverage with llvm-cov
jobs: jobs:
Prepare:
runs-on: ubuntu-latest
outputs:
pr_changed_source: ${{ steps.classify_pr.outputs.pr_changed_source }}
steps:
- name: Checkout Crate
uses: actions/checkout@v4
- name: Determine what files the PR changes.
id: classify_pr
run: contrib/classify-pr.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}
Coveralls: Coveralls:
needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Code coverage - stable toolchain name: Code coverage - stable toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

View File

@ -9,20 +9,8 @@ on:
pull_request: pull_request:
jobs: jobs:
Prepare:
runs-on: ubuntu-latest
outputs:
pr_changed_source: ${{ steps.classify_pr.outputs.pr_changed_source }}
steps:
- name: Checkout Crate
uses: actions/checkout@v4
- name: Determine what files the PR changes.
id: classify_pr
run: contrib/classify-pr.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}
fuzz: fuzz:
needs: Prepare if: ${{ !github.event.act }}
if: ${{ !github.event.act }} && needs.Prepare.outputs.pr_changed_source == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -76,8 +64,7 @@ jobs:
path: executed_${{ matrix.fuzz_target }} path: executed_${{ matrix.fuzz_target }}
verify-execution: verify-execution:
needs: Prepare if: ${{ !github.event.act }}
if: ${{ !github.event.act }} && needs.Prepare.outputs.pr_changed_source == 'true'
needs: fuzz needs: fuzz
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -14,13 +14,9 @@ jobs:
crates: ${{ steps.get_matrix.outputs.crates }} crates: ${{ steps.get_matrix.outputs.crates }}
deps: ${{ steps.get_matrix.outputs.deps }} deps: ${{ steps.get_matrix.outputs.deps }}
nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }} nightly_version: ${{ steps.read_toolchain.outputs.nightly_version }}
pr_changed_source: ${{ steps.classify_pr.outputs.pr_changed_source }}
steps: steps:
- name: Checkout Crate - name: Checkout Crate
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Determine what files the PR changes.
id: classify_pr
run: contrib/classify-pr.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }}
- name: Read nightly version - name: Read nightly version
id: read_toolchain id: read_toolchain
run: echo "nightly_version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT run: echo "nightly_version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
@ -30,7 +26,6 @@ jobs:
Stable: Stable:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - stable toolchain name: Test - stable toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -52,7 +47,6 @@ jobs:
Beta: Beta:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - beta toolchain name: Test - beta toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -73,7 +67,6 @@ jobs:
Nightly: Nightly:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - nightly toolchain name: Test - nightly toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -98,7 +91,6 @@ jobs:
MSRV: MSRV:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test - 1.56.1 toolchain name: Test - 1.56.1 toolchain
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -120,8 +112,6 @@ jobs:
run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }} run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }}
Arch32bit: Arch32bit:
needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Test 32-bit version name: Test 32-bit version
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -139,9 +129,8 @@ jobs:
run: cargo test --target i686-unknown-linux-gnu run: cargo test --target i686-unknown-linux-gnu
Cross: Cross:
needs: Prepare
if: ${{ !github.event.act }} && needs.Prepare.outputs.pr_changed_source == 'true'
name: Cross test name: Cross test
if: ${{ !github.event.act }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Crate - name: Checkout Crate
@ -157,7 +146,6 @@ jobs:
Embedded: Embedded:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
RUSTFLAGS: "-C link-arg=-Tlink.x" RUSTFLAGS: "-C link-arg=-Tlink.x"
@ -183,7 +171,6 @@ jobs:
ASAN: ASAN:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Address sanitizer # hashes crate only. name: Address sanitizer # hashes crate only.
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -206,7 +193,6 @@ jobs:
WASM: WASM:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: WebAssembly Build # hashes crate only. name: WebAssembly Build # hashes crate only.
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -225,7 +211,6 @@ jobs:
Schemars: Schemars:
needs: Prepare needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
name: Schemars name: Schemars
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -243,8 +228,6 @@ jobs:
run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }} run: ./contrib/run_task.sh ${{ matrix.crate }} ${{ matrix.task }}
Kani: Kani:
needs: Prepare
if: needs.Prepare.outputs.pr_changed_source == 'true'
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: 'Checkout your code.' - name: 'Checkout your code.'

View File

@ -1,29 +0,0 @@
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <tip of master> <tip of PR>"
exit 1
fi
pr_tip=$1
master_tip=$2
# When called on `pull_request`, GA fails to pull down master by default.
# When called on `push`, GA fails to pull down the PR by default, only its merge commit.
# The simplest way to deal with this is to just pull both explicitly.
git fetch origin "$master_tip":master_tip
git fetch origin "$pr_tip":pr_tip
pr_base=$(git merge-base master_tip pr_tip)
echo "Using master $master_tip"
echo "Using PR tip $pr_tip"
echo "Using PR base $pr_base"
# If something modifies any non-markdown file, it's considered a source code change.
if git diff --name-only "$pr_base" "$pr_tip" | grep -qv "^.md$"; then
echo "pr_changed_source=true" >> "$GITHUB_OUTPUT"
else
echo "pr_changed_source=false" >> "$GITHUB_OUTPUT"
fi