Skip to content

Commit ccb20c7

Browse files
committed
Move check_commits to a dedicated workflow
Previously, we introduced a chance dynamically determining the base branch for the check_commits CI job. Unfortunately it used the base_ref variable, which is only set for pull_requests, not for pushes. Here, we hence move `check_commits` to a dedicated workflow that only is run on PRs.
1 parent a48d650 commit ccb20c7

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -179,29 +179,6 @@ jobs:
179179
cd bench
180180
RUSTFLAGS="--cfg=ldk_bench --cfg=require_route_graph_test" cargo bench
181181
182-
check_commits:
183-
runs-on: ubuntu-latest
184-
env:
185-
TOOLCHAIN: stable
186-
steps:
187-
- name: Checkout source code
188-
uses: actions/checkout@v4
189-
with:
190-
fetch-depth: 0
191-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
192-
run: |
193-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
194-
rustup override set ${{ env.TOOLCHAIN }}
195-
- name: Fetch full tree and rebase on upstream
196-
run: |
197-
git remote add upstream https://github.com/lightningdevkit/rust-lightning
198-
git fetch upstream
199-
export GIT_COMMITTER_EMAIL="[email protected]"
200-
export GIT_COMMITTER_NAME="RL CI"
201-
git rebase upstream/${{ github.base_ref }}
202-
- name: For each commit, run cargo check (including in fuzz)
203-
run: ci/check-each-commit.sh upstream/${{ github.base_ref }}
204-
205182
check_release:
206183
runs-on: ubuntu-latest
207184
env:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI check_commits
2+
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- master
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
check_commits:
14+
runs-on: ubuntu-latest
15+
env:
16+
TOOLCHAIN: stable
17+
steps:
18+
- name: Checkout source code
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
23+
run: |
24+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
25+
rustup override set ${{ env.TOOLCHAIN }}
26+
- name: Fetch full tree and rebase on upstream
27+
run: |
28+
git remote add upstream https://github.com/lightningdevkit/rust-lightning
29+
git fetch upstream
30+
export GIT_COMMITTER_EMAIL="[email protected]"
31+
export GIT_COMMITTER_NAME="RL CI"
32+
git rebase upstream/${{ github.base_ref }}
33+
- name: For each commit, run cargo check (including in fuzz)
34+
run: ci/check-each-commit.sh upstream/${{ github.base_ref }}

0 commit comments

Comments
 (0)