File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 27
27
- name : Check formatting
28
28
working-directory : ${{runner.workspace}}/nrn
29
29
run : external/coding-conventions/bin/format -v --dry-run
30
+
31
+ # If formatting fails, apply formatting and push changes.
32
+ # This will trigger another workflow run, which will cancel the current one.
33
+ - name : Apply formatting
34
+ working-directory : ${{runner.workspace}}/nrn
35
+ if : failure() && github.event_name == 'pull_request'
36
+ run : |
37
+ # Checkout PR
38
+ gh pr checkout ${{ github.event.pull_request.number }}
39
+
40
+ # Apply formatting
41
+ external/coding-conventions/bin/format -v
42
+
43
+ # Commit & push changes
44
+ git config --global user.name "github-actions[bot]"
45
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
46
+ git add -u :/
47
+ git commit -a -m "Fix formatting"
48
+ git push
49
+ env :
50
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -240,6 +240,8 @@ NetParEvent::~NetParEvent() {}
240
240
void NetParEvent::send (double tt, NetCvode* nc, NrnThread* nt) {
241
241
nc->event (tt + usable_mindelay_, this , nt);
242
242
}
243
+
244
+
243
245
void NetParEvent::deliver (double tt, NetCvode* nc, NrnThread* nt) {
244
246
int seq;
245
247
if (nrn_use_selfqueue_) { // first handle pending flag=1 self events
You can’t perform that action at this time.
0 commit comments