Skip to content

Commit 006193f

Browse files
committed
feat: Support running CI locally with act
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.
1 parent 0c5b695 commit 006193f

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

.actrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e contrib/act/event.json

.github/workflows/fuzz.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: [push, pull_request]
55
jobs:
66

77
fuzz:
8+
if: ${{ !github.event.act }}
89
runs-on: ubuntu-20.04
910
env:
1011
HFUZZ_BUILD_ARGS: "--features honggfuzz_fuzz"
@@ -41,6 +42,7 @@ jobs:
4142
path: executed_${{ matrix.fuzz_target }}
4243

4344
verify-execution:
45+
if: ${{ !github.event.act }}
4446
needs: fuzz
4547
runs-on: ubuntu-latest
4648
steps:

.github/workflows/rust.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464

6565
Cross:
6666
name: Cross testing
67+
if: ${{ !github.event.act }}
6768
runs-on: ubuntu-latest
6869
steps:
6970
- name: Checkout Crate
@@ -101,7 +102,7 @@ jobs:
101102
- name: Checkout
102103
uses: actions/checkout@v2
103104
- name: Set up QEMU
104-
run: sudo apt update && sudo apt install qemu-system-arm gcc-arm-none-eabi
105+
run: sudo apt update && sudo apt install -y qemu-system-arm gcc-arm-none-eabi
105106
- name: Checkout Toolchain
106107
uses: actions-rs/toolchain@v1
107108
with:

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ Please try to address them, otherwise your PR might get closed without merging
114114
after a longer time of inactivity. If your PR isn't ready for review yet please
115115
mark it by prefixing the title with `WIP: `.
116116

117+
### CI Pipeline
118+
119+
The CI pipeline requires approval before being run on each MR.
120+
121+
In order to speed up the review process the CI pipeline can be run locally using
122+
[act](https://github.com/nektos/act). The `fuzz` and `Cross` jobs will be
123+
skipped when using `act` due to caching being unsupported at this time. We do
124+
not *actively* support `act` but will merge PRs fixing `act` issues.
125+
117126
## Policy on Altcoins/Altchains
118127

119128
Patches which add support for non-Bitcoin cryptocurrencies by adding constants

contrib/act/event.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"act": true
3+
}

0 commit comments

Comments
 (0)