Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit f75aae8

Browse files
handle syncwith separately
1 parent 429b8d5 commit f75aae8

File tree

3 files changed

+62
-42
lines changed

3 files changed

+62
-42
lines changed

.github/workflows/pull-request.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: PR Testing
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
concurrency:
10+
# In master we want to run for every commit, in other branches — only for the last one
11+
group: ${{
12+
( github.ref == 'refs/heads/master' && format('{0}/{1}/{2}', github.workflow, github.ref, github.sha) )
13+
||
14+
format('{0}/{1}', github.workflow, github.ref) }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
handle-syncwith:
19+
if: github.event_name == 'pull_request'
20+
name: Call Reusable SyncWith Handler
21+
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1.2.1
22+
with:
23+
ci-cd-ref: 'v1.1.2'
24+
secrets: inherit
25+
26+
test-linux:
27+
name: Linux Crypto3 Testing
28+
uses: ./.github/workflows/run_tests_linux.yml
29+
needs:
30+
- handle-syncwith
31+
if: |
32+
always() && !cancelled() &&
33+
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped')
34+
secrets: inherit
35+
with:
36+
submodules-refs: ${{ needs.handle-syncwith.outputs.prs-refs }}
37+
38+
test-mac:
39+
name: macOS Crypto3 Testing
40+
uses: ./.github/workflows/run_tests_mac.yml
41+
needs:
42+
- handle-syncwith
43+
if: |
44+
always() && !cancelled() &&
45+
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped')
46+
secrets: inherit
47+
with:
48+
submodules-refs: ${{ needs.handle-syncwith.outputs.prs-refs }}

.github/workflows/run_tests_linux.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
1-
name: Run tests
1+
name: Run linux tests
22

33
on:
4-
# Triggers the workflow on pull request events but only for the master branch
5-
pull_request:
6-
branches: [ master ]
7-
push:
8-
branches: [ master ]
9-
10-
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
submodules-refs:
7+
type: string
8+
description: "Lines with submodules' repo names and refs (e.g. `org/repo: ref`)"
9+
required: false
1210

1311
env:
14-
SUITE_REPO: "NilFoundation/crypto3"
1512
LIB_NAME: "blueprint"
1613
CACHE_NAME: "blueprint-job-cache"
1714
TESTS_ARTIFACT_NAME: "test-results-linux"
1815

1916
jobs:
20-
handle-syncwith:
21-
if: github.event_name == 'pull_request'
22-
name: Call Reusable SyncWith Handler
23-
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1
24-
with:
25-
ci-cd-ref: 'v1'
26-
secrets: inherit
27-
2817
build-and-test:
29-
needs: [ handle-syncwith ]
3018
name: "Build and test Linux"
3119
runs-on: ["self-hosted", "aws_autoscaling"]
3220
strategy:

.github/workflows/run_tests_mac.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,25 @@
1-
name: Run tests
1+
name: Run mac tests
22

33
on:
4-
# Triggers the workflow on pull request events but only for the master branch
5-
pull_request:
6-
branches: [ master ]
7-
push:
8-
branches: [ master ]
9-
10-
# Allows you to run this workflow manually from the Actions tab
11-
workflow_dispatch:
4+
workflow_call:
5+
inputs:
6+
submodules-refs:
7+
type: string
8+
description: "Lines with submodules' repo names and refs (e.g. `org/repo: ref`)"
9+
required: false
1210

1311
env:
14-
SUITE_REPO: "NilFoundation/crypto3"
1512
LIB_NAME: "blueprint"
1613
CACHE_NAME: "blueprint-job-cache"
1714
TESTS_ARTIFACT_NAME: "test-results-mac"
1815

1916
jobs:
20-
handle-syncwith:
21-
if: github.event_name == 'pull_request'
22-
name: Call Reusable SyncWith Handler
23-
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1
24-
with:
25-
ci-cd-ref: 'v1'
26-
secrets: inherit
27-
2817
build-and-test:
29-
needs: [ handle-syncwith ]
3018
name: "Build and test macOS"
3119
runs-on: [macos-14]
3220
strategy:
3321
fail-fast: false
3422
steps:
35-
# https://github.com/actions/checkout/issues/1552
36-
- name: Clean up after previous checkout
37-
run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*;
38-
3923
- name: Checkout Blueprint
4024
uses: actions/checkout@v4
4125
with:

0 commit comments

Comments
 (0)