Merge rust-bitcoin/rust-bitcoin#833: Allow contributors to easily run CI locally with `act`
006193f5b6
feat: Support running CI locally with `act` (Andrew Ahlers) Pull request description: Disable problematic jobs that involve Github Actions caching or `cross` whenever the environment is set to ACT. This allows running the CI pipeline locally and hopefully speeds up PR cycle times by reducing unexpected CI pipeline results. ## Motivation The CI pipeline does not run until maintainer approval. This allows an easy path for contributors to test out the CI pipeline locally and avoid unexpected results. I personally kept hitting issues here due to MSRV always throwing me off ## Potential issues - `act` does not support Github Actions caching feature which is used in the `fuzz` workflow so I simply disabled it if `act` is detected. - the `cross` workflow is similarly disabled. I kept hitting `sh: 1: cargo: not found` (see: https://github.com/cross-rs/cross/issues/260). I tried a few different workaround but had no success. I'm hoping this is acceptable as it still improves the local testing situation and covers the `Tests` workflow ACKs for top commit: apoelstra: ACK006193f5b6
Kixunil: ACK006193f5b6
Tree-SHA512: 079d50276161ef2c7d61e41d8f47126b8def41ea61f4560be03950e6e4e07ae8bb67ab22ac8f0e46e5e5e3406b64c1de4bb2c62526c36b82db962842ffc377ca
This commit is contained in:
commit
1871c3ada9
|
@ -5,6 +5,7 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
fuzz:
|
fuzz:
|
||||||
|
if: ${{ !github.event.act }}
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
HFUZZ_BUILD_ARGS: "--features honggfuzz_fuzz"
|
HFUZZ_BUILD_ARGS: "--features honggfuzz_fuzz"
|
||||||
|
@ -41,6 +42,7 @@ jobs:
|
||||||
path: executed_${{ matrix.fuzz_target }}
|
path: executed_${{ matrix.fuzz_target }}
|
||||||
|
|
||||||
verify-execution:
|
verify-execution:
|
||||||
|
if: ${{ !github.event.act }}
|
||||||
needs: fuzz
|
needs: fuzz
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -64,6 +64,7 @@ jobs:
|
||||||
|
|
||||||
Cross:
|
Cross:
|
||||||
name: Cross testing
|
name: Cross testing
|
||||||
|
if: ${{ !github.event.act }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Crate
|
- name: Checkout Crate
|
||||||
|
@ -101,7 +102,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
run: sudo apt update && sudo apt install qemu-system-arm gcc-arm-none-eabi
|
run: sudo apt update && sudo apt install -y qemu-system-arm gcc-arm-none-eabi
|
||||||
- name: Checkout Toolchain
|
- name: Checkout Toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -114,6 +114,15 @@ Please try to address them, otherwise your PR might get closed without merging
|
||||||
after a longer time of inactivity. If your PR isn't ready for review yet please
|
after a longer time of inactivity. If your PR isn't ready for review yet please
|
||||||
mark it by prefixing the title with `WIP: `.
|
mark it by prefixing the title with `WIP: `.
|
||||||
|
|
||||||
|
### CI Pipeline
|
||||||
|
|
||||||
|
The CI pipeline requires approval before being run on each MR.
|
||||||
|
|
||||||
|
In order to speed up the review process the CI pipeline can be run locally using
|
||||||
|
[act](https://github.com/nektos/act). The `fuzz` and `Cross` jobs will be
|
||||||
|
skipped when using `act` due to caching being unsupported at this time. We do
|
||||||
|
not *actively* support `act` but will merge PRs fixing `act` issues.
|
||||||
|
|
||||||
## Policy on Altcoins/Altchains
|
## Policy on Altcoins/Altchains
|
||||||
|
|
||||||
Patches which add support for non-Bitcoin cryptocurrencies by adding constants
|
Patches which add support for non-Bitcoin cryptocurrencies by adding constants
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"act": true
|
||||||
|
}
|
Loading…
Reference in New Issue