From 006193f5b65f5455a14c1fb6ffb5384b2c9dcf76 Mon Sep 17 00:00:00 2001 From: Andrew Ahlers Date: Thu, 17 Feb 2022 00:15:42 +0100 Subject: [PATCH] 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. --- .actrc | 1 + .github/workflows/fuzz.yml | 2 ++ .github/workflows/rust.yml | 3 ++- README.md | 9 +++++++++ contrib/act/event.json | 3 +++ 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .actrc create mode 100644 contrib/act/event.json diff --git a/.actrc b/.actrc new file mode 100644 index 00000000..a078f640 --- /dev/null +++ b/.actrc @@ -0,0 +1 @@ +-e contrib/act/event.json diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml index 43d63419..914bfd47 100644 --- a/.github/workflows/fuzz.yml +++ b/.github/workflows/fuzz.yml @@ -5,6 +5,7 @@ on: [push, pull_request] jobs: fuzz: + if: ${{ !github.event.act }} runs-on: ubuntu-20.04 env: HFUZZ_BUILD_ARGS: "--features honggfuzz_fuzz" @@ -41,6 +42,7 @@ jobs: path: executed_${{ matrix.fuzz_target }} verify-execution: + if: ${{ !github.event.act }} needs: fuzz runs-on: ubuntu-latest steps: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8e6b7591..66c1a690 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -64,6 +64,7 @@ jobs: Cross: name: Cross testing + if: ${{ !github.event.act }} runs-on: ubuntu-latest steps: - name: Checkout Crate @@ -101,7 +102,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - 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 uses: actions-rs/toolchain@v1 with: diff --git a/README.md b/README.md index 4729b6d1..17f97e3a 100644 --- a/README.md +++ b/README.md @@ -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 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 Patches which add support for non-Bitcoin cryptocurrencies by adding constants diff --git a/contrib/act/event.json b/contrib/act/event.json new file mode 100644 index 00000000..43c2f0eb --- /dev/null +++ b/contrib/act/event.json @@ -0,0 +1,3 @@ +{ + "act": true +}